AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS CloudFormation CreateStackSet API operation.

Syntax

New-CFNStackSet
-StackSetName <String>
-ManagedExecution_Active <Boolean>
-AdministrationRoleARN <String>
-CallAs <CallAs>
-Capability <String[]>
-ClientRequestToken <String>
-Description <String>
-AutoDeployment_Enabled <Boolean>
-ExecutionRoleName <String>
-Parameter <Parameter[]>
-PermissionModel <PermissionModels>
-AutoDeployment_RetainStacksOnAccountRemoval <Boolean>
-StackId <String>
-Tag <Tag[]>
-TemplateBody <String>
-TemplateURL <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonCloudFormationConfig>

Description

Creates a stack set.

Parameters

-AdministrationRoleARN <String>
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 Prerequisites: Granting Permissions for Stack Set Operations in the CloudFormation User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-AutoDeployment_Enabled <Boolean>
If set to true, StackSets automatically deploys additional stack instances to Organizations accounts that are added to a target organization or organizational unit (OU) in the specified Regions. If an account is removed from a target organization or OU, StackSets deletes stack instances from the account in the specified Regions.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-AutoDeployment_RetainStacksOnAccountRemoval <Boolean>
If set to true, stack resources are retained when an account is removed from a target organization or OU. If set to false, stack resources are deleted. Specify only if Enabled is set to True.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CallAs <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 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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Capability <String[]>
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_IAMSome 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.For more information, see Acknowledging IAM Resources in CloudFormation Templates.
  • CAPABILITY_AUTO_EXPANDSome 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 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 AWS::Include and 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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesCapabilities
Amazon.PowerShell.Cmdlets.CFN.AmazonCloudFormationClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientRequestToken <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
A description of the stack set. You can use the description to identify the stack set's purpose or other important information.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ExecutionRoleName <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ManagedExecution_Active <Boolean>
When true, StackSets performs non-conflicting operations concurrently and queues conflicting operations. After conflicting operations finish, StackSets starts queued operations in request order.If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting.You can't modify your stack set's execution configuration while there are running or queued operations for that stack set.When false (default), StackSets performs one operation at a time in request order.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Parameter <Parameter[]>
The input parameters for the stack set template.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesParameters
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the StackSetName parameter. The -PassThru parameter is deprecated, use -Select '^StackSetName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PermissionModel <PermissionModels>
Describes how the IAM roles required for stack set operations are created. By default, SELF-MANAGED is specified.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'StackSetId'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CloudFormation.Model.CreateStackSetResponse). Specifying the name of a property of type Amazon.CloudFormation.Model.CreateStackSetResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StackId <String>
The stack ID you are importing into a new stack set. Specify the Amazon Resource Name (ARN) of the stack.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StackSetName <String>
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.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-Tag <Tag[]>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-TemplateBody <String>
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 Template Anatomy in the CloudFormation User Guide.Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TemplateURL <String>
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 Template Anatomy in the CloudFormation User Guide.Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a System.String object. The service call response (type Amazon.CloudFormation.Model.CreateStackSetResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z