public void setDeletionPolicy(String deletionPolicy) {
        this.deletionPolicy = deletionPolicy;
    }
<p>
The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:
</p>
<ul>
<li>
<p>
<code>DELETE</code> - delete all resources when the stack is deleted.
</p>
</li>
<li>
<p>
<code>RETAIN</code> - retain all resources when the stack is deleted.
</p>
</li>
</ul>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html"
>DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.
</p>

@param deletionPolicy
       The <code>DeletionPolicy</code> assigned to resources in the generated template. Supported values are:</p>
       <ul>
       <li>
       <p>
       <code>DELETE</code> - delete all resources when the stack is deleted.
       </p>
       </li>
       <li>
       <p>
       <code>RETAIN</code> - retain all resources when the stack is deleted.
       </p>
       </li>
       </ul>
       <p>
       For more information, see <a
       href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html"
       >DeletionPolicy attribute</a> in the <i>CloudFormation User Guide</i>.
@see GeneratedTemplateDeletionPolicy
aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/model/TemplateConfiguration.java