aws_sdk_cloudformation/client/
update_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 [`UpdateStackSet`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`stack_set_name(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::stack_set_name) / [`set_stack_set_name(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_stack_set_name):<br>required: **true**<br><p>The name or unique ID of the StackSet that you want to update.</p><br>
7    ///   - [`description(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_description):<br>required: **false**<br><p>A brief description of updates that you are making.</p><br>
8    ///   - [`template_body(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::template_body) / [`set_template_body(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::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 only one of the following parameters: <code>TemplateBody</code> or <code>TemplateURL</code>—or set <code>UsePreviousTemplate</code> to true.</p><br>
9    ///   - [`template_url(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::template_url) / [`set_template_url(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::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 is 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 only one of the following parameters: <code>TemplateBody</code> or <code>TemplateURL</code>—or set <code>UsePreviousTemplate</code> to true.</p><br>
10    ///   - [`use_previous_template(bool)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::use_previous_template) / [`set_use_previous_template(Option<bool>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_use_previous_template):<br>required: **false**<br><p>Use the existing template that's associated with the StackSet that you're updating.</p> <p>Conditional: You must specify only one of the following parameters: <code>TemplateBody</code> or <code>TemplateURL</code>—or set <code>UsePreviousTemplate</code> to true.</p><br>
11    ///   - [`parameters(Parameter)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::parameters) / [`set_parameters(Option<Vec::<Parameter>>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_parameters):<br>required: **false**<br><p>A list of input parameters for the StackSet template.</p><br>
12    ///   - [`capabilities(Capability)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::capabilities) / [`set_capabilities(Option<Vec::<Capability>>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_capabilities):<br>required: **false**<br><p>In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order for CloudFormation to update the StackSet and its associated 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 stacks sets, 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 update the StackSet directly from the processed template, without first reviewing the resulting changes in a change set. To update 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 do not 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::update_stack_set::builders::UpdateStackSetFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::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. You can specify a maximum number of 50 tags.</p> <p>If you specify tags for this parameter, those tags replace any list of tags that are currently associated with this StackSet. This means:</p> <ul>  <li>   <p>If you don't specify this parameter, CloudFormation doesn't modify the stack's tags.</p></li>  <li>   <p>If you specify <i>any</i> tags using this parameter, you must specify <i>all</i> the tags that you want associated with this StackSet, even tags you've specified before (for example, when creating the StackSet or during a previous update of the StackSet.). Any tags that you don't include in the updated list of tags are removed from the StackSet, and therefore from the stacks and resources as well.</p></li>  <li>   <p>If you specify an empty value, CloudFormation removes all currently associated tags.</p></li> </ul> <p>If you specify new tags as part of an <code>UpdateStackSet</code> action, CloudFormation checks to see if you have the required IAM permission to tag resources. If you omit tags that are currently associated with the StackSet from the list of tags you specify, CloudFormation assumes that you want to remove those tags from the StackSet, and checks to see if you have permission to untag resources. If you don't have the necessary permission(s), the entire <code>UpdateStackSet</code> action fails with an <code>access denied</code> error, and the StackSet is not updated.</p><br>
14    ///   - [`operation_preferences(StackSetOperationPreferences)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::operation_preferences) / [`set_operation_preferences(Option<StackSetOperationPreferences>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_operation_preferences):<br>required: **false**<br><p>Preferences for how CloudFormation performs this StackSet operation.</p><br>
15    ///   - [`administration_role_arn(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::administration_role_arn) / [`set_administration_role_arn(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_administration_role_arn):<br>required: **false**<br><p>\[Self-managed permissions\] The Amazon Resource Name (ARN) of the IAM role to use to update 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>If you specified a customized administrator role when you created the StackSet, you must specify a customized administrator role, even if it is the same customized administrator role used with this StackSet previously.</p><br>
16    ///   - [`execution_role_name(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::execution_role_name) / [`set_execution_role_name(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_execution_role_name):<br>required: **false**<br><p>\[Self-managed permissions\] The name of the IAM execution role to use to update the stack set. If you do not specify an execution role, CloudFormation uses the AWSCloudFormationStackSetExecutionRole 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>If you specify a customized execution role, CloudFormation uses that role to update the stack. If you do not specify a customized execution role, CloudFormation performs the update using the role previously associated with the StackSet, so long as you have permissions to perform operations on the StackSet.</p><br>
17    ///   - [`deployment_targets(DeploymentTargets)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::deployment_targets) / [`set_deployment_targets(Option<DeploymentTargets>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_deployment_targets):<br>required: **false**<br><p>\[Service-managed permissions\] The Organizations accounts in which to update associated stack instances.</p> <p>To update all the stack instances associated with this StackSet, do not specify <code>DeploymentTargets</code> or <code>Regions</code>.</p> <p>If the StackSet update includes changes to the template (that is, if <code>TemplateBody</code> or <code>TemplateURL</code> is specified), or the <code>Parameters</code>, CloudFormation marks all stack instances with a status of <code>OUTDATED</code> prior to updating the stack instances in the specified accounts and Amazon Web Services Regions. If the StackSet update doesn't include changes to the template or parameters, CloudFormation updates the stack instances in the specified accounts and Regions, while leaving all other stack instances with their existing stack instance status.</p><br>
18    ///   - [`permission_model(PermissionModels)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::permission_model) / [`set_permission_model(Option<PermissionModels>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_permission_model):<br>required: **false**<br><p>Describes how the IAM roles required for StackSet operations are created. You cannot modify <code>PermissionModel</code> if there are stack instances associated with your stack set.</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>
19    ///   - [`auto_deployment(AutoDeployment)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::auto_deployment) / [`set_auto_deployment(Option<AutoDeployment>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_auto_deployment):<br>required: **false**<br><p>\[Service-managed permissions\] Describes whether StackSets automatically deploys to Organizations accounts that are added to a target organization or organizational unit (OU). For more information, see Enable or disable automatic deployments for StackSets in Organizations in the CloudFormation User Guide.</p> <p>If you specify <code>AutoDeployment</code>, don't specify <code>DeploymentTargets</code> or <code>Regions</code>.</p><br>
20    ///   - [`operation_id(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::operation_id) / [`set_operation_id(Option<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_operation_id):<br>required: **false**<br><p>The unique ID for this StackSet operation.</p> <p>The operation ID also functions as an idempotency token, to ensure that CloudFormation performs the StackSet operation only once, even if you retry the request multiple times. You might retry StackSet operation requests to ensure that CloudFormation successfully received them.</p> <p>If you don't specify an operation ID, CloudFormation generates one automatically.</p> <p>Repeating this StackSet operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</p><br>
21    ///   - [`accounts(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::accounts) / [`set_accounts(Option<Vec::<String>>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_accounts):<br>required: **false**<br><p>\[Self-managed permissions\] The accounts in which to update associated stack instances. If you specify accounts, you must also specify the Amazon Web Services Regions in which to update StackSet instances.</p> <p>To update <i>all</i> the stack instances associated with this StackSet, don't specify the <code>Accounts</code> or <code>Regions</code> properties.</p> <p>If the StackSet update includes changes to the template (that is, if the <code>TemplateBody</code> or <code>TemplateURL</code> properties are specified), or the <code>Parameters</code> property, CloudFormation marks all stack instances with a status of <code>OUTDATED</code> prior to updating the stack instances in the specified accounts and Amazon Web Services Regions. If the StackSet update does not include changes to the template or parameters, CloudFormation updates the stack instances in the specified accounts and Amazon Web Services Regions, while leaving all other stack instances with their existing stack instance status.</p><br>
22    ///   - [`regions(impl Into<String>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::regions) / [`set_regions(Option<Vec::<String>>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_regions):<br>required: **false**<br><p>The Amazon Web Services Regions in which to update associated stack instances. If you specify Regions, you must also specify accounts in which to update StackSet instances.</p> <p>To update <i>all</i> the stack instances associated with this StackSet, do not specify the <code>Accounts</code> or <code>Regions</code> properties.</p> <p>If the StackSet update includes changes to the template (that is, if the <code>TemplateBody</code> or <code>TemplateURL</code> properties are specified), or the <code>Parameters</code> property, CloudFormation marks all stack instances with a status of <code>OUTDATED</code> prior to updating the stack instances in the specified accounts and Regions. If the StackSet update does not include changes to the template or parameters, CloudFormation updates the stack instances in the specified accounts and Regions, while leaving all other stack instances with their existing stack instance status.</p><br>
23    ///   - [`call_as(CallAs)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::call_as) / [`set_call_as(Option<CallAs>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_call_as):<br>required: **false**<br><p>\[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.</p> <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for StackSets with self-managed permissions.</p> <ul>  <li>   <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>  <li>   <p>If you are 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 administrator 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><br>
24    ///   - [`managed_execution(ManagedExecution)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::managed_execution) / [`set_managed_execution(Option<ManagedExecution>)`](crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::set_managed_execution):<br>required: **false**<br><p>Describes whether CloudFormation performs non-conflicting operations concurrently and queues conflicting operations.</p><br>
25    /// - On success, responds with [`UpdateStackSetOutput`](crate::operation::update_stack_set::UpdateStackSetOutput) with field(s):
26    ///   - [`operation_id(Option<String>)`](crate::operation::update_stack_set::UpdateStackSetOutput::operation_id): <p>The unique ID for this StackSet operation.</p>
27    /// - On failure, responds with [`SdkError<UpdateStackSetError>`](crate::operation::update_stack_set::UpdateStackSetError)
28    pub fn update_stack_set(&self) -> crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder {
29        crate::operation::update_stack_set::builders::UpdateStackSetFluentBuilder::new(self.handle.clone())
30    }
31}