public CreateRule withScripts(Script... scripts) {
        if (this.scripts == null) {
            setScripts(new java.util.ArrayList<Script>(scripts.length));
        }
        for (Script ele : scripts) {
            this.scripts.add(ele);
        }
        return this;
    }
<p>
<b>[Custom snapshot policies that target instances only]</b> Specifies pre and/or post scripts for a snapshot
lifecycle policy that targets instances. This is useful for creating application-consistent snapshots, or for
performing specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot
creation.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/automate-app-consistent-backups.html">Automating
application-consistent snapshots with pre and post scripts</a>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setScripts(java.util.Collection)} or {@link #withScripts(java.util.Collection)} if you want to override
the existing values.
</p>

@param scripts
       <b>[Custom snapshot policies that target instances only]</b> Specifies pre and/or post scripts for a
       snapshot lifecycle policy that targets instances. This is useful for creating application-consistent
       snapshots, or for performing specific administrative tasks before or after Amazon Data Lifecycle Manager
       initiates snapshot creation.</p>
       <p>
       For more information, see <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/automate-app-consistent-backups.html">Automating
       application-consistent snapshots with pre and post scripts</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-dlm/src/main/java/com/amazonaws/services/dlm/model/CreateRule.java