{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Redshift.CreateUsageLimit
-- Copyright   : (c) 2013-2021 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 usage limit for a specified Amazon Redshift feature on a
-- cluster. The usage limit is identified by the returned usage limit
-- identifier.
module Amazonka.Redshift.CreateUsageLimit
  ( -- * Creating a Request
    CreateUsageLimit (..),
    newCreateUsageLimit,

    -- * Request Lenses
    createUsageLimit_period,
    createUsageLimit_breachAction,
    createUsageLimit_tags,
    createUsageLimit_clusterIdentifier,
    createUsageLimit_featureType,
    createUsageLimit_limitType,
    createUsageLimit_amount,

    -- * Destructuring the Response
    UsageLimit (..),
    newUsageLimit,

    -- * Response Lenses
    usageLimit_amount,
    usageLimit_limitType,
    usageLimit_usageLimitId,
    usageLimit_period,
    usageLimit_clusterIdentifier,
    usageLimit_breachAction,
    usageLimit_featureType,
    usageLimit_tags,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateUsageLimit' smart constructor.
data CreateUsageLimit = CreateUsageLimit'
  { -- | The time period that the amount applies to. A @weekly@ period begins on
    -- Sunday. The default is @monthly@.
    CreateUsageLimit -> Maybe UsageLimitPeriod
period :: Prelude.Maybe UsageLimitPeriod,
    -- | The action that Amazon Redshift takes when the limit is reached. The
    -- default is log. For more information about this parameter, see
    -- UsageLimit.
    CreateUsageLimit -> Maybe UsageLimitBreachAction
breachAction :: Prelude.Maybe UsageLimitBreachAction,
    -- | A list of tag instances.
    CreateUsageLimit -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The identifier of the cluster that you want to limit usage.
    CreateUsageLimit -> Text
clusterIdentifier :: Prelude.Text,
    -- | The Amazon Redshift feature that you want to limit.
    CreateUsageLimit -> UsageLimitFeatureType
featureType :: UsageLimitFeatureType,
    -- | The type of limit. Depending on the feature type, this can be based on a
    -- time duration or data size. If @FeatureType@ is @spectrum@, then
    -- @LimitType@ must be @data-scanned@. If @FeatureType@ is
    -- @concurrency-scaling@, then @LimitType@ must be @time@.
    CreateUsageLimit -> UsageLimitLimitType
limitType :: UsageLimitLimitType,
    -- | The limit amount. If time-based, this amount is in minutes. If
    -- data-based, this amount is in terabytes (TB). The value must be a
    -- positive number.
    CreateUsageLimit -> Integer
amount :: Prelude.Integer
  }
  deriving (CreateUsageLimit -> CreateUsageLimit -> Bool
(CreateUsageLimit -> CreateUsageLimit -> Bool)
-> (CreateUsageLimit -> CreateUsageLimit -> Bool)
-> Eq CreateUsageLimit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUsageLimit -> CreateUsageLimit -> Bool
$c/= :: CreateUsageLimit -> CreateUsageLimit -> Bool
== :: CreateUsageLimit -> CreateUsageLimit -> Bool
$c== :: CreateUsageLimit -> CreateUsageLimit -> Bool
Prelude.Eq, ReadPrec [CreateUsageLimit]
ReadPrec CreateUsageLimit
Int -> ReadS CreateUsageLimit
ReadS [CreateUsageLimit]
(Int -> ReadS CreateUsageLimit)
-> ReadS [CreateUsageLimit]
-> ReadPrec CreateUsageLimit
-> ReadPrec [CreateUsageLimit]
-> Read CreateUsageLimit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUsageLimit]
$creadListPrec :: ReadPrec [CreateUsageLimit]
readPrec :: ReadPrec CreateUsageLimit
$creadPrec :: ReadPrec CreateUsageLimit
readList :: ReadS [CreateUsageLimit]
$creadList :: ReadS [CreateUsageLimit]
readsPrec :: Int -> ReadS CreateUsageLimit
$creadsPrec :: Int -> ReadS CreateUsageLimit
Prelude.Read, Int -> CreateUsageLimit -> ShowS
[CreateUsageLimit] -> ShowS
CreateUsageLimit -> String
(Int -> CreateUsageLimit -> ShowS)
-> (CreateUsageLimit -> String)
-> ([CreateUsageLimit] -> ShowS)
-> Show CreateUsageLimit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUsageLimit] -> ShowS
$cshowList :: [CreateUsageLimit] -> ShowS
show :: CreateUsageLimit -> String
$cshow :: CreateUsageLimit -> String
showsPrec :: Int -> CreateUsageLimit -> ShowS
$cshowsPrec :: Int -> CreateUsageLimit -> ShowS
Prelude.Show, (forall x. CreateUsageLimit -> Rep CreateUsageLimit x)
-> (forall x. Rep CreateUsageLimit x -> CreateUsageLimit)
-> Generic CreateUsageLimit
forall x. Rep CreateUsageLimit x -> CreateUsageLimit
forall x. CreateUsageLimit -> Rep CreateUsageLimit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUsageLimit x -> CreateUsageLimit
$cfrom :: forall x. CreateUsageLimit -> Rep CreateUsageLimit x
Prelude.Generic)

-- |
-- Create a value of 'CreateUsageLimit' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'period', 'createUsageLimit_period' - The time period that the amount applies to. A @weekly@ period begins on
-- Sunday. The default is @monthly@.
--
-- 'breachAction', 'createUsageLimit_breachAction' - The action that Amazon Redshift takes when the limit is reached. The
-- default is log. For more information about this parameter, see
-- UsageLimit.
--
-- 'tags', 'createUsageLimit_tags' - A list of tag instances.
--
-- 'clusterIdentifier', 'createUsageLimit_clusterIdentifier' - The identifier of the cluster that you want to limit usage.
--
-- 'featureType', 'createUsageLimit_featureType' - The Amazon Redshift feature that you want to limit.
--
-- 'limitType', 'createUsageLimit_limitType' - The type of limit. Depending on the feature type, this can be based on a
-- time duration or data size. If @FeatureType@ is @spectrum@, then
-- @LimitType@ must be @data-scanned@. If @FeatureType@ is
-- @concurrency-scaling@, then @LimitType@ must be @time@.
--
-- 'amount', 'createUsageLimit_amount' - The limit amount. If time-based, this amount is in minutes. If
-- data-based, this amount is in terabytes (TB). The value must be a
-- positive number.
newCreateUsageLimit ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  -- | 'featureType'
  UsageLimitFeatureType ->
  -- | 'limitType'
  UsageLimitLimitType ->
  -- | 'amount'
  Prelude.Integer ->
  CreateUsageLimit
newCreateUsageLimit :: Text
-> UsageLimitFeatureType
-> UsageLimitLimitType
-> Integer
-> CreateUsageLimit
newCreateUsageLimit
  Text
pClusterIdentifier_
  UsageLimitFeatureType
pFeatureType_
  UsageLimitLimitType
pLimitType_
  Integer
pAmount_ =
    CreateUsageLimit' :: Maybe UsageLimitPeriod
-> Maybe UsageLimitBreachAction
-> Maybe [Tag]
-> Text
-> UsageLimitFeatureType
-> UsageLimitLimitType
-> Integer
-> CreateUsageLimit
CreateUsageLimit'
      { $sel:period:CreateUsageLimit' :: Maybe UsageLimitPeriod
period = Maybe UsageLimitPeriod
forall a. Maybe a
Prelude.Nothing,
        $sel:breachAction:CreateUsageLimit' :: Maybe UsageLimitBreachAction
breachAction = Maybe UsageLimitBreachAction
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateUsageLimit' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterIdentifier:CreateUsageLimit' :: Text
clusterIdentifier = Text
pClusterIdentifier_,
        $sel:featureType:CreateUsageLimit' :: UsageLimitFeatureType
featureType = UsageLimitFeatureType
pFeatureType_,
        $sel:limitType:CreateUsageLimit' :: UsageLimitLimitType
limitType = UsageLimitLimitType
pLimitType_,
        $sel:amount:CreateUsageLimit' :: Integer
amount = Integer
pAmount_
      }

-- | The time period that the amount applies to. A @weekly@ period begins on
-- Sunday. The default is @monthly@.
createUsageLimit_period :: Lens.Lens' CreateUsageLimit (Prelude.Maybe UsageLimitPeriod)
createUsageLimit_period :: (Maybe UsageLimitPeriod -> f (Maybe UsageLimitPeriod))
-> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_period = (CreateUsageLimit -> Maybe UsageLimitPeriod)
-> (CreateUsageLimit -> Maybe UsageLimitPeriod -> CreateUsageLimit)
-> Lens
     CreateUsageLimit
     CreateUsageLimit
     (Maybe UsageLimitPeriod)
     (Maybe UsageLimitPeriod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {Maybe UsageLimitPeriod
period :: Maybe UsageLimitPeriod
$sel:period:CreateUsageLimit' :: CreateUsageLimit -> Maybe UsageLimitPeriod
period} -> Maybe UsageLimitPeriod
period) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} Maybe UsageLimitPeriod
a -> CreateUsageLimit
s {$sel:period:CreateUsageLimit' :: Maybe UsageLimitPeriod
period = Maybe UsageLimitPeriod
a} :: CreateUsageLimit)

-- | The action that Amazon Redshift takes when the limit is reached. The
-- default is log. For more information about this parameter, see
-- UsageLimit.
createUsageLimit_breachAction :: Lens.Lens' CreateUsageLimit (Prelude.Maybe UsageLimitBreachAction)
createUsageLimit_breachAction :: (Maybe UsageLimitBreachAction -> f (Maybe UsageLimitBreachAction))
-> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_breachAction = (CreateUsageLimit -> Maybe UsageLimitBreachAction)
-> (CreateUsageLimit
    -> Maybe UsageLimitBreachAction -> CreateUsageLimit)
-> Lens
     CreateUsageLimit
     CreateUsageLimit
     (Maybe UsageLimitBreachAction)
     (Maybe UsageLimitBreachAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {Maybe UsageLimitBreachAction
breachAction :: Maybe UsageLimitBreachAction
$sel:breachAction:CreateUsageLimit' :: CreateUsageLimit -> Maybe UsageLimitBreachAction
breachAction} -> Maybe UsageLimitBreachAction
breachAction) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} Maybe UsageLimitBreachAction
a -> CreateUsageLimit
s {$sel:breachAction:CreateUsageLimit' :: Maybe UsageLimitBreachAction
breachAction = Maybe UsageLimitBreachAction
a} :: CreateUsageLimit)

-- | A list of tag instances.
createUsageLimit_tags :: Lens.Lens' CreateUsageLimit (Prelude.Maybe [Tag])
createUsageLimit_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_tags = (CreateUsageLimit -> Maybe [Tag])
-> (CreateUsageLimit -> Maybe [Tag] -> CreateUsageLimit)
-> Lens
     CreateUsageLimit CreateUsageLimit (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateUsageLimit' :: CreateUsageLimit -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} Maybe [Tag]
a -> CreateUsageLimit
s {$sel:tags:CreateUsageLimit' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateUsageLimit) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateUsageLimit -> f CreateUsageLimit)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateUsageLimit
-> f CreateUsageLimit
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier of the cluster that you want to limit usage.
createUsageLimit_clusterIdentifier :: Lens.Lens' CreateUsageLimit Prelude.Text
createUsageLimit_clusterIdentifier :: (Text -> f Text) -> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_clusterIdentifier = (CreateUsageLimit -> Text)
-> (CreateUsageLimit -> Text -> CreateUsageLimit)
-> Lens CreateUsageLimit CreateUsageLimit Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:CreateUsageLimit' :: CreateUsageLimit -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} Text
a -> CreateUsageLimit
s {$sel:clusterIdentifier:CreateUsageLimit' :: Text
clusterIdentifier = Text
a} :: CreateUsageLimit)

-- | The Amazon Redshift feature that you want to limit.
createUsageLimit_featureType :: Lens.Lens' CreateUsageLimit UsageLimitFeatureType
createUsageLimit_featureType :: (UsageLimitFeatureType -> f UsageLimitFeatureType)
-> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_featureType = (CreateUsageLimit -> UsageLimitFeatureType)
-> (CreateUsageLimit -> UsageLimitFeatureType -> CreateUsageLimit)
-> Lens
     CreateUsageLimit
     CreateUsageLimit
     UsageLimitFeatureType
     UsageLimitFeatureType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {UsageLimitFeatureType
featureType :: UsageLimitFeatureType
$sel:featureType:CreateUsageLimit' :: CreateUsageLimit -> UsageLimitFeatureType
featureType} -> UsageLimitFeatureType
featureType) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} UsageLimitFeatureType
a -> CreateUsageLimit
s {$sel:featureType:CreateUsageLimit' :: UsageLimitFeatureType
featureType = UsageLimitFeatureType
a} :: CreateUsageLimit)

-- | The type of limit. Depending on the feature type, this can be based on a
-- time duration or data size. If @FeatureType@ is @spectrum@, then
-- @LimitType@ must be @data-scanned@. If @FeatureType@ is
-- @concurrency-scaling@, then @LimitType@ must be @time@.
createUsageLimit_limitType :: Lens.Lens' CreateUsageLimit UsageLimitLimitType
createUsageLimit_limitType :: (UsageLimitLimitType -> f UsageLimitLimitType)
-> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_limitType = (CreateUsageLimit -> UsageLimitLimitType)
-> (CreateUsageLimit -> UsageLimitLimitType -> CreateUsageLimit)
-> Lens
     CreateUsageLimit
     CreateUsageLimit
     UsageLimitLimitType
     UsageLimitLimitType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {UsageLimitLimitType
limitType :: UsageLimitLimitType
$sel:limitType:CreateUsageLimit' :: CreateUsageLimit -> UsageLimitLimitType
limitType} -> UsageLimitLimitType
limitType) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} UsageLimitLimitType
a -> CreateUsageLimit
s {$sel:limitType:CreateUsageLimit' :: UsageLimitLimitType
limitType = UsageLimitLimitType
a} :: CreateUsageLimit)

-- | The limit amount. If time-based, this amount is in minutes. If
-- data-based, this amount is in terabytes (TB). The value must be a
-- positive number.
createUsageLimit_amount :: Lens.Lens' CreateUsageLimit Prelude.Integer
createUsageLimit_amount :: (Integer -> f Integer) -> CreateUsageLimit -> f CreateUsageLimit
createUsageLimit_amount = (CreateUsageLimit -> Integer)
-> (CreateUsageLimit -> Integer -> CreateUsageLimit)
-> Lens CreateUsageLimit CreateUsageLimit Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUsageLimit' {Integer
amount :: Integer
$sel:amount:CreateUsageLimit' :: CreateUsageLimit -> Integer
amount} -> Integer
amount) (\s :: CreateUsageLimit
s@CreateUsageLimit' {} Integer
a -> CreateUsageLimit
s {$sel:amount:CreateUsageLimit' :: Integer
amount = Integer
a} :: CreateUsageLimit)

instance Core.AWSRequest CreateUsageLimit where
  type AWSResponse CreateUsageLimit = UsageLimit
  request :: CreateUsageLimit -> Request CreateUsageLimit
request = Service -> CreateUsageLimit -> Request CreateUsageLimit
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateUsageLimit
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateUsageLimit)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateUsageLimit))
-> Logger
-> Service
-> Proxy CreateUsageLimit
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateUsageLimit)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateUsageLimitResult"
      (\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String UsageLimit
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)

instance Prelude.Hashable CreateUsageLimit

instance Prelude.NFData CreateUsageLimit

instance Core.ToHeaders CreateUsageLimit where
  toHeaders :: CreateUsageLimit -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateUsageLimit -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreateUsageLimit where
  toPath :: CreateUsageLimit -> ByteString
toPath = ByteString -> CreateUsageLimit -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateUsageLimit where
  toQuery :: CreateUsageLimit -> QueryString
toQuery CreateUsageLimit' {Integer
Maybe [Tag]
Maybe UsageLimitBreachAction
Maybe UsageLimitPeriod
Text
UsageLimitFeatureType
UsageLimitLimitType
amount :: Integer
limitType :: UsageLimitLimitType
featureType :: UsageLimitFeatureType
clusterIdentifier :: Text
tags :: Maybe [Tag]
breachAction :: Maybe UsageLimitBreachAction
period :: Maybe UsageLimitPeriod
$sel:amount:CreateUsageLimit' :: CreateUsageLimit -> Integer
$sel:limitType:CreateUsageLimit' :: CreateUsageLimit -> UsageLimitLimitType
$sel:featureType:CreateUsageLimit' :: CreateUsageLimit -> UsageLimitFeatureType
$sel:clusterIdentifier:CreateUsageLimit' :: CreateUsageLimit -> Text
$sel:tags:CreateUsageLimit' :: CreateUsageLimit -> Maybe [Tag]
$sel:breachAction:CreateUsageLimit' :: CreateUsageLimit -> Maybe UsageLimitBreachAction
$sel:period:CreateUsageLimit' :: CreateUsageLimit -> Maybe UsageLimitPeriod
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateUsageLimit" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"Period" ByteString -> Maybe UsageLimitPeriod -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe UsageLimitPeriod
period,
        ByteString
"BreachAction" ByteString -> Maybe UsageLimitBreachAction -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe UsageLimitBreachAction
breachAction,
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier,
        ByteString
"FeatureType" ByteString -> UsageLimitFeatureType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: UsageLimitFeatureType
featureType,
        ByteString
"LimitType" ByteString -> UsageLimitLimitType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: UsageLimitLimitType
limitType,
        ByteString
"Amount" ByteString -> Integer -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Integer
amount
      ]