packages feed

amazonka-resourcegroupstagging (empty) → 1.5.0

raw patch · 29 files changed

+2105/−0 lines, 29 filesdep +amazonka-coredep +amazonka-resourcegroupstaggingdep +amazonka-testsetup-changed

Dependencies added: amazonka-core, amazonka-resourcegroupstagging, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers

Files

+ 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 Resource Groups Tagging API SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.5.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-resourcegroupstagging)+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.ResourceGroupsTagging](http://hackage.haskell.org/package/amazonka-resourcegroupstagging/docs/Network-AWS-ResourceGroupsTagging.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-resourcegroupstagging` 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-resourcegroupstagging.cabal view
@@ -0,0 +1,90 @@+name:                  amazonka-resourcegroupstagging+version:               1.5.0+synopsis:              Amazon Resource Groups Tagging API 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-2017 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.ResourceGroupsTagging" 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-resourcegroupstagging++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.ResourceGroupsTagging+        , Network.AWS.ResourceGroupsTagging.GetResources+        , Network.AWS.ResourceGroupsTagging.GetTagKeys+        , Network.AWS.ResourceGroupsTagging.GetTagValues+        , Network.AWS.ResourceGroupsTagging.TagResources+        , Network.AWS.ResourceGroupsTagging.Types+        , Network.AWS.ResourceGroupsTagging.UntagResources+        , Network.AWS.ResourceGroupsTagging.Waiters++    other-modules:+          Network.AWS.ResourceGroupsTagging.Types.Product+        , Network.AWS.ResourceGroupsTagging.Types.Sum++    build-depends:+          amazonka-core == 1.5.0.*+        , base          >= 4.7     && < 5++test-suite amazonka-resourcegroupstagging-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.ResourceGroupsTagging+        , Test.AWS.Gen.ResourceGroupsTagging+        , Test.AWS.ResourceGroupsTagging.Internal++    build-depends:+          amazonka-core == 1.5.0.*+        , amazonka-test == 1.5.0.*+        , amazonka-resourcegroupstagging+        , base+        , bytestring+        , tasty+        , tasty-hunit+        , text+        , time+        , unordered-containers
+ fixture/GetResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/tagging/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  tagging.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/GetResourcesResponse.proto view
+ fixture/GetTagKeys.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/tagging/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  tagging.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/GetTagKeysResponse.proto view
+ fixture/GetTagValues.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/tagging/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  tagging.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/GetTagValuesResponse.proto view
+ fixture/TagResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/tagging/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  tagging.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/TagResourcesResponse.proto view
+ fixture/UntagResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/tagging/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  tagging.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/UntagResourcesResponse.proto view
+ gen/Network/AWS/ResourceGroupsTagging.hs view
@@ -0,0 +1,146 @@+{-# 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.ResourceGroupsTagging+-- Copyright   : (c) 2013-2017 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)+--+-- __Resource Groups Tagging API__+--+-- This guide describes the API operations for the resource groups tagging.+--+-- A tag is a label that you assign to an AWS resource. A tag consists of a key and a value, both of which you define. For example, if you have two Amazon EC2 instances, you might assign both a tag key of "Stack." But the value of "Stack" might be "Testing" for one and "Production" for the other.+--+-- Tagging can help you organize your resources and enables you to simplify resource management, access management and cost allocation. For more information about tagging, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html Working with Tag Editor> and <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/resource-groups.html Working with Resource Groups> . For more information about permissions you need to use the resource groups tagging APIs, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-resource-groups.html Obtaining Permissions for Resource Groups > and <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html Obtaining Permissions for Tagging > .+--+-- You can use the resource groups tagging APIs to complete the following tasks:+--+--     * Tag and untag supported resources located in the specified region for the AWS account+--+--     * Use tag-based filters to search for resources located in the specified region for the AWS account+--+--     * List all existing tag keys in the specified region for the AWS account+--+--     * List all existing values for the specified key in the specified region for the AWS account+--+--+--+-- Not all resources can have tags. For a lists of resources that you can tag, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/supported-resources.html Supported Resources> in the /AWS Resource Groups and Tag Editor User Guide/ .+--+-- To make full use of the resource groups tagging APIs, you might need additional IAM permissions, including permission to access the resources of individual services as well as permission to view and apply tags to those resources. For more information, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html Obtaining Permissions for Tagging> in the /AWS Resource Groups and Tag Editor User Guide/ .+--+module Network.AWS.ResourceGroupsTagging+    (+    -- * Service Configuration+      resourceGroupsTagging++    -- * Errors+    -- $errors++    -- ** InvalidParameterException+    , _InvalidParameterException++    -- ** ThrottledException+    , _ThrottledException++    -- ** PaginationTokenExpiredException+    , _PaginationTokenExpiredException++    -- ** InternalServiceException+    , _InternalServiceException++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** GetTagKeys (Paginated)+    , module Network.AWS.ResourceGroupsTagging.GetTagKeys++    -- ** TagResources+    , module Network.AWS.ResourceGroupsTagging.TagResources++    -- ** GetTagValues (Paginated)+    , module Network.AWS.ResourceGroupsTagging.GetTagValues++    -- ** GetResources (Paginated)+    , module Network.AWS.ResourceGroupsTagging.GetResources++    -- ** UntagResources+    , module Network.AWS.ResourceGroupsTagging.UntagResources++    -- * Types++    -- ** ResourceErrorCode+    , ResourceErrorCode (..)++    -- ** FailureInfo+    , FailureInfo+    , failureInfo+    , fiErrorCode+    , fiErrorMessage+    , fiStatusCode++    -- ** ResourceTagMapping+    , ResourceTagMapping+    , resourceTagMapping+    , rtmResourceARN+    , rtmTags++    -- ** Tag+    , Tag+    , tag+    , tagKey+    , tagValue++    -- ** TagFilter+    , TagFilter+    , tagFilter+    , tfValues+    , tfKey+    ) where++import Network.AWS.ResourceGroupsTagging.GetResources+import Network.AWS.ResourceGroupsTagging.GetTagKeys+import Network.AWS.ResourceGroupsTagging.GetTagValues+import Network.AWS.ResourceGroupsTagging.TagResources+import Network.AWS.ResourceGroupsTagging.Types+import Network.AWS.ResourceGroupsTagging.UntagResources+import Network.AWS.ResourceGroupsTagging.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 'ResourceGroupsTagging'.+-}++{- $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/ResourceGroupsTagging/GetResources.hs view
@@ -0,0 +1,200 @@+{-# 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.ResourceGroupsTagging.GetResources+-- Copyright   : (c) 2013-2017 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 all the tagged resources that are associated with the specified tags (keys and values) located in the specified region for the AWS account. The tags and the resource types that you specify in the request are known as /filters/ . The response includes all tags that are associated with the requested resources. If no filter is provided, this action returns a paginated resource list with the associated tags.+--+--+--+-- This operation returns paginated results.+module Network.AWS.ResourceGroupsTagging.GetResources+    (+    -- * Creating a Request+      getResources+    , GetResources+    -- * Request Lenses+    , grPaginationToken+    , grResourcesPerPage+    , grResourceTypeFilters+    , grTagFilters+    , grTagsPerPage++    -- * Destructuring the Response+    , getResourcesResponse+    , GetResourcesResponse+    -- * Response Lenses+    , grrsPaginationToken+    , grrsResourceTagMappingList+    , grrsResponseStatus+    ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.ResourceGroupsTagging.Types+import Network.AWS.ResourceGroupsTagging.Types.Product+import Network.AWS.Response++-- | /See:/ 'getResources' smart constructor.+data GetResources = GetResources'+  { _grPaginationToken     :: !(Maybe Text)+  , _grResourcesPerPage    :: !(Maybe Int)+  , _grResourceTypeFilters :: !(Maybe [Text])+  , _grTagFilters          :: !(Maybe [TagFilter])+  , _grTagsPerPage         :: !(Maybe Int)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetResources' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grPaginationToken' - A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a @PaginationToken@ , use that string for this value to request an additional page of data.+--+-- * 'grResourcesPerPage' - A limit that restricts the number of resources returned by GetResources in paginated output. You can set ResourcesPerPage to a minimum of 1 item and the maximum of 50 items.+--+-- * 'grResourceTypeFilters' - The constraints on the resources that you want returned. The format of each resource type is @service[:resourceType]@ . For example, specifying a resource type of @ec2@ returns all tagged Amazon EC2 resources (which includes tagged EC2 instances). Specifying a resource type of @ec2:instance@ returns only EC2 instances.  The string for each service name and resource type is the same as that embedded in a resource's Amazon Resource Name (ARN). Consult the /AWS General Reference/ for the following:     * For a list of service name strings, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> .     * For resource type strings, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax Example ARNs> .     * For more information about ARNs, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces> .+--+-- * 'grTagFilters' - A list of tags (keys and values). A request can include up to 50 keys, and each key can include up to 20 values. If you specify multiple filters connected by an AND operator in a single request, the response returns only those resources that are associated with every specified filter. If you specify multiple filters connected by an OR operator in a single request, the response returns all resources that are associated with at least one or possibly more of the specified filters.+--+-- * 'grTagsPerPage' - A limit that restricts the number of tags (key and value pairs) returned by GetResources in paginated output. A resource with no tags is counted as having one tag (one key and value pair). @GetResources@ does not split a resource and its associated tags across pages. If the specified @TagsPerPage@ would cause such a break, a @PaginationToken@ is returned in place of the affected resource and its tags. Use that token in another request to get the remaining data. For example, if you specify a @TagsPerPage@ of @100@ and the account has 22 resources with 10 tags each (meaning that each resource has 10 key and value pairs), the output will consist of 3 pages, with the first page displaying the first 10 resources, each with its 10 tags, the second page displaying the next 10 resources each with its 10 tags, and the third page displaying the remaining 2 resources, each with its 10 tags. You can set @TagsPerPage@ to a minimum of 100 items and the maximum of 500 items.+getResources+    :: GetResources+getResources =+  GetResources'+  { _grPaginationToken = Nothing+  , _grResourcesPerPage = Nothing+  , _grResourceTypeFilters = Nothing+  , _grTagFilters = Nothing+  , _grTagsPerPage = Nothing+  }+++-- | A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a @PaginationToken@ , use that string for this value to request an additional page of data.+grPaginationToken :: Lens' GetResources (Maybe Text)+grPaginationToken = lens _grPaginationToken (\ s a -> s{_grPaginationToken = a});++-- | A limit that restricts the number of resources returned by GetResources in paginated output. You can set ResourcesPerPage to a minimum of 1 item and the maximum of 50 items.+grResourcesPerPage :: Lens' GetResources (Maybe Int)+grResourcesPerPage = lens _grResourcesPerPage (\ s a -> s{_grResourcesPerPage = a});++-- | The constraints on the resources that you want returned. The format of each resource type is @service[:resourceType]@ . For example, specifying a resource type of @ec2@ returns all tagged Amazon EC2 resources (which includes tagged EC2 instances). Specifying a resource type of @ec2:instance@ returns only EC2 instances.  The string for each service name and resource type is the same as that embedded in a resource's Amazon Resource Name (ARN). Consult the /AWS General Reference/ for the following:     * For a list of service name strings, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> .     * For resource type strings, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax Example ARNs> .     * For more information about ARNs, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces> .+grResourceTypeFilters :: Lens' GetResources [Text]+grResourceTypeFilters = lens _grResourceTypeFilters (\ s a -> s{_grResourceTypeFilters = a}) . _Default . _Coerce;++-- | A list of tags (keys and values). A request can include up to 50 keys, and each key can include up to 20 values. If you specify multiple filters connected by an AND operator in a single request, the response returns only those resources that are associated with every specified filter. If you specify multiple filters connected by an OR operator in a single request, the response returns all resources that are associated with at least one or possibly more of the specified filters.+grTagFilters :: Lens' GetResources [TagFilter]+grTagFilters = lens _grTagFilters (\ s a -> s{_grTagFilters = a}) . _Default . _Coerce;++-- | A limit that restricts the number of tags (key and value pairs) returned by GetResources in paginated output. A resource with no tags is counted as having one tag (one key and value pair). @GetResources@ does not split a resource and its associated tags across pages. If the specified @TagsPerPage@ would cause such a break, a @PaginationToken@ is returned in place of the affected resource and its tags. Use that token in another request to get the remaining data. For example, if you specify a @TagsPerPage@ of @100@ and the account has 22 resources with 10 tags each (meaning that each resource has 10 key and value pairs), the output will consist of 3 pages, with the first page displaying the first 10 resources, each with its 10 tags, the second page displaying the next 10 resources each with its 10 tags, and the third page displaying the remaining 2 resources, each with its 10 tags. You can set @TagsPerPage@ to a minimum of 100 items and the maximum of 500 items.+grTagsPerPage :: Lens' GetResources (Maybe Int)+grTagsPerPage = lens _grTagsPerPage (\ s a -> s{_grTagsPerPage = a});++instance AWSPager GetResources where+        page rq rs+          | stop (rs ^. grrsPaginationToken) = Nothing+          | stop (rs ^. grrsResourceTagMappingList) = Nothing+          | otherwise =+            Just $ rq &+              grPaginationToken .~ rs ^. grrsPaginationToken++instance AWSRequest GetResources where+        type Rs GetResources = GetResourcesResponse+        request = postJSON resourceGroupsTagging+        response+          = receiveJSON+              (\ s h x ->+                 GetResourcesResponse' <$>+                   (x .?> "PaginationToken") <*>+                     (x .?> "ResourceTagMappingList" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable GetResources where++instance NFData GetResources where++instance ToHeaders GetResources where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("ResourceGroupsTaggingAPI_20170126.GetResources" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetResources where+        toJSON GetResources'{..}+          = object+              (catMaybes+                 [("PaginationToken" .=) <$> _grPaginationToken,+                  ("ResourcesPerPage" .=) <$> _grResourcesPerPage,+                  ("ResourceTypeFilters" .=) <$>+                    _grResourceTypeFilters,+                  ("TagFilters" .=) <$> _grTagFilters,+                  ("TagsPerPage" .=) <$> _grTagsPerPage])++instance ToPath GetResources where+        toPath = const "/"++instance ToQuery GetResources where+        toQuery = const mempty++-- | /See:/ 'getResourcesResponse' smart constructor.+data GetResourcesResponse = GetResourcesResponse'+  { _grrsPaginationToken        :: !(Maybe Text)+  , _grrsResourceTagMappingList :: !(Maybe [ResourceTagMapping])+  , _grrsResponseStatus         :: !Int+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetResourcesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'grrsPaginationToken' - A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the @PaginationToken@ value in a subsequent request.+--+-- * 'grrsResourceTagMappingList' - A list of resource ARNs and the tags (keys and values) associated with each.+--+-- * 'grrsResponseStatus' - -- | The response status code.+getResourcesResponse+    :: Int -- ^ 'grrsResponseStatus'+    -> GetResourcesResponse+getResourcesResponse pResponseStatus_ =+  GetResourcesResponse'+  { _grrsPaginationToken = Nothing+  , _grrsResourceTagMappingList = Nothing+  , _grrsResponseStatus = pResponseStatus_+  }+++-- | A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the @PaginationToken@ value in a subsequent request.+grrsPaginationToken :: Lens' GetResourcesResponse (Maybe Text)+grrsPaginationToken = lens _grrsPaginationToken (\ s a -> s{_grrsPaginationToken = a});++-- | A list of resource ARNs and the tags (keys and values) associated with each.+grrsResourceTagMappingList :: Lens' GetResourcesResponse [ResourceTagMapping]+grrsResourceTagMappingList = lens _grrsResourceTagMappingList (\ s a -> s{_grrsResourceTagMappingList = a}) . _Default . _Coerce;++-- | -- | The response status code.+grrsResponseStatus :: Lens' GetResourcesResponse Int+grrsResponseStatus = lens _grrsResponseStatus (\ s a -> s{_grrsResponseStatus = a});++instance NFData GetResourcesResponse where
+ gen/Network/AWS/ResourceGroupsTagging/GetTagKeys.hs view
@@ -0,0 +1,156 @@+{-# 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.ResourceGroupsTagging.GetTagKeys+-- Copyright   : (c) 2013-2017 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 all tag keys in the specified region for the AWS account.+--+--+--+-- This operation returns paginated results.+module Network.AWS.ResourceGroupsTagging.GetTagKeys+    (+    -- * Creating a Request+      getTagKeys+    , GetTagKeys+    -- * Request Lenses+    , gtkPaginationToken++    -- * Destructuring the Response+    , getTagKeysResponse+    , GetTagKeysResponse+    -- * Response Lenses+    , gtkrsPaginationToken+    , gtkrsTagKeys+    , gtkrsResponseStatus+    ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.ResourceGroupsTagging.Types+import Network.AWS.ResourceGroupsTagging.Types.Product+import Network.AWS.Response++-- | /See:/ 'getTagKeys' smart constructor.+newtype GetTagKeys = GetTagKeys'+  { _gtkPaginationToken :: Maybe Text+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetTagKeys' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtkPaginationToken' - A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.+getTagKeys+    :: GetTagKeys+getTagKeys = GetTagKeys' {_gtkPaginationToken = Nothing}+++-- | A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.+gtkPaginationToken :: Lens' GetTagKeys (Maybe Text)+gtkPaginationToken = lens _gtkPaginationToken (\ s a -> s{_gtkPaginationToken = a});++instance AWSPager GetTagKeys where+        page rq rs+          | stop (rs ^. gtkrsPaginationToken) = Nothing+          | stop (rs ^. gtkrsTagKeys) = Nothing+          | otherwise =+            Just $ rq &+              gtkPaginationToken .~ rs ^. gtkrsPaginationToken++instance AWSRequest GetTagKeys where+        type Rs GetTagKeys = GetTagKeysResponse+        request = postJSON resourceGroupsTagging+        response+          = receiveJSON+              (\ s h x ->+                 GetTagKeysResponse' <$>+                   (x .?> "PaginationToken") <*>+                     (x .?> "TagKeys" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable GetTagKeys where++instance NFData GetTagKeys where++instance ToHeaders GetTagKeys where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("ResourceGroupsTaggingAPI_20170126.GetTagKeys" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetTagKeys where+        toJSON GetTagKeys'{..}+          = object+              (catMaybes+                 [("PaginationToken" .=) <$> _gtkPaginationToken])++instance ToPath GetTagKeys where+        toPath = const "/"++instance ToQuery GetTagKeys where+        toQuery = const mempty++-- | /See:/ 'getTagKeysResponse' smart constructor.+data GetTagKeysResponse = GetTagKeysResponse'+  { _gtkrsPaginationToken :: !(Maybe Text)+  , _gtkrsTagKeys         :: !(Maybe [Text])+  , _gtkrsResponseStatus  :: !Int+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetTagKeysResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtkrsPaginationToken' - A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the @PaginationToken@ value in a subsequent request.+--+-- * 'gtkrsTagKeys' - A list of all tag keys in the AWS account.+--+-- * 'gtkrsResponseStatus' - -- | The response status code.+getTagKeysResponse+    :: Int -- ^ 'gtkrsResponseStatus'+    -> GetTagKeysResponse+getTagKeysResponse pResponseStatus_ =+  GetTagKeysResponse'+  { _gtkrsPaginationToken = Nothing+  , _gtkrsTagKeys = Nothing+  , _gtkrsResponseStatus = pResponseStatus_+  }+++-- | A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the @PaginationToken@ value in a subsequent request.+gtkrsPaginationToken :: Lens' GetTagKeysResponse (Maybe Text)+gtkrsPaginationToken = lens _gtkrsPaginationToken (\ s a -> s{_gtkrsPaginationToken = a});++-- | A list of all tag keys in the AWS account.+gtkrsTagKeys :: Lens' GetTagKeysResponse [Text]+gtkrsTagKeys = lens _gtkrsTagKeys (\ s a -> s{_gtkrsTagKeys = a}) . _Default . _Coerce;++-- | -- | The response status code.+gtkrsResponseStatus :: Lens' GetTagKeysResponse Int+gtkrsResponseStatus = lens _gtkrsResponseStatus (\ s a -> s{_gtkrsResponseStatus = a});++instance NFData GetTagKeysResponse where
+ gen/Network/AWS/ResourceGroupsTagging/GetTagValues.hs view
@@ -0,0 +1,167 @@+{-# 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.ResourceGroupsTagging.GetTagValues+-- Copyright   : (c) 2013-2017 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 all tag values for the specified key in the specified region for the AWS account.+--+--+--+-- This operation returns paginated results.+module Network.AWS.ResourceGroupsTagging.GetTagValues+    (+    -- * Creating a Request+      getTagValues+    , GetTagValues+    -- * Request Lenses+    , gtvPaginationToken+    , gtvKey++    -- * Destructuring the Response+    , getTagValuesResponse+    , GetTagValuesResponse+    -- * Response Lenses+    , gtvrsPaginationToken+    , gtvrsTagValues+    , gtvrsResponseStatus+    ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.ResourceGroupsTagging.Types+import Network.AWS.ResourceGroupsTagging.Types.Product+import Network.AWS.Response++-- | /See:/ 'getTagValues' smart constructor.+data GetTagValues = GetTagValues'+  { _gtvPaginationToken :: !(Maybe Text)+  , _gtvKey             :: !Text+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetTagValues' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtvPaginationToken' - A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.+--+-- * 'gtvKey' - The key for which you want to list all existing values in the specified region for the AWS account.+getTagValues+    :: Text -- ^ 'gtvKey'+    -> GetTagValues+getTagValues pKey_ =+  GetTagValues' {_gtvPaginationToken = Nothing, _gtvKey = pKey_}+++-- | A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data.+gtvPaginationToken :: Lens' GetTagValues (Maybe Text)+gtvPaginationToken = lens _gtvPaginationToken (\ s a -> s{_gtvPaginationToken = a});++-- | The key for which you want to list all existing values in the specified region for the AWS account.+gtvKey :: Lens' GetTagValues Text+gtvKey = lens _gtvKey (\ s a -> s{_gtvKey = a});++instance AWSPager GetTagValues where+        page rq rs+          | stop (rs ^. gtvrsPaginationToken) = Nothing+          | stop (rs ^. gtvrsTagValues) = Nothing+          | otherwise =+            Just $ rq &+              gtvPaginationToken .~ rs ^. gtvrsPaginationToken++instance AWSRequest GetTagValues where+        type Rs GetTagValues = GetTagValuesResponse+        request = postJSON resourceGroupsTagging+        response+          = receiveJSON+              (\ s h x ->+                 GetTagValuesResponse' <$>+                   (x .?> "PaginationToken") <*>+                     (x .?> "TagValues" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable GetTagValues where++instance NFData GetTagValues where++instance ToHeaders GetTagValues where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("ResourceGroupsTaggingAPI_20170126.GetTagValues" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetTagValues where+        toJSON GetTagValues'{..}+          = object+              (catMaybes+                 [("PaginationToken" .=) <$> _gtvPaginationToken,+                  Just ("Key" .= _gtvKey)])++instance ToPath GetTagValues where+        toPath = const "/"++instance ToQuery GetTagValues where+        toQuery = const mempty++-- | /See:/ 'getTagValuesResponse' smart constructor.+data GetTagValuesResponse = GetTagValuesResponse'+  { _gtvrsPaginationToken :: !(Maybe Text)+  , _gtvrsTagValues       :: !(Maybe [Text])+  , _gtvrsResponseStatus  :: !Int+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetTagValuesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtvrsPaginationToken' - A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the @PaginationToken@ value in a subsequent request.+--+-- * 'gtvrsTagValues' - A list of all tag values for the specified key in the AWS account.+--+-- * 'gtvrsResponseStatus' - -- | The response status code.+getTagValuesResponse+    :: Int -- ^ 'gtvrsResponseStatus'+    -> GetTagValuesResponse+getTagValuesResponse pResponseStatus_ =+  GetTagValuesResponse'+  { _gtvrsPaginationToken = Nothing+  , _gtvrsTagValues = Nothing+  , _gtvrsResponseStatus = pResponseStatus_+  }+++-- | A string that indicates that the response contains more data than can be returned in a single response. To receive additional data, specify this string for the @PaginationToken@ value in a subsequent request.+gtvrsPaginationToken :: Lens' GetTagValuesResponse (Maybe Text)+gtvrsPaginationToken = lens _gtvrsPaginationToken (\ s a -> s{_gtvrsPaginationToken = a});++-- | A list of all tag values for the specified key in the AWS account.+gtvrsTagValues :: Lens' GetTagValuesResponse [Text]+gtvrsTagValues = lens _gtvrsTagValues (\ s a -> s{_gtvrsTagValues = a}) . _Default . _Coerce;++-- | -- | The response status code.+gtvrsResponseStatus :: Lens' GetTagValuesResponse Int+gtvrsResponseStatus = lens _gtvrsResponseStatus (\ s a -> s{_gtvrsResponseStatus = a});++instance NFData GetTagValuesResponse where
+ gen/Network/AWS/ResourceGroupsTagging/TagResources.hs view
@@ -0,0 +1,155 @@+{-# 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.ResourceGroupsTagging.TagResources+-- Copyright   : (c) 2013-2017 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)+--+-- Applies one or more tags to the specified resources. Note the following:+--+--+--     * Not all resources can have tags. For a list of resources that support tagging, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/supported-resources.html Supported Resources> in the /AWS Resource Groups and Tag Editor User Guide/ .+--+--     * Each resource can have up to 50 tags. For other limits, see <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-restrictions Tag Restrictions> in the /Amazon EC2 User Guide for Linux Instances/ .+--+--     * You can only tag resources that are located in the specified region for the AWS account.+--+--     * To add tags to a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for adding tags. For more information, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html Obtaining Permissions for Tagging> in the /AWS Resource Groups and Tag Editor User Guide/ .+--+--+--+module Network.AWS.ResourceGroupsTagging.TagResources+    (+    -- * Creating a Request+      tagResources+    , TagResources+    -- * Request Lenses+    , trResourceARNList+    , trTags++    -- * Destructuring the Response+    , tagResourcesResponse+    , TagResourcesResponse+    -- * Response Lenses+    , trrsFailedResourcesMap+    , trrsResponseStatus+    ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.ResourceGroupsTagging.Types+import Network.AWS.ResourceGroupsTagging.Types.Product+import Network.AWS.Response++-- | /See:/ 'tagResources' smart constructor.+data TagResources = TagResources'+  { _trResourceARNList :: !(List1 Text)+  , _trTags            :: !(Map Text Text)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TagResources' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trResourceARNList' - A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to tag. An ARN can be set to a maximum of 1600 characters. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces> in the /AWS General Reference/ .+--+-- * 'trTags' - The tags that you want to add to the specified resources. A tag consists of a key and a value that you define.+tagResources+    :: NonEmpty Text -- ^ 'trResourceARNList'+    -> TagResources+tagResources pResourceARNList_ =+  TagResources'+  {_trResourceARNList = _List1 # pResourceARNList_, _trTags = mempty}+++-- | A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to tag. An ARN can be set to a maximum of 1600 characters. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces> in the /AWS General Reference/ .+trResourceARNList :: Lens' TagResources (NonEmpty Text)+trResourceARNList = lens _trResourceARNList (\ s a -> s{_trResourceARNList = a}) . _List1;++-- | The tags that you want to add to the specified resources. A tag consists of a key and a value that you define.+trTags :: Lens' TagResources (HashMap Text Text)+trTags = lens _trTags (\ s a -> s{_trTags = a}) . _Map;++instance AWSRequest TagResources where+        type Rs TagResources = TagResourcesResponse+        request = postJSON resourceGroupsTagging+        response+          = receiveJSON+              (\ s h x ->+                 TagResourcesResponse' <$>+                   (x .?> "FailedResourcesMap" .!@ mempty) <*>+                     (pure (fromEnum s)))++instance Hashable TagResources where++instance NFData TagResources where++instance ToHeaders TagResources where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("ResourceGroupsTaggingAPI_20170126.TagResources" ::+                       ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON TagResources where+        toJSON TagResources'{..}+          = object+              (catMaybes+                 [Just ("ResourceARNList" .= _trResourceARNList),+                  Just ("Tags" .= _trTags)])++instance ToPath TagResources where+        toPath = const "/"++instance ToQuery TagResources where+        toQuery = const mempty++-- | /See:/ 'tagResourcesResponse' smart constructor.+data TagResourcesResponse = TagResourcesResponse'+  { _trrsFailedResourcesMap :: !(Maybe (Map Text FailureInfo))+  , _trrsResponseStatus     :: !Int+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TagResourcesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trrsFailedResourcesMap' - Details of resources that could not be tagged. An error code, status code, and error message are returned for each failed item.+--+-- * 'trrsResponseStatus' - -- | The response status code.+tagResourcesResponse+    :: Int -- ^ 'trrsResponseStatus'+    -> TagResourcesResponse+tagResourcesResponse pResponseStatus_ =+  TagResourcesResponse'+  {_trrsFailedResourcesMap = Nothing, _trrsResponseStatus = pResponseStatus_}+++-- | Details of resources that could not be tagged. An error code, status code, and error message are returned for each failed item.+trrsFailedResourcesMap :: Lens' TagResourcesResponse (HashMap Text FailureInfo)+trrsFailedResourcesMap = lens _trrsFailedResourcesMap (\ s a -> s{_trrsFailedResourcesMap = a}) . _Default . _Map;++-- | -- | The response status code.+trrsResponseStatus :: Lens' TagResourcesResponse Int+trrsResponseStatus = lens _trrsResponseStatus (\ s a -> s{_trrsResponseStatus = a});++instance NFData TagResourcesResponse where
+ gen/Network/AWS/ResourceGroupsTagging/Types.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.ResourceGroupsTagging.Types+-- Copyright   : (c) 2013-2017 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.ResourceGroupsTagging.Types+    (+    -- * Service Configuration+      resourceGroupsTagging++    -- * Errors+    , _InvalidParameterException+    , _ThrottledException+    , _PaginationTokenExpiredException+    , _InternalServiceException++    -- * ResourceErrorCode+    , ResourceErrorCode (..)++    -- * FailureInfo+    , FailureInfo+    , failureInfo+    , fiErrorCode+    , fiErrorMessage+    , fiStatusCode++    -- * ResourceTagMapping+    , ResourceTagMapping+    , resourceTagMapping+    , rtmResourceARN+    , rtmTags++    -- * Tag+    , Tag+    , tag+    , tagKey+    , tagValue++    -- * TagFilter+    , TagFilter+    , tagFilter+    , tfValues+    , tfKey+    ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.ResourceGroupsTagging.Types.Product+import Network.AWS.ResourceGroupsTagging.Types.Sum+import Network.AWS.Sign.V4++-- | API version @2017-01-26@ of the Amazon Resource Groups Tagging API SDK configuration.+resourceGroupsTagging :: Service+resourceGroupsTagging =+  Service+  { _svcAbbrev = "ResourceGroupsTagging"+  , _svcSigner = v4+  , _svcPrefix = "tagging"+  , _svcVersion = "2017-01-26"+  , _svcEndpoint = defaultEndpoint resourceGroupsTagging+  , _svcTimeout = Just 70+  , _svcCheck = statusSuccess+  , _svcError = parseJSONError "ResourceGroupsTagging"+  , _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 (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+++-- | A parameter is missing or a malformed string or invalid or out-of-range value was supplied for the request parameter.+--+--+_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidParameterException =+  _MatchServiceError resourceGroupsTagging "InvalidParameterException"+++-- | The request was denied to limit the frequency of submitted requests.+--+--+_ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError+_ThrottledException =+  _MatchServiceError resourceGroupsTagging "ThrottledException"+++-- | A @PaginationToken@ is valid for a maximum of 15 minutes. Your request was denied because the specified @PaginationToken@ has expired.+--+--+_PaginationTokenExpiredException :: AsError a => Getting (First ServiceError) a ServiceError+_PaginationTokenExpiredException =+  _MatchServiceError resourceGroupsTagging "PaginationTokenExpiredException"+++-- | The request processing failed because of an unknown error, exception, or failure. You can retry the request.+--+--+_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError+_InternalServiceException =+  _MatchServiceError resourceGroupsTagging "InternalServiceException"+
+ gen/Network/AWS/ResourceGroupsTagging/Types/Product.hs view
@@ -0,0 +1,200 @@+{-# 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.ResourceGroupsTagging.Types.Product+-- Copyright   : (c) 2013-2017 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.ResourceGroupsTagging.Types.Product where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.ResourceGroupsTagging.Types.Sum++-- | Details of the common errors that all actions return.+--+--+--+-- /See:/ 'failureInfo' smart constructor.+data FailureInfo = FailureInfo'+  { _fiErrorCode    :: !(Maybe ResourceErrorCode)+  , _fiErrorMessage :: !(Maybe Text)+  , _fiStatusCode   :: !(Maybe Int)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'FailureInfo' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'fiErrorCode' - The code of the common error. Valid values include @InternalServiceException@ , @InvalidParameterException@ , and any valid error code returned by the AWS service that hosts the resource that you want to tag.+--+-- * 'fiErrorMessage' - The message of the common error.+--+-- * 'fiStatusCode' - The HTTP status code of the common error.+failureInfo+    :: FailureInfo+failureInfo =+  FailureInfo'+  {_fiErrorCode = Nothing, _fiErrorMessage = Nothing, _fiStatusCode = Nothing}+++-- | The code of the common error. Valid values include @InternalServiceException@ , @InvalidParameterException@ , and any valid error code returned by the AWS service that hosts the resource that you want to tag.+fiErrorCode :: Lens' FailureInfo (Maybe ResourceErrorCode)+fiErrorCode = lens _fiErrorCode (\ s a -> s{_fiErrorCode = a});++-- | The message of the common error.+fiErrorMessage :: Lens' FailureInfo (Maybe Text)+fiErrorMessage = lens _fiErrorMessage (\ s a -> s{_fiErrorMessage = a});++-- | The HTTP status code of the common error.+fiStatusCode :: Lens' FailureInfo (Maybe Int)+fiStatusCode = lens _fiStatusCode (\ s a -> s{_fiStatusCode = a});++instance FromJSON FailureInfo where+        parseJSON+          = withObject "FailureInfo"+              (\ x ->+                 FailureInfo' <$>+                   (x .:? "ErrorCode") <*> (x .:? "ErrorMessage") <*>+                     (x .:? "StatusCode"))++instance Hashable FailureInfo where++instance NFData FailureInfo where++-- | A list of resource ARNs and the tags (keys and values) that are associated with each.+--+--+--+-- /See:/ 'resourceTagMapping' smart constructor.+data ResourceTagMapping = ResourceTagMapping'+  { _rtmResourceARN :: !(Maybe Text)+  , _rtmTags        :: !(Maybe [Tag])+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ResourceTagMapping' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rtmResourceARN' - An array of resource ARN(s).+--+-- * 'rtmTags' - The tags that have been applied to one or more AWS resources.+resourceTagMapping+    :: ResourceTagMapping+resourceTagMapping =+  ResourceTagMapping' {_rtmResourceARN = Nothing, _rtmTags = Nothing}+++-- | An array of resource ARN(s).+rtmResourceARN :: Lens' ResourceTagMapping (Maybe Text)+rtmResourceARN = lens _rtmResourceARN (\ s a -> s{_rtmResourceARN = a});++-- | The tags that have been applied to one or more AWS resources.+rtmTags :: Lens' ResourceTagMapping [Tag]+rtmTags = lens _rtmTags (\ s a -> s{_rtmTags = a}) . _Default . _Coerce;++instance FromJSON ResourceTagMapping where+        parseJSON+          = withObject "ResourceTagMapping"+              (\ x ->+                 ResourceTagMapping' <$>+                   (x .:? "ResourceARN") <*> (x .:? "Tags" .!= mempty))++instance Hashable ResourceTagMapping where++instance NFData ResourceTagMapping where++-- | The metadata that you apply to AWS resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information, see <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-basics Tag Basics> in the /Amazon EC2 User Guide for Linux Instances/ .+--+--+--+-- /See:/ 'tag' smart constructor.+data Tag = Tag'+  { _tagKey   :: !Text+  , _tagValue :: !Text+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Tag' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tagKey' - One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.+--+-- * 'tagValue' - The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).+tag+    :: Text -- ^ 'tagKey'+    -> Text -- ^ 'tagValue'+    -> Tag+tag pKey_ pValue_ = Tag' {_tagKey = pKey_, _tagValue = pValue_}+++-- | One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.+tagKey :: Lens' Tag Text+tagKey = lens _tagKey (\ s a -> s{_tagKey = a});++-- | The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).+tagValue :: Lens' Tag Text+tagValue = lens _tagValue (\ s a -> s{_tagValue = a});++instance FromJSON Tag where+        parseJSON+          = withObject "Tag"+              (\ x -> Tag' <$> (x .: "Key") <*> (x .: "Value"))++instance Hashable Tag where++instance NFData Tag where++-- | A list of tags (keys and values) that are used to specify the associated resources.+--+--+--+-- /See:/ 'tagFilter' smart constructor.+data TagFilter = TagFilter'+  { _tfValues :: !(Maybe [Text])+  , _tfKey    :: !(Maybe Text)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TagFilter' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tfValues' - The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).+--+-- * 'tfKey' - One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.+tagFilter+    :: TagFilter+tagFilter = TagFilter' {_tfValues = Nothing, _tfKey = Nothing}+++-- | The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).+tfValues :: Lens' TagFilter [Text]+tfValues = lens _tfValues (\ s a -> s{_tfValues = a}) . _Default . _Coerce;++-- | One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.+tfKey :: Lens' TagFilter (Maybe Text)+tfKey = lens _tfKey (\ s a -> s{_tfKey = a});++instance Hashable TagFilter where++instance NFData TagFilter where++instance ToJSON TagFilter where+        toJSON TagFilter'{..}+          = object+              (catMaybes+                 [("Values" .=) <$> _tfValues, ("Key" .=) <$> _tfKey])
+ gen/Network/AWS/ResourceGroupsTagging/Types/Sum.hs view
@@ -0,0 +1,47 @@+{-# 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.ResourceGroupsTagging.Types.Sum+-- Copyright   : (c) 2013-2017 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.ResourceGroupsTagging.Types.Sum where++import Network.AWS.Prelude++data ResourceErrorCode+  = InternalServiceException+  | InvalidParameterException+  deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ResourceErrorCode where+    parser = takeLowerText >>= \case+        "internalserviceexception" -> pure InternalServiceException+        "invalidparameterexception" -> pure InvalidParameterException+        e -> fromTextError $ "Failure parsing ResourceErrorCode from value: '" <> e+           <> "'. Accepted values: internalserviceexception, invalidparameterexception"++instance ToText ResourceErrorCode where+    toText = \case+        InternalServiceException -> "InternalServiceException"+        InvalidParameterException -> "InvalidParameterException"++instance Hashable     ResourceErrorCode+instance NFData       ResourceErrorCode+instance ToByteString ResourceErrorCode+instance ToQuery      ResourceErrorCode+instance ToHeader     ResourceErrorCode++instance FromJSON ResourceErrorCode where+    parseJSON = parseJSONText "ResourceErrorCode"
+ gen/Network/AWS/ResourceGroupsTagging/UntagResources.hs view
@@ -0,0 +1,154 @@+{-# 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.ResourceGroupsTagging.UntagResources+-- Copyright   : (c) 2013-2017 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)+--+-- Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:+--+--+--     * To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see <http://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/obtaining-permissions-for-tagging.html Obtaining Permissions for Tagging> in the /AWS Resource Groups and Tag Editor User Guide/ .+--+--     * You can only tag resources that are located in the specified region for the AWS account.+--+--+--+module Network.AWS.ResourceGroupsTagging.UntagResources+    (+    -- * Creating a Request+      untagResources+    , UntagResources+    -- * Request Lenses+    , urResourceARNList+    , urTagKeys++    -- * Destructuring the Response+    , untagResourcesResponse+    , UntagResourcesResponse+    -- * Response Lenses+    , urrsFailedResourcesMap+    , urrsResponseStatus+    ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.ResourceGroupsTagging.Types+import Network.AWS.ResourceGroupsTagging.Types.Product+import Network.AWS.Response++-- | /See:/ 'untagResources' smart constructor.+data UntagResources = UntagResources'+  { _urResourceARNList :: !(List1 Text)+  , _urTagKeys         :: !(List1 Text)+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UntagResources' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urResourceARNList' - A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to untag. An ARN can be set to a maximum of 1600 characters. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces> in the /AWS General Reference/ .+--+-- * 'urTagKeys' - A list of the tag keys that you want to remove from the specified resources.+untagResources+    :: NonEmpty Text -- ^ 'urResourceARNList'+    -> NonEmpty Text -- ^ 'urTagKeys'+    -> UntagResources+untagResources pResourceARNList_ pTagKeys_ =+  UntagResources'+  { _urResourceARNList = _List1 # pResourceARNList_+  , _urTagKeys = _List1 # pTagKeys_+  }+++-- | A list of ARNs. An ARN (Amazon Resource Name) uniquely identifies a resource. You can specify a minimum of 1 and a maximum of 20 ARNs (resources) to untag. An ARN can be set to a maximum of 1600 characters. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs) and AWS Service Namespaces> in the /AWS General Reference/ .+urResourceARNList :: Lens' UntagResources (NonEmpty Text)+urResourceARNList = lens _urResourceARNList (\ s a -> s{_urResourceARNList = a}) . _List1;++-- | A list of the tag keys that you want to remove from the specified resources.+urTagKeys :: Lens' UntagResources (NonEmpty Text)+urTagKeys = lens _urTagKeys (\ s a -> s{_urTagKeys = a}) . _List1;++instance AWSRequest UntagResources where+        type Rs UntagResources = UntagResourcesResponse+        request = postJSON resourceGroupsTagging+        response+          = receiveJSON+              (\ s h x ->+                 UntagResourcesResponse' <$>+                   (x .?> "FailedResourcesMap" .!@ mempty) <*>+                     (pure (fromEnum s)))++instance Hashable UntagResources where++instance NFData UntagResources where++instance ToHeaders UntagResources where+        toHeaders+          = const+              (mconcat+                 ["X-Amz-Target" =#+                    ("ResourceGroupsTaggingAPI_20170126.UntagResources"+                       :: ByteString),+                  "Content-Type" =#+                    ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UntagResources where+        toJSON UntagResources'{..}+          = object+              (catMaybes+                 [Just ("ResourceARNList" .= _urResourceARNList),+                  Just ("TagKeys" .= _urTagKeys)])++instance ToPath UntagResources where+        toPath = const "/"++instance ToQuery UntagResources where+        toQuery = const mempty++-- | /See:/ 'untagResourcesResponse' smart constructor.+data UntagResourcesResponse = UntagResourcesResponse'+  { _urrsFailedResourcesMap :: !(Maybe (Map Text FailureInfo))+  , _urrsResponseStatus     :: !Int+  } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UntagResourcesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urrsFailedResourcesMap' - Details of resources that could not be untagged. An error code, status code, and error message are returned for each failed item.+--+-- * 'urrsResponseStatus' - -- | The response status code.+untagResourcesResponse+    :: Int -- ^ 'urrsResponseStatus'+    -> UntagResourcesResponse+untagResourcesResponse pResponseStatus_ =+  UntagResourcesResponse'+  {_urrsFailedResourcesMap = Nothing, _urrsResponseStatus = pResponseStatus_}+++-- | Details of resources that could not be untagged. An error code, status code, and error message are returned for each failed item.+urrsFailedResourcesMap :: Lens' UntagResourcesResponse (HashMap Text FailureInfo)+urrsFailedResourcesMap = lens _urrsFailedResourcesMap (\ s a -> s{_urrsFailedResourcesMap = a}) . _Default . _Map;++-- | -- | The response status code.+urrsResponseStatus :: Lens' UntagResourcesResponse Int+urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a});++instance NFData UntagResourcesResponse where
+ gen/Network/AWS/ResourceGroupsTagging/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.ResourceGroupsTagging.Waiters+-- Copyright   : (c) 2013-2017 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.ResourceGroupsTagging.Waiters where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.ResourceGroupsTagging.Types+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-2017 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.ResourceGroupsTagging+import Test.AWS.ResourceGroupsTagging.Internal++main :: IO ()+main = defaultMain $ testGroup "ResourceGroupsTagging"+    [ testGroup "tests"    tests+    , testGroup "fixtures" fixtures+    ]
+ test/Test/AWS/Gen/ResourceGroupsTagging.hs view
@@ -0,0 +1,129 @@+{-# 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.ResourceGroupsTagging+-- Copyright   : (c) 2013-2017 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.ResourceGroupsTagging where++import Data.Proxy+import Network.AWS.ResourceGroupsTagging+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.AWS.ResourceGroupsTagging.Internal+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestGetTagKeys $+--             getTagKeys+--+--         , requestTagResources $+--             tagResources+--+--         , requestGetTagValues $+--             getTagValues+--+--         , requestGetResources $+--             getResources+--+--         , requestUntagResources $+--             untagResources+--+--           ]++--     , testGroup "response"+--         [ responseGetTagKeys $+--             getTagKeysResponse+--+--         , responseTagResources $+--             tagResourcesResponse+--+--         , responseGetTagValues $+--             getTagValuesResponse+--+--         , responseGetResources $+--             getResourcesResponse+--+--         , responseUntagResources $+--             untagResourcesResponse+--+--           ]+--     ]++-- Requests++requestGetTagKeys :: GetTagKeys -> TestTree+requestGetTagKeys = req+    "GetTagKeys"+    "fixture/GetTagKeys.yaml"++requestTagResources :: TagResources -> TestTree+requestTagResources = req+    "TagResources"+    "fixture/TagResources.yaml"++requestGetTagValues :: GetTagValues -> TestTree+requestGetTagValues = req+    "GetTagValues"+    "fixture/GetTagValues.yaml"++requestGetResources :: GetResources -> TestTree+requestGetResources = req+    "GetResources"+    "fixture/GetResources.yaml"++requestUntagResources :: UntagResources -> TestTree+requestUntagResources = req+    "UntagResources"+    "fixture/UntagResources.yaml"++-- Responses++responseGetTagKeys :: GetTagKeysResponse -> TestTree+responseGetTagKeys = res+    "GetTagKeysResponse"+    "fixture/GetTagKeysResponse.proto"+    resourceGroupsTagging+    (Proxy :: Proxy GetTagKeys)++responseTagResources :: TagResourcesResponse -> TestTree+responseTagResources = res+    "TagResourcesResponse"+    "fixture/TagResourcesResponse.proto"+    resourceGroupsTagging+    (Proxy :: Proxy TagResources)++responseGetTagValues :: GetTagValuesResponse -> TestTree+responseGetTagValues = res+    "GetTagValuesResponse"+    "fixture/GetTagValuesResponse.proto"+    resourceGroupsTagging+    (Proxy :: Proxy GetTagValues)++responseGetResources :: GetResourcesResponse -> TestTree+responseGetResources = res+    "GetResourcesResponse"+    "fixture/GetResourcesResponse.proto"+    resourceGroupsTagging+    (Proxy :: Proxy GetResources)++responseUntagResources :: UntagResourcesResponse -> TestTree+responseUntagResources = res+    "UntagResourcesResponse"+    "fixture/UntagResourcesResponse.proto"+    resourceGroupsTagging+    (Proxy :: Proxy UntagResources)
+ test/Test/AWS/ResourceGroupsTagging.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.AWS.ResourceGroupsTagging+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.ResourceGroupsTagging+    ( tests+    , fixtures+    ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/ResourceGroupsTagging/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module      : Test.AWS.ResourceGroupsTagging.Internal+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.ResourceGroupsTagging.Internal where