public UpdateStackRequest withAgentVersion(String agentVersion) {
        setAgentVersion(agentVersion);
        return this;
    }
<p>
The default OpsWorks Stacks agent version. You have the following options:
</p>
<ul>
<li>
<p>
Auto-update - Set this parameter to <code>LATEST</code>. OpsWorks Stacks automatically installs new agent
versions on the stack's instances as soon as they are available.
</p>
</li>
<li>
<p>
Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit
the stack configuration and specify a new version. OpsWorks Stacks installs that version on the stack's
instances.
</p>
</li>
</ul>
<p>
The default setting is <code>LATEST</code>. To specify an agent version, you must use the complete version
number, not the abbreviated number shown on the console. For a list of available agent version numbers, call
<a>DescribeAgentVersions</a>. AgentVersion cannot be set to Chef 12.2.
</p>
<note>
<p>
You can also specify an agent version when you create or update an instance, which overrides the stack's default
setting.
</p>
</note>

@param agentVersion
       The default OpsWorks Stacks agent version. You have the following options:</p>
       <ul>
       <li>
       <p>
       Auto-update - Set this parameter to <code>LATEST</code>. OpsWorks Stacks automatically installs new agent
       versions on the stack's instances as soon as they are available.
       </p>
       </li>
       <li>
       <p>
       Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must
       edit the stack configuration and specify a new version. OpsWorks Stacks installs that version on the
       stack's instances.
       </p>
       </li>
       </ul>
       <p>
       The default setting is <code>LATEST</code>. To specify an agent version, you must use the complete version
       number, not the abbreviated number shown on the console. For a list of available agent version numbers,
       call <a>DescribeAgentVersions</a>. AgentVersion cannot be set to Chef 12.2.
       </p>
       <note>
       <p>
       You can also specify an agent version when you create or update an instance, which overrides the stack's
       default setting.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/UpdateStackRequest.java