public UpdateStackSetRequest withCapabilities(Capability... capabilities) {
        com.amazonaws.internal.SdkInternalList<String> capabilitiesCopy = new com.amazonaws.internal.SdkInternalList<String>(capabilities.length);
        for (Capability value : capabilities) {
            capabilitiesCopy.add(value.toString());
        }
        if (getCapabilities() == null) {
            setCapabilities(capabilitiesCopy);
        } else {
            getCapabilities().addAll(capabilitiesCopy);
        }
        return this;
    }
<p>
In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in order
for CloudFormation to update the stack set 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 Identity and Access Management (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/UserGuide/aws-properties-iam-accesskey.html">AWS::
IAM::AccessKey</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html">AWS::IAM::
Group</a>
</p>
</li>
<li>
<p>
<a
href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html">AWS
::IAM::InstanceProfile</a>
</p>
</li>
<li>
<p>
<a
href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html">AWS::IAM::
Policy</a>
</p>
</li>
<li>
<p>
<a
href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html">AWS::IAM::Role
</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html">AWS::IAM::
User</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html">
AWS::IAM::UserToGroupAddition</a>
</p>
</li>
</ul>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#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 stack set template references one or more macros, you must update the
stack set directly from the processed template, without first reviewing the resulting changes in a change set. To
update the stack set directly, you must acknowledge this capability. For more information, see <a
href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html">Using CloudFormation
Macros to Perform Custom Processing on Templates</a>.
</p>
<important>
<p>
Stack sets 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/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.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 stack set with service-managed permissions, if you reference a macro in your template the stack set
operation will fail.
</p>
</important></li>
</ul>

@param capabilities
       In some cases, you must explicitly acknowledge that your stack template contains certain capabilities in
       order for CloudFormation to update the stack set 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 Identity and Access Management (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/UserGuide/aws-properties-iam-accesskey.html">
       AWS::IAM::AccessKey</a>
       </p>
       </li>
       <li>
       <p>
       <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html">AWS
       ::IAM::Group</a>
       </p>
       </li>
       <li>
       <p>
       <a href=
       "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html"
       >AWS::IAM::InstanceProfile</a>
       </p>
       </li>
       <li>
       <p>
       <a
       href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html">AWS
       ::IAM::Policy</a>
       </p>
       </li>
       <li>
       <p>
       <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html">AWS::
       IAM::Role</a>
       </p>
       </li>
       <li>
       <p>
       <a
       href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html">AWS::
       IAM::User</a>
       </p>
       </li>
       <li>
       <p>
       <a href=
       "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html"
       >AWS::IAM::UserToGroupAddition</a>
       </p>
       </li>
       </ul>
       <p>
       For more information, see <a href=
       "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#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 stack set template references one or more macros, you must update
       the stack set directly from the processed template, without first reviewing the resulting changes in a
       change set. To update the stack set directly, you must acknowledge this capability. For more information,
       see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html">Using
       CloudFormation Macros to Perform Custom Processing on Templates</a>.
       </p>
       <important>
       <p>
       Stack sets 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/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.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 stack set with service-managed permissions, if you reference a macro in your template the
       stack set operation will fail.
       </p>
       </important></li>
@return Returns a reference to this object so that method calls can be chained together.
@see Capability
aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/model/UpdateStackSetRequest.java