public CreateUserPoolRequest withDeletionProtection(DeletionProtectionType deletionProtection) {
        this.deletionProtection = deletionProtection.toString();
        return this;
    }
<p>
When active, <code>DeletionProtection</code> prevents accidental deletion of your user pool. Before you can
delete a user pool that you have protected against deletion, you must deactivate this feature.
</p>
<p>
When you try to delete a protected user pool in a <code>DeleteUserPool</code> API request, Amazon Cognito returns
an <code>InvalidParameterException</code> error. To delete a protected user pool, send a new
<code>DeleteUserPool</code> request after you deactivate deletion protection in an <code>UpdateUserPool</code>
API request.
</p>

@param deletionProtection
       When active, <code>DeletionProtection</code> prevents accidental deletion of your user pool. Before you
       can delete a user pool that you have protected against deletion, you must deactivate this feature.</p>
       <p>
       When you try to delete a protected user pool in a <code>DeleteUserPool</code> API request, Amazon Cognito
       returns an <code>InvalidParameterException</code> error. To delete a protected user pool, send a new
       <code>DeleteUserPool</code> request after you deactivate deletion protection in an
       <code>UpdateUserPool</code> API request.
@return Returns a reference to this object so that method calls can be chained together.
@see DeletionProtectionType
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/CreateUserPoolRequest.java