public UpdateLayerRequest withShortname(String shortname) {
        setShortname(shortname);
        return this;
    }
<p>
For custom layers only, use this parameter to specify the layer's short name, which is used internally by
OpsWorks Stacks and by Chef. The short name is also used as the name for the directory where your app files are
installed. It can have a maximum of 32 characters and must be in the following format: /\A[a-z0-9\-\_\.]+\Z/.
</p>
<p>
Built-in layer short names are defined by OpsWorks Stacks. For more information, see the <a
href="https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html">Layer reference</a> in the OpsWorks User
Guide.
</p>

@param shortname
       For custom layers only, use this parameter to specify the layer's short name, which is used internally by
       OpsWorks Stacks and by Chef. The short name is also used as the name for the directory where your app
       files are installed. It can have a maximum of 32 characters and must be in the following format:
       /\A[a-z0-9\-\_\.]+\Z/.</p>
       <p>
       Built-in layer short names are defined by OpsWorks Stacks. For more information, see the <a
       href="https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html">Layer reference</a> in the
       OpsWorks User Guide.
@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/UpdateLayerRequest.java