{-# 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.CloudFormation.Types.StackSet
-- 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.CloudFormation.Types.StackSet where

import Amazonka.CloudFormation.Types.AutoDeployment
import Amazonka.CloudFormation.Types.Capability
import Amazonka.CloudFormation.Types.ManagedExecution
import Amazonka.CloudFormation.Types.Parameter
import Amazonka.CloudFormation.Types.PermissionModels
import Amazonka.CloudFormation.Types.StackSetDriftDetectionDetails
import Amazonka.CloudFormation.Types.StackSetStatus
import Amazonka.CloudFormation.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | A structure that contains information about a stack set. A stack set
-- enables you to provision stacks into Amazon Web Services accounts and
-- across Regions by using a single CloudFormation template. In the stack
-- set, you specify the template to use, in addition to any parameters and
-- capabilities that the template requires.
--
-- /See:/ 'newStackSet' smart constructor.
data StackSet = StackSet'
  { -- | The Amazon Resource Name (ARN) of the IAM role used to create or update
    -- the stack set.
    --
    -- Use customized administrator roles to control which users or groups can
    -- manage specific stack sets within the same administrator account. For
    -- more information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html Prerequisites: Granting Permissions for Stack Set Operations>
    -- in the /CloudFormation User Guide/.
    StackSet -> Maybe Text
administrationRoleARN :: Prelude.Maybe Prelude.Text,
    -- | [Service-managed permissions] Describes whether StackSets automatically
    -- deploys to Organizations accounts that are added to a target
    -- organization or organizational unit (OU).
    StackSet -> Maybe AutoDeployment
autoDeployment :: Prelude.Maybe AutoDeployment,
    -- | The capabilities that are allowed in the stack set. Some stack set
    -- templates might include resources that can affect permissions in your
    -- Amazon Web Services account—for example, by creating new Identity and
    -- Access Management (IAM) users. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates.>
    StackSet -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | A description of the stack set that you specify when the stack set is
    -- created or updated.
    StackSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the IAM execution role used to create or update the stack
    -- set.
    --
    -- Use customized execution roles to control which stack resources users
    -- and groups can include in their stack sets.
    StackSet -> Maybe Text
executionRoleName :: Prelude.Maybe Prelude.Text,
    -- | Describes whether StackSets performs non-conflicting operations
    -- concurrently and queues conflicting operations.
    StackSet -> Maybe ManagedExecution
managedExecution :: Prelude.Maybe ManagedExecution,
    -- | [Service-managed permissions] The organization root ID or organizational
    -- unit (OU) IDs that you specified for
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html DeploymentTargets>.
    StackSet -> Maybe [Text]
organizationalUnitIds :: Prelude.Maybe [Prelude.Text],
    -- | A list of input parameters for a stack set.
    StackSet -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | Describes how the IAM roles required for stack set operations are
    -- created.
    --
    -- -   With @self-managed@ permissions, you must create the administrator
    --     and execution roles required to deploy to target accounts. For more
    --     information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html Grant Self-Managed Stack Set Permissions>.
    --
    -- -   With @service-managed@ permissions, StackSets automatically creates
    --     the IAM roles required to deploy to accounts managed by
    --     Organizations. For more information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html Grant Service-Managed Stack Set Permissions>.
    StackSet -> Maybe PermissionModels
permissionModel :: Prelude.Maybe PermissionModels,
    -- | The Amazon Resource Name (ARN) of the stack set.
    StackSet -> Maybe Text
stackSetARN :: Prelude.Maybe Prelude.Text,
    -- | Detailed information about the drift status of the stack set.
    --
    -- For stack sets, contains information about the last /completed/ drift
    -- operation performed on the stack set. Information about drift operations
    -- currently in progress isn\'t included.
    StackSet -> Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails :: Prelude.Maybe StackSetDriftDetectionDetails,
    -- | The ID of the stack set.
    StackSet -> Maybe Text
stackSetId :: Prelude.Maybe Prelude.Text,
    -- | The name that\'s associated with the stack set.
    StackSet -> Maybe Text
stackSetName :: Prelude.Maybe Prelude.Text,
    -- | The status of the stack set.
    StackSet -> Maybe StackSetStatus
status :: Prelude.Maybe StackSetStatus,
    -- | A list of tags that specify information about the stack set. A maximum
    -- number of 50 tags can be specified.
    StackSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The structure that contains the body of the template that was used to
    -- create or update the stack set.
    StackSet -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text
  }
  deriving (StackSet -> StackSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackSet -> StackSet -> Bool
$c/= :: StackSet -> StackSet -> Bool
== :: StackSet -> StackSet -> Bool
$c== :: StackSet -> StackSet -> Bool
Prelude.Eq, ReadPrec [StackSet]
ReadPrec StackSet
Int -> ReadS StackSet
ReadS [StackSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackSet]
$creadListPrec :: ReadPrec [StackSet]
readPrec :: ReadPrec StackSet
$creadPrec :: ReadPrec StackSet
readList :: ReadS [StackSet]
$creadList :: ReadS [StackSet]
readsPrec :: Int -> ReadS StackSet
$creadsPrec :: Int -> ReadS StackSet
Prelude.Read, Int -> StackSet -> ShowS
[StackSet] -> ShowS
StackSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackSet] -> ShowS
$cshowList :: [StackSet] -> ShowS
show :: StackSet -> String
$cshow :: StackSet -> String
showsPrec :: Int -> StackSet -> ShowS
$cshowsPrec :: Int -> StackSet -> ShowS
Prelude.Show, forall x. Rep StackSet x -> StackSet
forall x. StackSet -> Rep StackSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackSet x -> StackSet
$cfrom :: forall x. StackSet -> Rep StackSet x
Prelude.Generic)

-- |
-- Create a value of 'StackSet' 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:
--
-- 'administrationRoleARN', 'stackSet_administrationRoleARN' - The Amazon Resource Name (ARN) of the IAM role used to create or update
-- the stack set.
--
-- Use customized administrator roles to control which users or groups can
-- manage specific stack sets within the same administrator account. For
-- more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html Prerequisites: Granting Permissions for Stack Set Operations>
-- in the /CloudFormation User Guide/.
--
-- 'autoDeployment', 'stackSet_autoDeployment' - [Service-managed permissions] Describes whether StackSets automatically
-- deploys to Organizations accounts that are added to a target
-- organization or organizational unit (OU).
--
-- 'capabilities', 'stackSet_capabilities' - The capabilities that are allowed in the stack set. Some stack set
-- templates might include resources that can affect permissions in your
-- Amazon Web Services account—for example, by creating new Identity and
-- Access Management (IAM) users. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates.>
--
-- 'description', 'stackSet_description' - A description of the stack set that you specify when the stack set is
-- created or updated.
--
-- 'executionRoleName', 'stackSet_executionRoleName' - The name of the IAM execution role used to create or update the stack
-- set.
--
-- Use customized execution roles to control which stack resources users
-- and groups can include in their stack sets.
--
-- 'managedExecution', 'stackSet_managedExecution' - Describes whether StackSets performs non-conflicting operations
-- concurrently and queues conflicting operations.
--
-- 'organizationalUnitIds', 'stackSet_organizationalUnitIds' - [Service-managed permissions] The organization root ID or organizational
-- unit (OU) IDs that you specified for
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html DeploymentTargets>.
--
-- 'parameters', 'stackSet_parameters' - A list of input parameters for a stack set.
--
-- 'permissionModel', 'stackSet_permissionModel' - Describes how the IAM roles required for stack set operations are
-- created.
--
-- -   With @self-managed@ permissions, you must create the administrator
--     and execution roles required to deploy to target accounts. For more
--     information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html Grant Self-Managed Stack Set Permissions>.
--
-- -   With @service-managed@ permissions, StackSets automatically creates
--     the IAM roles required to deploy to accounts managed by
--     Organizations. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html Grant Service-Managed Stack Set Permissions>.
--
-- 'stackSetARN', 'stackSet_stackSetARN' - The Amazon Resource Name (ARN) of the stack set.
--
-- 'stackSetDriftDetectionDetails', 'stackSet_stackSetDriftDetectionDetails' - Detailed information about the drift status of the stack set.
--
-- For stack sets, contains information about the last /completed/ drift
-- operation performed on the stack set. Information about drift operations
-- currently in progress isn\'t included.
--
-- 'stackSetId', 'stackSet_stackSetId' - The ID of the stack set.
--
-- 'stackSetName', 'stackSet_stackSetName' - The name that\'s associated with the stack set.
--
-- 'status', 'stackSet_status' - The status of the stack set.
--
-- 'tags', 'stackSet_tags' - A list of tags that specify information about the stack set. A maximum
-- number of 50 tags can be specified.
--
-- 'templateBody', 'stackSet_templateBody' - The structure that contains the body of the template that was used to
-- create or update the stack set.
newStackSet ::
  StackSet
newStackSet :: StackSet
newStackSet =
  StackSet'
    { $sel:administrationRoleARN:StackSet' :: Maybe Text
administrationRoleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeployment:StackSet' :: Maybe AutoDeployment
autoDeployment = forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:StackSet' :: Maybe [Capability]
capabilities = forall a. Maybe a
Prelude.Nothing,
      $sel:description:StackSet' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleName:StackSet' :: Maybe Text
executionRoleName = forall a. Maybe a
Prelude.Nothing,
      $sel:managedExecution:StackSet' :: Maybe ManagedExecution
managedExecution = forall a. Maybe a
Prelude.Nothing,
      $sel:organizationalUnitIds:StackSet' :: Maybe [Text]
organizationalUnitIds = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:StackSet' :: Maybe [Parameter]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:permissionModel:StackSet' :: Maybe PermissionModels
permissionModel = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetARN:StackSet' :: Maybe Text
stackSetARN = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetDriftDetectionDetails:StackSet' :: Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetId:StackSet' :: Maybe Text
stackSetId = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetName:StackSet' :: Maybe Text
stackSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:status:StackSet' :: Maybe StackSetStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StackSet' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:StackSet' :: Maybe Text
templateBody = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the IAM role used to create or update
-- the stack set.
--
-- Use customized administrator roles to control which users or groups can
-- manage specific stack sets within the same administrator account. For
-- more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html Prerequisites: Granting Permissions for Stack Set Operations>
-- in the /CloudFormation User Guide/.
stackSet_administrationRoleARN :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_administrationRoleARN :: Lens' StackSet (Maybe Text)
stackSet_administrationRoleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
administrationRoleARN :: Maybe Text
$sel:administrationRoleARN:StackSet' :: StackSet -> Maybe Text
administrationRoleARN} -> Maybe Text
administrationRoleARN) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:administrationRoleARN:StackSet' :: Maybe Text
administrationRoleARN = Maybe Text
a} :: StackSet)

-- | [Service-managed permissions] Describes whether StackSets automatically
-- deploys to Organizations accounts that are added to a target
-- organization or organizational unit (OU).
stackSet_autoDeployment :: Lens.Lens' StackSet (Prelude.Maybe AutoDeployment)
stackSet_autoDeployment :: Lens' StackSet (Maybe AutoDeployment)
stackSet_autoDeployment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe AutoDeployment
autoDeployment :: Maybe AutoDeployment
$sel:autoDeployment:StackSet' :: StackSet -> Maybe AutoDeployment
autoDeployment} -> Maybe AutoDeployment
autoDeployment) (\s :: StackSet
s@StackSet' {} Maybe AutoDeployment
a -> StackSet
s {$sel:autoDeployment:StackSet' :: Maybe AutoDeployment
autoDeployment = Maybe AutoDeployment
a} :: StackSet)

-- | The capabilities that are allowed in the stack set. Some stack set
-- templates might include resources that can affect permissions in your
-- Amazon Web Services account—for example, by creating new Identity and
-- Access Management (IAM) users. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates.>
stackSet_capabilities :: Lens.Lens' StackSet (Prelude.Maybe [Capability])
stackSet_capabilities :: Lens' StackSet (Maybe [Capability])
stackSet_capabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:StackSet' :: StackSet -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: StackSet
s@StackSet' {} Maybe [Capability]
a -> StackSet
s {$sel:capabilities:StackSet' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: StackSet) 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

-- | A description of the stack set that you specify when the stack set is
-- created or updated.
stackSet_description :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_description :: Lens' StackSet (Maybe Text)
stackSet_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
description :: Maybe Text
$sel:description:StackSet' :: StackSet -> Maybe Text
description} -> Maybe Text
description) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:description:StackSet' :: Maybe Text
description = Maybe Text
a} :: StackSet)

-- | The name of the IAM execution role used to create or update the stack
-- set.
--
-- Use customized execution roles to control which stack resources users
-- and groups can include in their stack sets.
stackSet_executionRoleName :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_executionRoleName :: Lens' StackSet (Maybe Text)
stackSet_executionRoleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
executionRoleName :: Maybe Text
$sel:executionRoleName:StackSet' :: StackSet -> Maybe Text
executionRoleName} -> Maybe Text
executionRoleName) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:executionRoleName:StackSet' :: Maybe Text
executionRoleName = Maybe Text
a} :: StackSet)

-- | Describes whether StackSets performs non-conflicting operations
-- concurrently and queues conflicting operations.
stackSet_managedExecution :: Lens.Lens' StackSet (Prelude.Maybe ManagedExecution)
stackSet_managedExecution :: Lens' StackSet (Maybe ManagedExecution)
stackSet_managedExecution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe ManagedExecution
managedExecution :: Maybe ManagedExecution
$sel:managedExecution:StackSet' :: StackSet -> Maybe ManagedExecution
managedExecution} -> Maybe ManagedExecution
managedExecution) (\s :: StackSet
s@StackSet' {} Maybe ManagedExecution
a -> StackSet
s {$sel:managedExecution:StackSet' :: Maybe ManagedExecution
managedExecution = Maybe ManagedExecution
a} :: StackSet)

-- | [Service-managed permissions] The organization root ID or organizational
-- unit (OU) IDs that you specified for
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html DeploymentTargets>.
stackSet_organizationalUnitIds :: Lens.Lens' StackSet (Prelude.Maybe [Prelude.Text])
stackSet_organizationalUnitIds :: Lens' StackSet (Maybe [Text])
stackSet_organizationalUnitIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Text]
organizationalUnitIds :: Maybe [Text]
$sel:organizationalUnitIds:StackSet' :: StackSet -> Maybe [Text]
organizationalUnitIds} -> Maybe [Text]
organizationalUnitIds) (\s :: StackSet
s@StackSet' {} Maybe [Text]
a -> StackSet
s {$sel:organizationalUnitIds:StackSet' :: Maybe [Text]
organizationalUnitIds = Maybe [Text]
a} :: StackSet) 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

-- | A list of input parameters for a stack set.
stackSet_parameters :: Lens.Lens' StackSet (Prelude.Maybe [Parameter])
stackSet_parameters :: Lens' StackSet (Maybe [Parameter])
stackSet_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:StackSet' :: StackSet -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: StackSet
s@StackSet' {} Maybe [Parameter]
a -> StackSet
s {$sel:parameters:StackSet' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: StackSet) 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

-- | Describes how the IAM roles required for stack set operations are
-- created.
--
-- -   With @self-managed@ permissions, you must create the administrator
--     and execution roles required to deploy to target accounts. For more
--     information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html Grant Self-Managed Stack Set Permissions>.
--
-- -   With @service-managed@ permissions, StackSets automatically creates
--     the IAM roles required to deploy to accounts managed by
--     Organizations. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html Grant Service-Managed Stack Set Permissions>.
stackSet_permissionModel :: Lens.Lens' StackSet (Prelude.Maybe PermissionModels)
stackSet_permissionModel :: Lens' StackSet (Maybe PermissionModels)
stackSet_permissionModel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe PermissionModels
permissionModel :: Maybe PermissionModels
$sel:permissionModel:StackSet' :: StackSet -> Maybe PermissionModels
permissionModel} -> Maybe PermissionModels
permissionModel) (\s :: StackSet
s@StackSet' {} Maybe PermissionModels
a -> StackSet
s {$sel:permissionModel:StackSet' :: Maybe PermissionModels
permissionModel = Maybe PermissionModels
a} :: StackSet)

-- | The Amazon Resource Name (ARN) of the stack set.
stackSet_stackSetARN :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_stackSetARN :: Lens' StackSet (Maybe Text)
stackSet_stackSetARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
stackSetARN :: Maybe Text
$sel:stackSetARN:StackSet' :: StackSet -> Maybe Text
stackSetARN} -> Maybe Text
stackSetARN) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:stackSetARN:StackSet' :: Maybe Text
stackSetARN = Maybe Text
a} :: StackSet)

-- | Detailed information about the drift status of the stack set.
--
-- For stack sets, contains information about the last /completed/ drift
-- operation performed on the stack set. Information about drift operations
-- currently in progress isn\'t included.
stackSet_stackSetDriftDetectionDetails :: Lens.Lens' StackSet (Prelude.Maybe StackSetDriftDetectionDetails)
stackSet_stackSetDriftDetectionDetails :: Lens' StackSet (Maybe StackSetDriftDetectionDetails)
stackSet_stackSetDriftDetectionDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails :: Maybe StackSetDriftDetectionDetails
$sel:stackSetDriftDetectionDetails:StackSet' :: StackSet -> Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails} -> Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails) (\s :: StackSet
s@StackSet' {} Maybe StackSetDriftDetectionDetails
a -> StackSet
s {$sel:stackSetDriftDetectionDetails:StackSet' :: Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails = Maybe StackSetDriftDetectionDetails
a} :: StackSet)

-- | The ID of the stack set.
stackSet_stackSetId :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_stackSetId :: Lens' StackSet (Maybe Text)
stackSet_stackSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
stackSetId :: Maybe Text
$sel:stackSetId:StackSet' :: StackSet -> Maybe Text
stackSetId} -> Maybe Text
stackSetId) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:stackSetId:StackSet' :: Maybe Text
stackSetId = Maybe Text
a} :: StackSet)

-- | The name that\'s associated with the stack set.
stackSet_stackSetName :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_stackSetName :: Lens' StackSet (Maybe Text)
stackSet_stackSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
stackSetName :: Maybe Text
$sel:stackSetName:StackSet' :: StackSet -> Maybe Text
stackSetName} -> Maybe Text
stackSetName) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:stackSetName:StackSet' :: Maybe Text
stackSetName = Maybe Text
a} :: StackSet)

-- | The status of the stack set.
stackSet_status :: Lens.Lens' StackSet (Prelude.Maybe StackSetStatus)
stackSet_status :: Lens' StackSet (Maybe StackSetStatus)
stackSet_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe StackSetStatus
status :: Maybe StackSetStatus
$sel:status:StackSet' :: StackSet -> Maybe StackSetStatus
status} -> Maybe StackSetStatus
status) (\s :: StackSet
s@StackSet' {} Maybe StackSetStatus
a -> StackSet
s {$sel:status:StackSet' :: Maybe StackSetStatus
status = Maybe StackSetStatus
a} :: StackSet)

-- | A list of tags that specify information about the stack set. A maximum
-- number of 50 tags can be specified.
stackSet_tags :: Lens.Lens' StackSet (Prelude.Maybe [Tag])
stackSet_tags :: Lens' StackSet (Maybe [Tag])
stackSet_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StackSet' :: StackSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StackSet
s@StackSet' {} Maybe [Tag]
a -> StackSet
s {$sel:tags:StackSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StackSet) 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 structure that contains the body of the template that was used to
-- create or update the stack set.
stackSet_templateBody :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_templateBody :: Lens' StackSet (Maybe Text)
stackSet_templateBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:StackSet' :: StackSet -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:templateBody:StackSet' :: Maybe Text
templateBody = Maybe Text
a} :: StackSet)

instance Data.FromXML StackSet where
  parseXML :: [Node] -> Either String StackSet
parseXML [Node]
x =
    Maybe Text
-> Maybe AutoDeployment
-> Maybe [Capability]
-> Maybe Text
-> Maybe Text
-> Maybe ManagedExecution
-> Maybe [Text]
-> Maybe [Parameter]
-> Maybe PermissionModels
-> Maybe Text
-> Maybe StackSetDriftDetectionDetails
-> Maybe Text
-> Maybe Text
-> Maybe StackSetStatus
-> Maybe [Tag]
-> Maybe Text
-> StackSet
StackSet'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AdministrationRoleARN")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AutoDeployment")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Capabilities"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Description")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ExecutionRoleName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ManagedExecution")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"OrganizationalUnitIds"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Parameters"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PermissionModel")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StackSetARN")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StackSetDriftDetectionDetails")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StackSetId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StackSetName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Status")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Tags"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TemplateBody")

instance Prelude.Hashable StackSet where
  hashWithSalt :: Int -> StackSet -> Int
hashWithSalt Int
_salt StackSet' {Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe AutoDeployment
Maybe ManagedExecution
Maybe PermissionModels
Maybe StackSetDriftDetectionDetails
Maybe StackSetStatus
templateBody :: Maybe Text
tags :: Maybe [Tag]
status :: Maybe StackSetStatus
stackSetName :: Maybe Text
stackSetId :: Maybe Text
stackSetDriftDetectionDetails :: Maybe StackSetDriftDetectionDetails
stackSetARN :: Maybe Text
permissionModel :: Maybe PermissionModels
parameters :: Maybe [Parameter]
organizationalUnitIds :: Maybe [Text]
managedExecution :: Maybe ManagedExecution
executionRoleName :: Maybe Text
description :: Maybe Text
capabilities :: Maybe [Capability]
autoDeployment :: Maybe AutoDeployment
administrationRoleARN :: Maybe Text
$sel:templateBody:StackSet' :: StackSet -> Maybe Text
$sel:tags:StackSet' :: StackSet -> Maybe [Tag]
$sel:status:StackSet' :: StackSet -> Maybe StackSetStatus
$sel:stackSetName:StackSet' :: StackSet -> Maybe Text
$sel:stackSetId:StackSet' :: StackSet -> Maybe Text
$sel:stackSetDriftDetectionDetails:StackSet' :: StackSet -> Maybe StackSetDriftDetectionDetails
$sel:stackSetARN:StackSet' :: StackSet -> Maybe Text
$sel:permissionModel:StackSet' :: StackSet -> Maybe PermissionModels
$sel:parameters:StackSet' :: StackSet -> Maybe [Parameter]
$sel:organizationalUnitIds:StackSet' :: StackSet -> Maybe [Text]
$sel:managedExecution:StackSet' :: StackSet -> Maybe ManagedExecution
$sel:executionRoleName:StackSet' :: StackSet -> Maybe Text
$sel:description:StackSet' :: StackSet -> Maybe Text
$sel:capabilities:StackSet' :: StackSet -> Maybe [Capability]
$sel:autoDeployment:StackSet' :: StackSet -> Maybe AutoDeployment
$sel:administrationRoleARN:StackSet' :: StackSet -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
administrationRoleARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoDeployment
autoDeployment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Capability]
capabilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionRoleName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ManagedExecution
managedExecution
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
organizationalUnitIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Parameter]
parameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PermissionModels
permissionModel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackSetARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackSetName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackSetStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateBody

instance Prelude.NFData StackSet where
  rnf :: StackSet -> ()
rnf StackSet' {Maybe [Text]
Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe AutoDeployment
Maybe ManagedExecution
Maybe PermissionModels
Maybe StackSetDriftDetectionDetails
Maybe StackSetStatus
templateBody :: Maybe Text
tags :: Maybe [Tag]
status :: Maybe StackSetStatus
stackSetName :: Maybe Text
stackSetId :: Maybe Text
stackSetDriftDetectionDetails :: Maybe StackSetDriftDetectionDetails
stackSetARN :: Maybe Text
permissionModel :: Maybe PermissionModels
parameters :: Maybe [Parameter]
organizationalUnitIds :: Maybe [Text]
managedExecution :: Maybe ManagedExecution
executionRoleName :: Maybe Text
description :: Maybe Text
capabilities :: Maybe [Capability]
autoDeployment :: Maybe AutoDeployment
administrationRoleARN :: Maybe Text
$sel:templateBody:StackSet' :: StackSet -> Maybe Text
$sel:tags:StackSet' :: StackSet -> Maybe [Tag]
$sel:status:StackSet' :: StackSet -> Maybe StackSetStatus
$sel:stackSetName:StackSet' :: StackSet -> Maybe Text
$sel:stackSetId:StackSet' :: StackSet -> Maybe Text
$sel:stackSetDriftDetectionDetails:StackSet' :: StackSet -> Maybe StackSetDriftDetectionDetails
$sel:stackSetARN:StackSet' :: StackSet -> Maybe Text
$sel:permissionModel:StackSet' :: StackSet -> Maybe PermissionModels
$sel:parameters:StackSet' :: StackSet -> Maybe [Parameter]
$sel:organizationalUnitIds:StackSet' :: StackSet -> Maybe [Text]
$sel:managedExecution:StackSet' :: StackSet -> Maybe ManagedExecution
$sel:executionRoleName:StackSet' :: StackSet -> Maybe Text
$sel:description:StackSet' :: StackSet -> Maybe Text
$sel:capabilities:StackSet' :: StackSet -> Maybe [Capability]
$sel:autoDeployment:StackSet' :: StackSet -> Maybe AutoDeployment
$sel:administrationRoleARN:StackSet' :: StackSet -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
administrationRoleARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoDeployment
autoDeployment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Capability]
capabilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionRoleName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ManagedExecution
managedExecution
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
organizationalUnitIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Parameter]
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PermissionModels
permissionModel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackSetARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackSetStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateBody