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

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

-- |
-- Module      : Amazonka.ServiceCatalog.Types.UpdateProvisioningPreferences
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ServiceCatalog.Types.UpdateProvisioningPreferences where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServiceCatalog.Types.StackSetOperationType

-- | The user-defined preferences that will be applied when updating a
-- provisioned product. Not all preferences are applicable to all
-- provisioned product types.
--
-- /See:/ 'newUpdateProvisioningPreferences' smart constructor.
data UpdateProvisioningPreferences = UpdateProvisioningPreferences'
  { -- | One or more Amazon Web Services accounts that will have access to the
    -- provisioned product.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- The Amazon Web Services accounts specified should be within the list of
    -- accounts in the @STACKSET@ constraint. To get the list of accounts in
    -- the @STACKSET@ constraint, use the @DescribeProvisioningParameters@
    -- operation.
    --
    -- If no values are specified, the default value is all accounts from the
    -- @STACKSET@ constraint.
    UpdateProvisioningPreferences -> Maybe [Text]
stackSetAccounts :: Prelude.Maybe [Prelude.Text],
    -- | The number of accounts, per Region, for which this operation can fail
    -- before Service Catalog stops the operation in that Region. If the
    -- operation is stopped in a Region, Service Catalog doesn\'t attempt the
    -- operation in any subsequent Regions.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetFailureToleranceCount@ or
    -- @StackSetFailureTolerancePercentage@, but not both.
    --
    -- The default value is @0@ if no value is specified.
    UpdateProvisioningPreferences -> Maybe Natural
stackSetFailureToleranceCount :: Prelude.Maybe Prelude.Natural,
    -- | The percentage of accounts, per Region, for which this stack operation
    -- can fail before Service Catalog stops the operation in that Region. If
    -- the operation is stopped in a Region, Service Catalog doesn\'t attempt
    -- the operation in any subsequent Regions.
    --
    -- When calculating the number of accounts based on the specified
    -- percentage, Service Catalog rounds down to the next whole number.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetFailureToleranceCount@ or
    -- @StackSetFailureTolerancePercentage@, but not both.
    UpdateProvisioningPreferences -> Maybe Natural
stackSetFailureTolerancePercentage :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of accounts in which to perform this operation at one
    -- time. This is dependent on the value of @StackSetFailureToleranceCount@.
    -- @StackSetMaxConcurrentCount@ is at most one more than the
    -- @StackSetFailureToleranceCount@.
    --
    -- Note that this setting lets you specify the maximum for operations. For
    -- large deployments, under certain circumstances the actual number of
    -- accounts acted upon concurrently may be lower due to service throttling.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
    -- @StackSetMaxConcurrentPercentage@, but not both.
    UpdateProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyCount :: Prelude.Maybe Prelude.Natural,
    -- | The maximum percentage of accounts in which to perform this operation at
    -- one time.
    --
    -- When calculating the number of accounts based on the specified
    -- percentage, Service Catalog rounds down to the next whole number. This
    -- is true except in cases where rounding down would result is zero. In
    -- this case, Service Catalog sets the number as @1@ instead.
    --
    -- Note that this setting lets you specify the maximum for operations. For
    -- large deployments, under certain circumstances the actual number of
    -- accounts acted upon concurrently may be lower due to service throttling.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
    -- @StackSetMaxConcurrentPercentage@, but not both.
    UpdateProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyPercentage :: Prelude.Maybe Prelude.Natural,
    -- | Determines what action Service Catalog performs to a stack set or a
    -- stack instance represented by the provisioned product. The default value
    -- is @UPDATE@ if nothing is specified.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- [CREATE]
    --     Creates a new stack instance in the stack set represented by the
    --     provisioned product. In this case, only new stack instances are
    --     created based on accounts and Regions; if new ProductId or
    --     ProvisioningArtifactID are passed, they will be ignored.
    --
    -- [UPDATE]
    --     Updates the stack set represented by the provisioned product and
    --     also its stack instances.
    --
    -- [DELETE]
    --     Deletes a stack instance in the stack set represented by the
    --     provisioned product.
    UpdateProvisioningPreferences -> Maybe StackSetOperationType
stackSetOperationType :: Prelude.Maybe StackSetOperationType,
    -- | One or more Amazon Web Services Regions where the provisioned product
    -- will be available.
    --
    -- Applicable only to a @CFN_STACKSET@ provisioned product type.
    --
    -- The specified Regions should be within the list of Regions from the
    -- @STACKSET@ constraint. To get the list of Regions in the @STACKSET@
    -- constraint, use the @DescribeProvisioningParameters@ operation.
    --
    -- If no values are specified, the default value is all Regions from the
    -- @STACKSET@ constraint.
    UpdateProvisioningPreferences -> Maybe [Text]
stackSetRegions :: Prelude.Maybe [Prelude.Text]
  }
  deriving (UpdateProvisioningPreferences
-> UpdateProvisioningPreferences -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProvisioningPreferences
-> UpdateProvisioningPreferences -> Bool
$c/= :: UpdateProvisioningPreferences
-> UpdateProvisioningPreferences -> Bool
== :: UpdateProvisioningPreferences
-> UpdateProvisioningPreferences -> Bool
$c== :: UpdateProvisioningPreferences
-> UpdateProvisioningPreferences -> Bool
Prelude.Eq, ReadPrec [UpdateProvisioningPreferences]
ReadPrec UpdateProvisioningPreferences
Int -> ReadS UpdateProvisioningPreferences
ReadS [UpdateProvisioningPreferences]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProvisioningPreferences]
$creadListPrec :: ReadPrec [UpdateProvisioningPreferences]
readPrec :: ReadPrec UpdateProvisioningPreferences
$creadPrec :: ReadPrec UpdateProvisioningPreferences
readList :: ReadS [UpdateProvisioningPreferences]
$creadList :: ReadS [UpdateProvisioningPreferences]
readsPrec :: Int -> ReadS UpdateProvisioningPreferences
$creadsPrec :: Int -> ReadS UpdateProvisioningPreferences
Prelude.Read, Int -> UpdateProvisioningPreferences -> ShowS
[UpdateProvisioningPreferences] -> ShowS
UpdateProvisioningPreferences -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProvisioningPreferences] -> ShowS
$cshowList :: [UpdateProvisioningPreferences] -> ShowS
show :: UpdateProvisioningPreferences -> String
$cshow :: UpdateProvisioningPreferences -> String
showsPrec :: Int -> UpdateProvisioningPreferences -> ShowS
$cshowsPrec :: Int -> UpdateProvisioningPreferences -> ShowS
Prelude.Show, forall x.
Rep UpdateProvisioningPreferences x
-> UpdateProvisioningPreferences
forall x.
UpdateProvisioningPreferences
-> Rep UpdateProvisioningPreferences x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateProvisioningPreferences x
-> UpdateProvisioningPreferences
$cfrom :: forall x.
UpdateProvisioningPreferences
-> Rep UpdateProvisioningPreferences x
Prelude.Generic)

-- |
-- Create a value of 'UpdateProvisioningPreferences' 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:
--
-- 'stackSetAccounts', 'updateProvisioningPreferences_stackSetAccounts' - One or more Amazon Web Services accounts that will have access to the
-- provisioned product.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The Amazon Web Services accounts specified should be within the list of
-- accounts in the @STACKSET@ constraint. To get the list of accounts in
-- the @STACKSET@ constraint, use the @DescribeProvisioningParameters@
-- operation.
--
-- If no values are specified, the default value is all accounts from the
-- @STACKSET@ constraint.
--
-- 'stackSetFailureToleranceCount', 'updateProvisioningPreferences_stackSetFailureToleranceCount' - The number of accounts, per Region, for which this operation can fail
-- before Service Catalog stops the operation in that Region. If the
-- operation is stopped in a Region, Service Catalog doesn\'t attempt the
-- operation in any subsequent Regions.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
--
-- The default value is @0@ if no value is specified.
--
-- 'stackSetFailureTolerancePercentage', 'updateProvisioningPreferences_stackSetFailureTolerancePercentage' - The percentage of accounts, per Region, for which this stack operation
-- can fail before Service Catalog stops the operation in that Region. If
-- the operation is stopped in a Region, Service Catalog doesn\'t attempt
-- the operation in any subsequent Regions.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
--
-- 'stackSetMaxConcurrencyCount', 'updateProvisioningPreferences_stackSetMaxConcurrencyCount' - The maximum number of accounts in which to perform this operation at one
-- time. This is dependent on the value of @StackSetFailureToleranceCount@.
-- @StackSetMaxConcurrentCount@ is at most one more than the
-- @StackSetFailureToleranceCount@.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
--
-- 'stackSetMaxConcurrencyPercentage', 'updateProvisioningPreferences_stackSetMaxConcurrencyPercentage' - The maximum percentage of accounts in which to perform this operation at
-- one time.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number. This
-- is true except in cases where rounding down would result is zero. In
-- this case, Service Catalog sets the number as @1@ instead.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
--
-- 'stackSetOperationType', 'updateProvisioningPreferences_stackSetOperationType' - Determines what action Service Catalog performs to a stack set or a
-- stack instance represented by the provisioned product. The default value
-- is @UPDATE@ if nothing is specified.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- [CREATE]
--     Creates a new stack instance in the stack set represented by the
--     provisioned product. In this case, only new stack instances are
--     created based on accounts and Regions; if new ProductId or
--     ProvisioningArtifactID are passed, they will be ignored.
--
-- [UPDATE]
--     Updates the stack set represented by the provisioned product and
--     also its stack instances.
--
-- [DELETE]
--     Deletes a stack instance in the stack set represented by the
--     provisioned product.
--
-- 'stackSetRegions', 'updateProvisioningPreferences_stackSetRegions' - One or more Amazon Web Services Regions where the provisioned product
-- will be available.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The specified Regions should be within the list of Regions from the
-- @STACKSET@ constraint. To get the list of Regions in the @STACKSET@
-- constraint, use the @DescribeProvisioningParameters@ operation.
--
-- If no values are specified, the default value is all Regions from the
-- @STACKSET@ constraint.
newUpdateProvisioningPreferences ::
  UpdateProvisioningPreferences
newUpdateProvisioningPreferences :: UpdateProvisioningPreferences
newUpdateProvisioningPreferences =
  UpdateProvisioningPreferences'
    { $sel:stackSetAccounts:UpdateProvisioningPreferences' :: Maybe [Text]
stackSetAccounts =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetFailureToleranceCount:UpdateProvisioningPreferences' :: Maybe Natural
stackSetFailureToleranceCount =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetFailureTolerancePercentage:UpdateProvisioningPreferences' :: Maybe Natural
stackSetFailureTolerancePercentage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetMaxConcurrencyCount:UpdateProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyCount =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetMaxConcurrencyPercentage:UpdateProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyPercentage =
        forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetOperationType:UpdateProvisioningPreferences' :: Maybe StackSetOperationType
stackSetOperationType = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetRegions:UpdateProvisioningPreferences' :: Maybe [Text]
stackSetRegions = forall a. Maybe a
Prelude.Nothing
    }

-- | One or more Amazon Web Services accounts that will have access to the
-- provisioned product.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The Amazon Web Services accounts specified should be within the list of
-- accounts in the @STACKSET@ constraint. To get the list of accounts in
-- the @STACKSET@ constraint, use the @DescribeProvisioningParameters@
-- operation.
--
-- If no values are specified, the default value is all accounts from the
-- @STACKSET@ constraint.
updateProvisioningPreferences_stackSetAccounts :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe [Prelude.Text])
updateProvisioningPreferences_stackSetAccounts :: Lens' UpdateProvisioningPreferences (Maybe [Text])
updateProvisioningPreferences_stackSetAccounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe [Text]
stackSetAccounts :: Maybe [Text]
$sel:stackSetAccounts:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
stackSetAccounts} -> Maybe [Text]
stackSetAccounts) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe [Text]
a -> UpdateProvisioningPreferences
s {$sel:stackSetAccounts:UpdateProvisioningPreferences' :: Maybe [Text]
stackSetAccounts = Maybe [Text]
a} :: UpdateProvisioningPreferences) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of accounts, per Region, for which this operation can fail
-- before Service Catalog stops the operation in that Region. If the
-- operation is stopped in a Region, Service Catalog doesn\'t attempt the
-- operation in any subsequent Regions.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
--
-- The default value is @0@ if no value is specified.
updateProvisioningPreferences_stackSetFailureToleranceCount :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe Prelude.Natural)
updateProvisioningPreferences_stackSetFailureToleranceCount :: Lens' UpdateProvisioningPreferences (Maybe Natural)
updateProvisioningPreferences_stackSetFailureToleranceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
$sel:stackSetFailureToleranceCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
stackSetFailureToleranceCount} -> Maybe Natural
stackSetFailureToleranceCount) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe Natural
a -> UpdateProvisioningPreferences
s {$sel:stackSetFailureToleranceCount:UpdateProvisioningPreferences' :: Maybe Natural
stackSetFailureToleranceCount = Maybe Natural
a} :: UpdateProvisioningPreferences)

-- | The percentage of accounts, per Region, for which this stack operation
-- can fail before Service Catalog stops the operation in that Region. If
-- the operation is stopped in a Region, Service Catalog doesn\'t attempt
-- the operation in any subsequent Regions.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetFailureToleranceCount@ or
-- @StackSetFailureTolerancePercentage@, but not both.
updateProvisioningPreferences_stackSetFailureTolerancePercentage :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe Prelude.Natural)
updateProvisioningPreferences_stackSetFailureTolerancePercentage :: Lens' UpdateProvisioningPreferences (Maybe Natural)
updateProvisioningPreferences_stackSetFailureTolerancePercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
$sel:stackSetFailureTolerancePercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
stackSetFailureTolerancePercentage} -> Maybe Natural
stackSetFailureTolerancePercentage) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe Natural
a -> UpdateProvisioningPreferences
s {$sel:stackSetFailureTolerancePercentage:UpdateProvisioningPreferences' :: Maybe Natural
stackSetFailureTolerancePercentage = Maybe Natural
a} :: UpdateProvisioningPreferences)

-- | The maximum number of accounts in which to perform this operation at one
-- time. This is dependent on the value of @StackSetFailureToleranceCount@.
-- @StackSetMaxConcurrentCount@ is at most one more than the
-- @StackSetFailureToleranceCount@.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
updateProvisioningPreferences_stackSetMaxConcurrencyCount :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe Prelude.Natural)
updateProvisioningPreferences_stackSetMaxConcurrencyCount :: Lens' UpdateProvisioningPreferences (Maybe Natural)
updateProvisioningPreferences_stackSetMaxConcurrencyCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
$sel:stackSetMaxConcurrencyCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyCount} -> Maybe Natural
stackSetMaxConcurrencyCount) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe Natural
a -> UpdateProvisioningPreferences
s {$sel:stackSetMaxConcurrencyCount:UpdateProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyCount = Maybe Natural
a} :: UpdateProvisioningPreferences)

-- | The maximum percentage of accounts in which to perform this operation at
-- one time.
--
-- When calculating the number of accounts based on the specified
-- percentage, Service Catalog rounds down to the next whole number. This
-- is true except in cases where rounding down would result is zero. In
-- this case, Service Catalog sets the number as @1@ instead.
--
-- Note that this setting lets you specify the maximum for operations. For
-- large deployments, under certain circumstances the actual number of
-- accounts acted upon concurrently may be lower due to service throttling.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- Conditional: You must specify either @StackSetMaxConcurrentCount@ or
-- @StackSetMaxConcurrentPercentage@, but not both.
updateProvisioningPreferences_stackSetMaxConcurrencyPercentage :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe Prelude.Natural)
updateProvisioningPreferences_stackSetMaxConcurrencyPercentage :: Lens' UpdateProvisioningPreferences (Maybe Natural)
updateProvisioningPreferences_stackSetMaxConcurrencyPercentage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe Natural
stackSetMaxConcurrencyPercentage :: Maybe Natural
$sel:stackSetMaxConcurrencyPercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
stackSetMaxConcurrencyPercentage} -> Maybe Natural
stackSetMaxConcurrencyPercentage) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe Natural
a -> UpdateProvisioningPreferences
s {$sel:stackSetMaxConcurrencyPercentage:UpdateProvisioningPreferences' :: Maybe Natural
stackSetMaxConcurrencyPercentage = Maybe Natural
a} :: UpdateProvisioningPreferences)

-- | Determines what action Service Catalog performs to a stack set or a
-- stack instance represented by the provisioned product. The default value
-- is @UPDATE@ if nothing is specified.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- [CREATE]
--     Creates a new stack instance in the stack set represented by the
--     provisioned product. In this case, only new stack instances are
--     created based on accounts and Regions; if new ProductId or
--     ProvisioningArtifactID are passed, they will be ignored.
--
-- [UPDATE]
--     Updates the stack set represented by the provisioned product and
--     also its stack instances.
--
-- [DELETE]
--     Deletes a stack instance in the stack set represented by the
--     provisioned product.
updateProvisioningPreferences_stackSetOperationType :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe StackSetOperationType)
updateProvisioningPreferences_stackSetOperationType :: Lens' UpdateProvisioningPreferences (Maybe StackSetOperationType)
updateProvisioningPreferences_stackSetOperationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe StackSetOperationType
stackSetOperationType :: Maybe StackSetOperationType
$sel:stackSetOperationType:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe StackSetOperationType
stackSetOperationType} -> Maybe StackSetOperationType
stackSetOperationType) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe StackSetOperationType
a -> UpdateProvisioningPreferences
s {$sel:stackSetOperationType:UpdateProvisioningPreferences' :: Maybe StackSetOperationType
stackSetOperationType = Maybe StackSetOperationType
a} :: UpdateProvisioningPreferences)

-- | One or more Amazon Web Services Regions where the provisioned product
-- will be available.
--
-- Applicable only to a @CFN_STACKSET@ provisioned product type.
--
-- The specified Regions should be within the list of Regions from the
-- @STACKSET@ constraint. To get the list of Regions in the @STACKSET@
-- constraint, use the @DescribeProvisioningParameters@ operation.
--
-- If no values are specified, the default value is all Regions from the
-- @STACKSET@ constraint.
updateProvisioningPreferences_stackSetRegions :: Lens.Lens' UpdateProvisioningPreferences (Prelude.Maybe [Prelude.Text])
updateProvisioningPreferences_stackSetRegions :: Lens' UpdateProvisioningPreferences (Maybe [Text])
updateProvisioningPreferences_stackSetRegions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProvisioningPreferences' {Maybe [Text]
stackSetRegions :: Maybe [Text]
$sel:stackSetRegions:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
stackSetRegions} -> Maybe [Text]
stackSetRegions) (\s :: UpdateProvisioningPreferences
s@UpdateProvisioningPreferences' {} Maybe [Text]
a -> UpdateProvisioningPreferences
s {$sel:stackSetRegions:UpdateProvisioningPreferences' :: Maybe [Text]
stackSetRegions = Maybe [Text]
a} :: UpdateProvisioningPreferences) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.Hashable
    UpdateProvisioningPreferences
  where
  hashWithSalt :: Int -> UpdateProvisioningPreferences -> Int
hashWithSalt Int
_salt UpdateProvisioningPreferences' {Maybe Natural
Maybe [Text]
Maybe StackSetOperationType
stackSetRegions :: Maybe [Text]
stackSetOperationType :: Maybe StackSetOperationType
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
$sel:stackSetOperationType:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe StackSetOperationType
$sel:stackSetMaxConcurrencyPercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureTolerancePercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
stackSetAccounts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetFailureToleranceCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetFailureTolerancePercentage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetMaxConcurrencyCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
stackSetMaxConcurrencyPercentage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackSetOperationType
stackSetOperationType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
stackSetRegions

instance Prelude.NFData UpdateProvisioningPreferences where
  rnf :: UpdateProvisioningPreferences -> ()
rnf UpdateProvisioningPreferences' {Maybe Natural
Maybe [Text]
Maybe StackSetOperationType
stackSetRegions :: Maybe [Text]
stackSetOperationType :: Maybe StackSetOperationType
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
$sel:stackSetOperationType:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe StackSetOperationType
$sel:stackSetMaxConcurrencyPercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureTolerancePercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
stackSetAccounts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetFailureToleranceCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetFailureTolerancePercentage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetMaxConcurrencyCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
stackSetMaxConcurrencyPercentage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackSetOperationType
stackSetOperationType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
stackSetRegions

instance Data.ToJSON UpdateProvisioningPreferences where
  toJSON :: UpdateProvisioningPreferences -> Value
toJSON UpdateProvisioningPreferences' {Maybe Natural
Maybe [Text]
Maybe StackSetOperationType
stackSetRegions :: Maybe [Text]
stackSetOperationType :: Maybe StackSetOperationType
stackSetMaxConcurrencyPercentage :: Maybe Natural
stackSetMaxConcurrencyCount :: Maybe Natural
stackSetFailureTolerancePercentage :: Maybe Natural
stackSetFailureToleranceCount :: Maybe Natural
stackSetAccounts :: Maybe [Text]
$sel:stackSetRegions:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
$sel:stackSetOperationType:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe StackSetOperationType
$sel:stackSetMaxConcurrencyPercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetMaxConcurrencyCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureTolerancePercentage:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetFailureToleranceCount:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe Natural
$sel:stackSetAccounts:UpdateProvisioningPreferences' :: UpdateProvisioningPreferences -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"StackSetAccounts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
stackSetAccounts,
            (Key
"StackSetFailureToleranceCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetFailureToleranceCount,
            (Key
"StackSetFailureTolerancePercentage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetFailureTolerancePercentage,
            (Key
"StackSetMaxConcurrencyCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetMaxConcurrencyCount,
            (Key
"StackSetMaxConcurrencyPercentage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stackSetMaxConcurrencyPercentage,
            (Key
"StackSetOperationType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StackSetOperationType
stackSetOperationType,
            (Key
"StackSetRegions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
stackSetRegions
          ]
      )