aws_sdk_cloudformation/client/create_stack_set.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateStackSet`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`stack_set_name(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::stack_set_name) / [`set_stack_set_name(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_stack_set_name):<br>required: **true**<br><p>The name to associate with the StackSet. The name must be unique in the Region where you create your StackSet.</p><note> <p>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.</p> </note><br>
7 /// - [`description(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_description):<br>required: **false**<br><p>A description of the StackSet. You can use the description to identify the StackSet's purpose or other important information.</p><br>
8 /// - [`template_body(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::template_body) / [`set_template_body(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_template_body):<br>required: **false**<br><p>The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes.</p> <p>Conditional: You must specify either the <code>TemplateBody</code> or the <code>TemplateURL</code> parameter, but not both.</p><br>
9 /// - [`template_url(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::template_url) / [`set_template_url(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_template_url):<br>required: **false**<br><p>The URL of a file that contains the template body. The URL must point to a template (maximum size: 1 MB) that's located in an Amazon S3 bucket or a Systems Manager document. The location for an Amazon S3 bucket must start with <code>https://</code>. S3 static website URLs are not supported.</p> <p>Conditional: You must specify either the <code>TemplateBody</code> or the <code>TemplateURL</code> parameter, but not both.</p><br>
10 /// - [`stack_id(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::stack_id) / [`set_stack_id(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_stack_id):<br>required: **false**<br><p>The stack ID you are importing into a new StackSet. Specify the Amazon Resource Name (ARN) of the stack.</p><br>
11 /// - [`parameters(Parameter)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::parameters) / [`set_parameters(Option<Vec::<Parameter>>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_parameters):<br>required: **false**<br><p>The input parameters for the StackSet template.</p><br>
12 /// - [`capabilities(Capability)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::capabilities) / [`set_capabilities(Option<Vec::<Capability>>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_capabilities):<br>required: **false**<br><p>In some cases, you must explicitly acknowledge that your StackSet template contains certain capabilities in order for CloudFormation to create the StackSet and related stack instances.</p> <ul> <li> <p><code>CAPABILITY_IAM</code> and <code>CAPABILITY_NAMED_IAM</code></p> <p>Some stack templates might include resources that can affect permissions in your Amazon Web Services account; for example, by creating new IAM users. For those StackSets, you must explicitly acknowledge this by specifying one of these capabilities.</p> <p>The following IAM resources require you to specify either the <code>CAPABILITY_IAM</code> or <code>CAPABILITY_NAMED_IAM</code> capability.</p> <ul> <li> <p>If you have IAM resources, you can specify either capability.</p></li> <li> <p>If you have IAM resources with custom names, you <i>must</i> specify <code>CAPABILITY_NAMED_IAM</code>.</p></li> <li> <p>If you don't specify either of these capabilities, CloudFormation returns an <code>InsufficientCapabilities</code> error.</p></li> </ul> <p>If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.</p> <ul> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-accesskey.html">AWS::IAM::AccessKey</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-group.html">AWS::IAM::Group</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-instanceprofile.html">AWS::IAM::InstanceProfile</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-policy.html">AWS::IAM::Policy</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-role.html">AWS::IAM::Role</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-user.html">AWS::IAM::User</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-iam-usertogroupaddition.html">AWS::IAM::UserToGroupAddition</a></p></li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/control-access-with-iam.html#using-iam-capabilities">Acknowledging IAM resources in CloudFormation templates</a>.</p></li> <li> <p><code>CAPABILITY_AUTO_EXPAND</code></p> <p>Some templates reference macros. If your StackSet template references one or more macros, you must create the StackSet directly from the processed template, without first reviewing the resulting changes in a change set. To create the StackSet directly, you must acknowledge this capability. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html">Perform custom processing on CloudFormation templates with template macros</a>.</p><important> <p>StackSets with service-managed permissions don't currently support the use of macros in templates. (This includes the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-include.html">AWS::Include</a> and <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html">AWS::Serverless</a> transforms, which are macros hosted by CloudFormation.) Even if you specify this capability for a StackSet with service-managed permissions, if you reference a macro in your template the StackSet operation will fail.</p> </important></li> </ul><br>
13 /// - [`tags(Tag)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_tags):<br>required: **false**<br><p>The key-value pairs to associate with this StackSet 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.</p> <p>If you specify tags as part of a <code>CreateStackSet</code> action, CloudFormation checks to see if you have the required IAM permission to tag resources. If you don't, the entire <code>CreateStackSet</code> action fails with an <code>access denied</code> error, and the StackSet is not created.</p><br>
14 /// - [`administration_role_arn(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::administration_role_arn) / [`set_administration_role_arn(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_administration_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the IAM role to use to create this StackSet.</p> <p>Specify an IAM role only if you are using customized administrator roles to control which users or groups can manage specific StackSets within the same administrator account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html">Grant self-managed permissions</a> in the <i>CloudFormation User Guide</i>.</p> <p>Valid only if the permissions model is <code>SELF_MANAGED</code>.</p><br>
15 /// - [`execution_role_name(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::execution_role_name) / [`set_execution_role_name(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_execution_role_name):<br>required: **false**<br><p>The name of the IAM execution role to use to create the StackSet. If you do not specify an execution role, CloudFormation uses the <code>AWSCloudFormationStackSetExecutionRole</code> role for the StackSet operation.</p> <p>Specify an IAM role only if you are using customized execution roles to control which stack resources users and groups can include in their StackSets.</p> <p>Valid only if the permissions model is <code>SELF_MANAGED</code>.</p><br>
16 /// - [`permission_model(PermissionModels)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::permission_model) / [`set_permission_model(Option<PermissionModels>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_permission_model):<br>required: **false**<br><p>Describes how the IAM roles required for StackSet operations are created. By default, <code>SELF-MANAGED</code> is specified.</p> <ul> <li> <p>With <code>self-managed</code> permissions, you must create the administrator and execution roles required to deploy to target accounts. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html">Grant self-managed permissions</a>.</p></li> <li> <p>With <code>service-managed</code> permissions, StackSets automatically creates the IAM roles required to deploy to accounts managed by Organizations. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-activate-trusted-access.html">Activate trusted access for StackSets with Organizations</a>.</p></li> </ul><br>
17 /// - [`auto_deployment(AutoDeployment)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::auto_deployment) / [`set_auto_deployment(Option<AutoDeployment>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_auto_deployment):<br>required: **false**<br><p>Describes whether StackSets automatically deploys to Organizations accounts that are added to the target organization or organizational unit (OU). For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-manage-auto-deployment.html">Enable or disable automatic deployments for StackSets in Organizations</a> in the <i>CloudFormation User Guide</i>.</p> <p>Required if the permissions model is <code>SERVICE_MANAGED</code>. (Not used with self-managed permissions.)</p><br>
18 /// - [`call_as(CallAs)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::call_as) / [`set_call_as(Option<CallAs>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_call_as):<br>required: **false**<br><p>Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p> <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for StackSets with self-managed permissions.</p> <ul> <li> <p>To create a StackSet with service-managed permissions while signed in to the management account, specify <code>SELF</code>.</p></li> <li> <p>To create a StackSet with service-managed permissions while signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p> <p>Your Amazon Web Services account must be registered as a delegated admin in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li> </ul> <p>StackSets with service-managed permissions are created in the management account, including StackSets that are created by delegated administrators.</p> <p>Valid only if the permissions model is <code>SERVICE_MANAGED</code>.</p><br>
19 /// - [`client_request_token(impl Into<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_client_request_token):<br>required: **false**<br><p>A unique identifier for this <code>CreateStackSet</code> request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to create another StackSet with the same name. You might retry <code>CreateStackSet</code> requests to ensure that CloudFormation successfully received them.</p> <p>If you don't specify an operation ID, the SDK generates one automatically.</p><br>
20 /// - [`managed_execution(ManagedExecution)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::managed_execution) / [`set_managed_execution(Option<ManagedExecution>)`](crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::set_managed_execution):<br>required: **false**<br><p>Describes whether CloudFormation performs non-conflicting operations concurrently and queues conflicting operations.</p><br>
21 /// - On success, responds with [`CreateStackSetOutput`](crate::operation::create_stack_set::CreateStackSetOutput) with field(s):
22 /// - [`stack_set_id(Option<String>)`](crate::operation::create_stack_set::CreateStackSetOutput::stack_set_id): <p>The ID of the StackSet that you're creating.</p>
23 /// - On failure, responds with [`SdkError<CreateStackSetError>`](crate::operation::create_stack_set::CreateStackSetError)
24 pub fn create_stack_set(&self) -> crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder {
25 crate::operation::create_stack_set::builders::CreateStackSetFluentBuilder::new(self.handle.clone())
26 }
27}