{-# 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.CloudFormation.CreateStackSet
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a stack set.
module Amazonka.CloudFormation.CreateStackSet
  ( -- * Creating a Request
    CreateStackSet (..),
    newCreateStackSet,

    -- * Request Lenses
    createStackSet_administrationRoleARN,
    createStackSet_autoDeployment,
    createStackSet_callAs,
    createStackSet_capabilities,
    createStackSet_clientRequestToken,
    createStackSet_description,
    createStackSet_executionRoleName,
    createStackSet_managedExecution,
    createStackSet_parameters,
    createStackSet_permissionModel,
    createStackSet_stackId,
    createStackSet_tags,
    createStackSet_templateBody,
    createStackSet_templateURL,
    createStackSet_stackSetName,

    -- * Destructuring the Response
    CreateStackSetResponse (..),
    newCreateStackSetResponse,

    -- * Response Lenses
    createStackSetResponse_stackSetId,
    createStackSetResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.Types
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateStackSet' smart constructor.
data CreateStackSet = CreateStackSet'
  { -- | The Amazon Resource Name (ARN) of the IAM role to use to create this
    -- stack set.
    --
    -- Specify an IAM role only if you are using 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/.
    CreateStackSet -> Maybe Text
administrationRoleARN :: Prelude.Maybe Prelude.Text,
    -- | Describes whether StackSets automatically deploys to Organizations
    -- accounts that are added to the target organization or organizational
    -- unit (OU). Specify only if @PermissionModel@ is @SERVICE_MANAGED@.
    CreateStackSet -> Maybe AutoDeployment
autoDeployment :: Prelude.Maybe AutoDeployment,
    -- | [Service-managed permissions] Specifies whether you are acting as an
    -- account administrator in the organization\'s management account or as a
    -- delegated administrator in a member account.
    --
    -- By default, @SELF@ is specified. Use @SELF@ for stack sets with
    -- self-managed permissions.
    --
    -- -   To create a stack set with service-managed permissions while signed
    --     in to the management account, specify @SELF@.
    --
    -- -   To create a stack set with service-managed permissions while signed
    --     in to a delegated administrator account, specify @DELEGATED_ADMIN@.
    --
    --     Your Amazon Web Services account must be registered as a delegated
    --     admin in the management account. For more information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
    --     in the /CloudFormation User Guide/.
    --
    -- Stack sets with service-managed permissions are created in the
    -- management account, including stack sets that are created by delegated
    -- administrators.
    CreateStackSet -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
    -- | In some cases, you must explicitly acknowledge that your stack set
    -- template contains certain capabilities in order for CloudFormation to
    -- create the stack set and related stack instances.
    --
    -- -   @CAPABILITY_IAM@ and @CAPABILITY_NAMED_IAM@
    --
    --     Some stack 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 those
    --     stack sets, you must explicitly acknowledge this by specifying one
    --     of these capabilities.
    --
    --     The following IAM resources require you to specify either the
    --     @CAPABILITY_IAM@ or @CAPABILITY_NAMED_IAM@ capability.
    --
    --     -   If you have IAM resources, you can specify either capability.
    --
    --     -   If you have IAM resources with custom names, you /must/ specify
    --         @CAPABILITY_NAMED_IAM@.
    --
    --     -   If you don\'t specify either of these capabilities,
    --         CloudFormation returns an @InsufficientCapabilities@ error.
    --
    --     If your stack template contains these resources, we recommend that
    --     you review all permissions associated with them and edit their
    --     permissions if necessary.
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>
    --
    --     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>
    --
    --     For more information, see
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
    --
    -- -   @CAPABILITY_AUTO_EXPAND@
    --
    --     Some templates reference macros. If your stack set template
    --     references one or more macros, you must create the stack set
    --     directly from the processed template, without first reviewing the
    --     resulting changes in a change set. To create the stack set directly,
    --     you must acknowledge this capability. For more information, see
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
    --
    --     Stack sets with service-managed permissions don\'t currently support
    --     the use of macros in templates. (This includes the
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
    --     and
    --     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
    --     transforms, which are macros hosted by CloudFormation.) Even if you
    --     specify this capability for a stack set with service-managed
    --     permissions, if you reference a macro in your template the stack set
    --     operation will fail.
    CreateStackSet -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | A unique identifier for this @CreateStackSet@ request. Specify this
    -- token if you plan to retry requests so that CloudFormation knows that
    -- you\'re not attempting to create another stack set with the same name.
    -- You might retry @CreateStackSet@ requests to ensure that CloudFormation
    -- successfully received them.
    --
    -- If you don\'t specify an operation ID, the SDK generates one
    -- automatically.
    CreateStackSet -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A description of the stack set. You can use the description to identify
    -- the stack set\'s purpose or other important information.
    CreateStackSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the IAM execution role to use to create the stack set. If
    -- you do not specify an execution role, CloudFormation uses the
    -- @AWSCloudFormationStackSetExecutionRole@ role for the stack set
    -- operation.
    --
    -- Specify an IAM role only if you are using customized execution roles to
    -- control which stack resources users and groups can include in their
    -- stack sets.
    CreateStackSet -> Maybe Text
executionRoleName :: Prelude.Maybe Prelude.Text,
    -- | Describes whether StackSets performs non-conflicting operations
    -- concurrently and queues conflicting operations.
    CreateStackSet -> Maybe ManagedExecution
managedExecution :: Prelude.Maybe ManagedExecution,
    -- | The input parameters for the stack set template.
    CreateStackSet -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | Describes how the IAM roles required for stack set operations are
    -- created. By default, @SELF-MANAGED@ is specified.
    --
    -- -   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>.
    CreateStackSet -> Maybe PermissionModels
permissionModel :: Prelude.Maybe PermissionModels,
    -- | The stack ID you are importing into a new stack set. Specify the Amazon
    -- Resource Name (ARN) of the stack.
    CreateStackSet -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The key-value pairs to associate with this stack set and the stacks
    -- created from it. CloudFormation also propagates these tags to supported
    -- resources that are created in the stacks. A maximum number of 50 tags
    -- can be specified.
    --
    -- If you specify tags as part of a @CreateStackSet@ action, CloudFormation
    -- checks to see if you have the required IAM permission to tag resources.
    -- If you don\'t, the entire @CreateStackSet@ action fails with an
    -- @access denied@ error, and the stack set is not created.
    CreateStackSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The structure that contains the template body, with a minimum length of
    -- 1 byte and a maximum length of 51,200 bytes. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify either the TemplateBody or the TemplateURL
    -- parameter, but not both.
    CreateStackSet -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | The location of the file that contains the template body. The URL must
    -- point to a template (maximum size: 460,800 bytes) that\'s located in an
    -- Amazon S3 bucket or a Systems Manager document. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must specify either the TemplateBody or the TemplateURL
    -- parameter, but not both.
    CreateStackSet -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text,
    -- | The name to associate with the stack set. The name must be unique in the
    -- Region where you create your stack set.
    --
    -- A stack name can contain only alphanumeric characters (case-sensitive)
    -- and hyphens. It must start with an alphabetic character and can\'t be
    -- longer than 128 characters.
    CreateStackSet -> Text
stackSetName :: Prelude.Text
  }
  deriving (CreateStackSet -> CreateStackSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStackSet -> CreateStackSet -> Bool
$c/= :: CreateStackSet -> CreateStackSet -> Bool
== :: CreateStackSet -> CreateStackSet -> Bool
$c== :: CreateStackSet -> CreateStackSet -> Bool
Prelude.Eq, ReadPrec [CreateStackSet]
ReadPrec CreateStackSet
Int -> ReadS CreateStackSet
ReadS [CreateStackSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStackSet]
$creadListPrec :: ReadPrec [CreateStackSet]
readPrec :: ReadPrec CreateStackSet
$creadPrec :: ReadPrec CreateStackSet
readList :: ReadS [CreateStackSet]
$creadList :: ReadS [CreateStackSet]
readsPrec :: Int -> ReadS CreateStackSet
$creadsPrec :: Int -> ReadS CreateStackSet
Prelude.Read, Int -> CreateStackSet -> ShowS
[CreateStackSet] -> ShowS
CreateStackSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStackSet] -> ShowS
$cshowList :: [CreateStackSet] -> ShowS
show :: CreateStackSet -> String
$cshow :: CreateStackSet -> String
showsPrec :: Int -> CreateStackSet -> ShowS
$cshowsPrec :: Int -> CreateStackSet -> ShowS
Prelude.Show, forall x. Rep CreateStackSet x -> CreateStackSet
forall x. CreateStackSet -> Rep CreateStackSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStackSet x -> CreateStackSet
$cfrom :: forall x. CreateStackSet -> Rep CreateStackSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateStackSet' 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', 'createStackSet_administrationRoleARN' - The Amazon Resource Name (ARN) of the IAM role to use to create this
-- stack set.
--
-- Specify an IAM role only if you are using 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', 'createStackSet_autoDeployment' - Describes whether StackSets automatically deploys to Organizations
-- accounts that are added to the target organization or organizational
-- unit (OU). Specify only if @PermissionModel@ is @SERVICE_MANAGED@.
--
-- 'callAs', 'createStackSet_callAs' - [Service-managed permissions] Specifies whether you are acting as an
-- account administrator in the organization\'s management account or as a
-- delegated administrator in a member account.
--
-- By default, @SELF@ is specified. Use @SELF@ for stack sets with
-- self-managed permissions.
--
-- -   To create a stack set with service-managed permissions while signed
--     in to the management account, specify @SELF@.
--
-- -   To create a stack set with service-managed permissions while signed
--     in to a delegated administrator account, specify @DELEGATED_ADMIN@.
--
--     Your Amazon Web Services account must be registered as a delegated
--     admin in the management account. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
--     in the /CloudFormation User Guide/.
--
-- Stack sets with service-managed permissions are created in the
-- management account, including stack sets that are created by delegated
-- administrators.
--
-- 'capabilities', 'createStackSet_capabilities' - In some cases, you must explicitly acknowledge that your stack set
-- template contains certain capabilities in order for CloudFormation to
-- create the stack set and related stack instances.
--
-- -   @CAPABILITY_IAM@ and @CAPABILITY_NAMED_IAM@
--
--     Some stack 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 those
--     stack sets, you must explicitly acknowledge this by specifying one
--     of these capabilities.
--
--     The following IAM resources require you to specify either the
--     @CAPABILITY_IAM@ or @CAPABILITY_NAMED_IAM@ capability.
--
--     -   If you have IAM resources, you can specify either capability.
--
--     -   If you have IAM resources with custom names, you /must/ specify
--         @CAPABILITY_NAMED_IAM@.
--
--     -   If you don\'t specify either of these capabilities,
--         CloudFormation returns an @InsufficientCapabilities@ error.
--
--     If your stack template contains these resources, we recommend that
--     you review all permissions associated with them and edit their
--     permissions if necessary.
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
--
-- -   @CAPABILITY_AUTO_EXPAND@
--
--     Some templates reference macros. If your stack set template
--     references one or more macros, you must create the stack set
--     directly from the processed template, without first reviewing the
--     resulting changes in a change set. To create the stack set directly,
--     you must acknowledge this capability. For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
--
--     Stack sets with service-managed permissions don\'t currently support
--     the use of macros in templates. (This includes the
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
--     and
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
--     transforms, which are macros hosted by CloudFormation.) Even if you
--     specify this capability for a stack set with service-managed
--     permissions, if you reference a macro in your template the stack set
--     operation will fail.
--
-- 'clientRequestToken', 'createStackSet_clientRequestToken' - A unique identifier for this @CreateStackSet@ request. Specify this
-- token if you plan to retry requests so that CloudFormation knows that
-- you\'re not attempting to create another stack set with the same name.
-- You might retry @CreateStackSet@ requests to ensure that CloudFormation
-- successfully received them.
--
-- If you don\'t specify an operation ID, the SDK generates one
-- automatically.
--
-- 'description', 'createStackSet_description' - A description of the stack set. You can use the description to identify
-- the stack set\'s purpose or other important information.
--
-- 'executionRoleName', 'createStackSet_executionRoleName' - The name of the IAM execution role to use to create the stack set. If
-- you do not specify an execution role, CloudFormation uses the
-- @AWSCloudFormationStackSetExecutionRole@ role for the stack set
-- operation.
--
-- Specify an IAM role only if you are using customized execution roles to
-- control which stack resources users and groups can include in their
-- stack sets.
--
-- 'managedExecution', 'createStackSet_managedExecution' - Describes whether StackSets performs non-conflicting operations
-- concurrently and queues conflicting operations.
--
-- 'parameters', 'createStackSet_parameters' - The input parameters for the stack set template.
--
-- 'permissionModel', 'createStackSet_permissionModel' - Describes how the IAM roles required for stack set operations are
-- created. By default, @SELF-MANAGED@ is specified.
--
-- -   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>.
--
-- 'stackId', 'createStackSet_stackId' - The stack ID you are importing into a new stack set. Specify the Amazon
-- Resource Name (ARN) of the stack.
--
-- 'tags', 'createStackSet_tags' - The key-value pairs to associate with this stack set and the stacks
-- created from it. CloudFormation also propagates these tags to supported
-- resources that are created in the stacks. A maximum number of 50 tags
-- can be specified.
--
-- If you specify tags as part of a @CreateStackSet@ action, CloudFormation
-- checks to see if you have the required IAM permission to tag resources.
-- If you don\'t, the entire @CreateStackSet@ action fails with an
-- @access denied@ error, and the stack set is not created.
--
-- 'templateBody', 'createStackSet_templateBody' - The structure that contains the template body, with a minimum length of
-- 1 byte and a maximum length of 51,200 bytes. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the TemplateBody or the TemplateURL
-- parameter, but not both.
--
-- 'templateURL', 'createStackSet_templateURL' - The location of the file that contains the template body. The URL must
-- point to a template (maximum size: 460,800 bytes) that\'s located in an
-- Amazon S3 bucket or a Systems Manager document. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the TemplateBody or the TemplateURL
-- parameter, but not both.
--
-- 'stackSetName', 'createStackSet_stackSetName' - The name to associate with the stack set. The name must be unique in the
-- Region where you create your stack set.
--
-- A stack name can contain only alphanumeric characters (case-sensitive)
-- and hyphens. It must start with an alphabetic character and can\'t be
-- longer than 128 characters.
newCreateStackSet ::
  -- | 'stackSetName'
  Prelude.Text ->
  CreateStackSet
newCreateStackSet :: Text -> CreateStackSet
newCreateStackSet Text
pStackSetName_ =
  CreateStackSet'
    { $sel:administrationRoleARN:CreateStackSet' :: Maybe Text
administrationRoleARN =
        forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeployment:CreateStackSet' :: Maybe AutoDeployment
autoDeployment = forall a. Maybe a
Prelude.Nothing,
      $sel:callAs:CreateStackSet' :: Maybe CallAs
callAs = forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:CreateStackSet' :: Maybe [Capability]
capabilities = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateStackSet' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateStackSet' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleName:CreateStackSet' :: Maybe Text
executionRoleName = forall a. Maybe a
Prelude.Nothing,
      $sel:managedExecution:CreateStackSet' :: Maybe ManagedExecution
managedExecution = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:CreateStackSet' :: Maybe [Parameter]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:permissionModel:CreateStackSet' :: Maybe PermissionModels
permissionModel = forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:CreateStackSet' :: Maybe Text
stackId = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateStackSet' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:CreateStackSet' :: Maybe Text
templateBody = forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:CreateStackSet' :: Maybe Text
templateURL = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetName:CreateStackSet' :: Text
stackSetName = Text
pStackSetName_
    }

-- | The Amazon Resource Name (ARN) of the IAM role to use to create this
-- stack set.
--
-- Specify an IAM role only if you are using 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/.
createStackSet_administrationRoleARN :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_administrationRoleARN :: Lens' CreateStackSet (Maybe Text)
createStackSet_administrationRoleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
administrationRoleARN :: Maybe Text
$sel:administrationRoleARN:CreateStackSet' :: CreateStackSet -> Maybe Text
administrationRoleARN} -> Maybe Text
administrationRoleARN) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:administrationRoleARN:CreateStackSet' :: Maybe Text
administrationRoleARN = Maybe Text
a} :: CreateStackSet)

-- | Describes whether StackSets automatically deploys to Organizations
-- accounts that are added to the target organization or organizational
-- unit (OU). Specify only if @PermissionModel@ is @SERVICE_MANAGED@.
createStackSet_autoDeployment :: Lens.Lens' CreateStackSet (Prelude.Maybe AutoDeployment)
createStackSet_autoDeployment :: Lens' CreateStackSet (Maybe AutoDeployment)
createStackSet_autoDeployment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe AutoDeployment
autoDeployment :: Maybe AutoDeployment
$sel:autoDeployment:CreateStackSet' :: CreateStackSet -> Maybe AutoDeployment
autoDeployment} -> Maybe AutoDeployment
autoDeployment) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe AutoDeployment
a -> CreateStackSet
s {$sel:autoDeployment:CreateStackSet' :: Maybe AutoDeployment
autoDeployment = Maybe AutoDeployment
a} :: CreateStackSet)

-- | [Service-managed permissions] Specifies whether you are acting as an
-- account administrator in the organization\'s management account or as a
-- delegated administrator in a member account.
--
-- By default, @SELF@ is specified. Use @SELF@ for stack sets with
-- self-managed permissions.
--
-- -   To create a stack set with service-managed permissions while signed
--     in to the management account, specify @SELF@.
--
-- -   To create a stack set with service-managed permissions while signed
--     in to a delegated administrator account, specify @DELEGATED_ADMIN@.
--
--     Your Amazon Web Services account must be registered as a delegated
--     admin in the management account. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html Register a delegated administrator>
--     in the /CloudFormation User Guide/.
--
-- Stack sets with service-managed permissions are created in the
-- management account, including stack sets that are created by delegated
-- administrators.
createStackSet_callAs :: Lens.Lens' CreateStackSet (Prelude.Maybe CallAs)
createStackSet_callAs :: Lens' CreateStackSet (Maybe CallAs)
createStackSet_callAs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:CreateStackSet' :: CreateStackSet -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe CallAs
a -> CreateStackSet
s {$sel:callAs:CreateStackSet' :: Maybe CallAs
callAs = Maybe CallAs
a} :: CreateStackSet)

-- | In some cases, you must explicitly acknowledge that your stack set
-- template contains certain capabilities in order for CloudFormation to
-- create the stack set and related stack instances.
--
-- -   @CAPABILITY_IAM@ and @CAPABILITY_NAMED_IAM@
--
--     Some stack 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 those
--     stack sets, you must explicitly acknowledge this by specifying one
--     of these capabilities.
--
--     The following IAM resources require you to specify either the
--     @CAPABILITY_IAM@ or @CAPABILITY_NAMED_IAM@ capability.
--
--     -   If you have IAM resources, you can specify either capability.
--
--     -   If you have IAM resources with custom names, you /must/ specify
--         @CAPABILITY_NAMED_IAM@.
--
--     -   If you don\'t specify either of these capabilities,
--         CloudFormation returns an @InsufficientCapabilities@ error.
--
--     If your stack template contains these resources, we recommend that
--     you review all permissions associated with them and edit their
--     permissions if necessary.
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>
--
--     -   <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>
--
--     For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates>.
--
-- -   @CAPABILITY_AUTO_EXPAND@
--
--     Some templates reference macros. If your stack set template
--     references one or more macros, you must create the stack set
--     directly from the processed template, without first reviewing the
--     resulting changes in a change set. To create the stack set directly,
--     you must acknowledge this capability. For more information, see
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html Using CloudFormation Macros to Perform Custom Processing on Templates>.
--
--     Stack sets with service-managed permissions don\'t currently support
--     the use of macros in templates. (This includes the
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html AWS::Include>
--     and
--     <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html AWS::Serverless>
--     transforms, which are macros hosted by CloudFormation.) Even if you
--     specify this capability for a stack set with service-managed
--     permissions, if you reference a macro in your template the stack set
--     operation will fail.
createStackSet_capabilities :: Lens.Lens' CreateStackSet (Prelude.Maybe [Capability])
createStackSet_capabilities :: Lens' CreateStackSet (Maybe [Capability])
createStackSet_capabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:CreateStackSet' :: CreateStackSet -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe [Capability]
a -> CreateStackSet
s {$sel:capabilities:CreateStackSet' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: CreateStackSet) 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 unique identifier for this @CreateStackSet@ request. Specify this
-- token if you plan to retry requests so that CloudFormation knows that
-- you\'re not attempting to create another stack set with the same name.
-- You might retry @CreateStackSet@ requests to ensure that CloudFormation
-- successfully received them.
--
-- If you don\'t specify an operation ID, the SDK generates one
-- automatically.
createStackSet_clientRequestToken :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_clientRequestToken :: Lens' CreateStackSet (Maybe Text)
createStackSet_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateStackSet' :: CreateStackSet -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:clientRequestToken:CreateStackSet' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateStackSet)

-- | A description of the stack set. You can use the description to identify
-- the stack set\'s purpose or other important information.
createStackSet_description :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_description :: Lens' CreateStackSet (Maybe Text)
createStackSet_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
description :: Maybe Text
$sel:description:CreateStackSet' :: CreateStackSet -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:description:CreateStackSet' :: Maybe Text
description = Maybe Text
a} :: CreateStackSet)

-- | The name of the IAM execution role to use to create the stack set. If
-- you do not specify an execution role, CloudFormation uses the
-- @AWSCloudFormationStackSetExecutionRole@ role for the stack set
-- operation.
--
-- Specify an IAM role only if you are using customized execution roles to
-- control which stack resources users and groups can include in their
-- stack sets.
createStackSet_executionRoleName :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_executionRoleName :: Lens' CreateStackSet (Maybe Text)
createStackSet_executionRoleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
executionRoleName :: Maybe Text
$sel:executionRoleName:CreateStackSet' :: CreateStackSet -> Maybe Text
executionRoleName} -> Maybe Text
executionRoleName) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:executionRoleName:CreateStackSet' :: Maybe Text
executionRoleName = Maybe Text
a} :: CreateStackSet)

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

-- | The input parameters for the stack set template.
createStackSet_parameters :: Lens.Lens' CreateStackSet (Prelude.Maybe [Parameter])
createStackSet_parameters :: Lens' CreateStackSet (Maybe [Parameter])
createStackSet_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:CreateStackSet' :: CreateStackSet -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe [Parameter]
a -> CreateStackSet
s {$sel:parameters:CreateStackSet' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: CreateStackSet) 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. By default, @SELF-MANAGED@ is specified.
--
-- -   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>.
createStackSet_permissionModel :: Lens.Lens' CreateStackSet (Prelude.Maybe PermissionModels)
createStackSet_permissionModel :: Lens' CreateStackSet (Maybe PermissionModels)
createStackSet_permissionModel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe PermissionModels
permissionModel :: Maybe PermissionModels
$sel:permissionModel:CreateStackSet' :: CreateStackSet -> Maybe PermissionModels
permissionModel} -> Maybe PermissionModels
permissionModel) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe PermissionModels
a -> CreateStackSet
s {$sel:permissionModel:CreateStackSet' :: Maybe PermissionModels
permissionModel = Maybe PermissionModels
a} :: CreateStackSet)

-- | The stack ID you are importing into a new stack set. Specify the Amazon
-- Resource Name (ARN) of the stack.
createStackSet_stackId :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_stackId :: Lens' CreateStackSet (Maybe Text)
createStackSet_stackId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
stackId :: Maybe Text
$sel:stackId:CreateStackSet' :: CreateStackSet -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:stackId:CreateStackSet' :: Maybe Text
stackId = Maybe Text
a} :: CreateStackSet)

-- | The key-value pairs to associate with this stack set and the stacks
-- created from it. CloudFormation also propagates these tags to supported
-- resources that are created in the stacks. A maximum number of 50 tags
-- can be specified.
--
-- If you specify tags as part of a @CreateStackSet@ action, CloudFormation
-- checks to see if you have the required IAM permission to tag resources.
-- If you don\'t, the entire @CreateStackSet@ action fails with an
-- @access denied@ error, and the stack set is not created.
createStackSet_tags :: Lens.Lens' CreateStackSet (Prelude.Maybe [Tag])
createStackSet_tags :: Lens' CreateStackSet (Maybe [Tag])
createStackSet_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateStackSet' :: CreateStackSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe [Tag]
a -> CreateStackSet
s {$sel:tags:CreateStackSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateStackSet) 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 template body, with a minimum length of
-- 1 byte and a maximum length of 51,200 bytes. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the TemplateBody or the TemplateURL
-- parameter, but not both.
createStackSet_templateBody :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_templateBody :: Lens' CreateStackSet (Maybe Text)
createStackSet_templateBody = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:CreateStackSet' :: CreateStackSet -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:templateBody:CreateStackSet' :: Maybe Text
templateBody = Maybe Text
a} :: CreateStackSet)

-- | The location of the file that contains the template body. The URL must
-- point to a template (maximum size: 460,800 bytes) that\'s located in an
-- Amazon S3 bucket or a Systems Manager document. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must specify either the TemplateBody or the TemplateURL
-- parameter, but not both.
createStackSet_templateURL :: Lens.Lens' CreateStackSet (Prelude.Maybe Prelude.Text)
createStackSet_templateURL :: Lens' CreateStackSet (Maybe Text)
createStackSet_templateURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Maybe Text
templateURL :: Maybe Text
$sel:templateURL:CreateStackSet' :: CreateStackSet -> Maybe Text
templateURL} -> Maybe Text
templateURL) (\s :: CreateStackSet
s@CreateStackSet' {} Maybe Text
a -> CreateStackSet
s {$sel:templateURL:CreateStackSet' :: Maybe Text
templateURL = Maybe Text
a} :: CreateStackSet)

-- | The name to associate with the stack set. The name must be unique in the
-- Region where you create your stack set.
--
-- A stack name can contain only alphanumeric characters (case-sensitive)
-- and hyphens. It must start with an alphabetic character and can\'t be
-- longer than 128 characters.
createStackSet_stackSetName :: Lens.Lens' CreateStackSet Prelude.Text
createStackSet_stackSetName :: Lens' CreateStackSet Text
createStackSet_stackSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSet' {Text
stackSetName :: Text
$sel:stackSetName:CreateStackSet' :: CreateStackSet -> Text
stackSetName} -> Text
stackSetName) (\s :: CreateStackSet
s@CreateStackSet' {} Text
a -> CreateStackSet
s {$sel:stackSetName:CreateStackSet' :: Text
stackSetName = Text
a} :: CreateStackSet)

instance Core.AWSRequest CreateStackSet where
  type
    AWSResponse CreateStackSet =
      CreateStackSetResponse
  request :: (Service -> Service) -> CreateStackSet -> Request CreateStackSet
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateStackSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateStackSet)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateStackSetResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> CreateStackSetResponse
CreateStackSetResponse'
            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
"StackSetId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateStackSet where
  hashWithSalt :: Int -> CreateStackSet -> Int
hashWithSalt Int
_salt CreateStackSet' {Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe AutoDeployment
Maybe CallAs
Maybe ManagedExecution
Maybe PermissionModels
Text
stackSetName :: Text
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackId :: Maybe Text
permissionModel :: Maybe PermissionModels
parameters :: Maybe [Parameter]
managedExecution :: Maybe ManagedExecution
executionRoleName :: Maybe Text
description :: Maybe Text
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
callAs :: Maybe CallAs
autoDeployment :: Maybe AutoDeployment
administrationRoleARN :: Maybe Text
$sel:stackSetName:CreateStackSet' :: CreateStackSet -> Text
$sel:templateURL:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:templateBody:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:tags:CreateStackSet' :: CreateStackSet -> Maybe [Tag]
$sel:stackId:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:permissionModel:CreateStackSet' :: CreateStackSet -> Maybe PermissionModels
$sel:parameters:CreateStackSet' :: CreateStackSet -> Maybe [Parameter]
$sel:managedExecution:CreateStackSet' :: CreateStackSet -> Maybe ManagedExecution
$sel:executionRoleName:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:description:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:clientRequestToken:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:capabilities:CreateStackSet' :: CreateStackSet -> Maybe [Capability]
$sel:callAs:CreateStackSet' :: CreateStackSet -> Maybe CallAs
$sel:autoDeployment:CreateStackSet' :: CreateStackSet -> Maybe AutoDeployment
$sel:administrationRoleARN:CreateStackSet' :: CreateStackSet -> 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 CallAs
callAs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Capability]
capabilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      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 [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
stackId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateBody
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateURL
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackSetName

instance Prelude.NFData CreateStackSet where
  rnf :: CreateStackSet -> ()
rnf CreateStackSet' {Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe AutoDeployment
Maybe CallAs
Maybe ManagedExecution
Maybe PermissionModels
Text
stackSetName :: Text
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackId :: Maybe Text
permissionModel :: Maybe PermissionModels
parameters :: Maybe [Parameter]
managedExecution :: Maybe ManagedExecution
executionRoleName :: Maybe Text
description :: Maybe Text
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
callAs :: Maybe CallAs
autoDeployment :: Maybe AutoDeployment
administrationRoleARN :: Maybe Text
$sel:stackSetName:CreateStackSet' :: CreateStackSet -> Text
$sel:templateURL:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:templateBody:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:tags:CreateStackSet' :: CreateStackSet -> Maybe [Tag]
$sel:stackId:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:permissionModel:CreateStackSet' :: CreateStackSet -> Maybe PermissionModels
$sel:parameters:CreateStackSet' :: CreateStackSet -> Maybe [Parameter]
$sel:managedExecution:CreateStackSet' :: CreateStackSet -> Maybe ManagedExecution
$sel:executionRoleName:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:description:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:clientRequestToken:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:capabilities:CreateStackSet' :: CreateStackSet -> Maybe [Capability]
$sel:callAs:CreateStackSet' :: CreateStackSet -> Maybe CallAs
$sel:autoDeployment:CreateStackSet' :: CreateStackSet -> Maybe AutoDeployment
$sel:administrationRoleARN:CreateStackSet' :: CreateStackSet -> 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 CallAs
callAs
      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
clientRequestToken
      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 [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
stackId
      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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateURL
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackSetName

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

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

instance Data.ToQuery CreateStackSet where
  toQuery :: CreateStackSet -> QueryString
toQuery CreateStackSet' {Maybe [Capability]
Maybe [Parameter]
Maybe [Tag]
Maybe Text
Maybe AutoDeployment
Maybe CallAs
Maybe ManagedExecution
Maybe PermissionModels
Text
stackSetName :: Text
templateURL :: Maybe Text
templateBody :: Maybe Text
tags :: Maybe [Tag]
stackId :: Maybe Text
permissionModel :: Maybe PermissionModels
parameters :: Maybe [Parameter]
managedExecution :: Maybe ManagedExecution
executionRoleName :: Maybe Text
description :: Maybe Text
clientRequestToken :: Maybe Text
capabilities :: Maybe [Capability]
callAs :: Maybe CallAs
autoDeployment :: Maybe AutoDeployment
administrationRoleARN :: Maybe Text
$sel:stackSetName:CreateStackSet' :: CreateStackSet -> Text
$sel:templateURL:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:templateBody:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:tags:CreateStackSet' :: CreateStackSet -> Maybe [Tag]
$sel:stackId:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:permissionModel:CreateStackSet' :: CreateStackSet -> Maybe PermissionModels
$sel:parameters:CreateStackSet' :: CreateStackSet -> Maybe [Parameter]
$sel:managedExecution:CreateStackSet' :: CreateStackSet -> Maybe ManagedExecution
$sel:executionRoleName:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:description:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:clientRequestToken:CreateStackSet' :: CreateStackSet -> Maybe Text
$sel:capabilities:CreateStackSet' :: CreateStackSet -> Maybe [Capability]
$sel:callAs:CreateStackSet' :: CreateStackSet -> Maybe CallAs
$sel:autoDeployment:CreateStackSet' :: CreateStackSet -> Maybe AutoDeployment
$sel:administrationRoleARN:CreateStackSet' :: CreateStackSet -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateStackSet" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"AdministrationRoleARN"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
administrationRoleARN,
        ByteString
"AutoDeployment" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe AutoDeployment
autoDeployment,
        ByteString
"CallAs" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CallAs
callAs,
        ByteString
"Capabilities"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Capability]
capabilities),
        ByteString
"ClientRequestToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientRequestToken,
        ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description,
        ByteString
"ExecutionRoleName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
executionRoleName,
        ByteString
"ManagedExecution" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ManagedExecution
managedExecution,
        ByteString
"Parameters"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Parameter]
parameters),
        ByteString
"PermissionModel" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe PermissionModels
permissionModel,
        ByteString
"StackId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackId,
        ByteString
"Tags"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"TemplateBody" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateBody,
        ByteString
"TemplateURL" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
templateURL,
        ByteString
"StackSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackSetName
      ]

-- | /See:/ 'newCreateStackSetResponse' smart constructor.
data CreateStackSetResponse = CreateStackSetResponse'
  { -- | The ID of the stack set that you\'re creating.
    CreateStackSetResponse -> Maybe Text
stackSetId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateStackSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateStackSetResponse -> CreateStackSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStackSetResponse -> CreateStackSetResponse -> Bool
$c/= :: CreateStackSetResponse -> CreateStackSetResponse -> Bool
== :: CreateStackSetResponse -> CreateStackSetResponse -> Bool
$c== :: CreateStackSetResponse -> CreateStackSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateStackSetResponse]
ReadPrec CreateStackSetResponse
Int -> ReadS CreateStackSetResponse
ReadS [CreateStackSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStackSetResponse]
$creadListPrec :: ReadPrec [CreateStackSetResponse]
readPrec :: ReadPrec CreateStackSetResponse
$creadPrec :: ReadPrec CreateStackSetResponse
readList :: ReadS [CreateStackSetResponse]
$creadList :: ReadS [CreateStackSetResponse]
readsPrec :: Int -> ReadS CreateStackSetResponse
$creadsPrec :: Int -> ReadS CreateStackSetResponse
Prelude.Read, Int -> CreateStackSetResponse -> ShowS
[CreateStackSetResponse] -> ShowS
CreateStackSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStackSetResponse] -> ShowS
$cshowList :: [CreateStackSetResponse] -> ShowS
show :: CreateStackSetResponse -> String
$cshow :: CreateStackSetResponse -> String
showsPrec :: Int -> CreateStackSetResponse -> ShowS
$cshowsPrec :: Int -> CreateStackSetResponse -> ShowS
Prelude.Show, forall x. Rep CreateStackSetResponse x -> CreateStackSetResponse
forall x. CreateStackSetResponse -> Rep CreateStackSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStackSetResponse x -> CreateStackSetResponse
$cfrom :: forall x. CreateStackSetResponse -> Rep CreateStackSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateStackSetResponse' 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:
--
-- 'stackSetId', 'createStackSetResponse_stackSetId' - The ID of the stack set that you\'re creating.
--
-- 'httpStatus', 'createStackSetResponse_httpStatus' - The response's http status code.
newCreateStackSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateStackSetResponse
newCreateStackSetResponse :: Int -> CreateStackSetResponse
newCreateStackSetResponse Int
pHttpStatus_ =
  CreateStackSetResponse'
    { $sel:stackSetId:CreateStackSetResponse' :: Maybe Text
stackSetId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateStackSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The response's http status code.
createStackSetResponse_httpStatus :: Lens.Lens' CreateStackSetResponse Prelude.Int
createStackSetResponse_httpStatus :: Lens' CreateStackSetResponse Int
createStackSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStackSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateStackSetResponse' :: CreateStackSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateStackSetResponse
s@CreateStackSetResponse' {} Int
a -> CreateStackSetResponse
s {$sel:httpStatus:CreateStackSetResponse' :: Int
httpStatus = Int
a} :: CreateStackSetResponse)

instance Prelude.NFData CreateStackSetResponse where
  rnf :: CreateStackSetResponse -> ()
rnf CreateStackSetResponse' {Int
Maybe Text
httpStatus :: Int
stackSetId :: Maybe Text
$sel:httpStatus:CreateStackSetResponse' :: CreateStackSetResponse -> Int
$sel:stackSetId:CreateStackSetResponse' :: CreateStackSetResponse -> Maybe Text
..} =
    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 Int
httpStatus