public CreateAccessPolicyRequest withPolicy(String policy) {
        setPolicy(policy);
        return this;
    }
<p>
The JSON policy document to use as the content for the policy.
</p>

@param policy
       The JSON policy document to use as the content for the policy.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-opensearchserverless/src/main/java/com/amazonaws/services/opensearchserverless/model/CreateAccessPolicyRequest.java