Let $(p_{ij}) \in [0,1]^{n \times n}$ be a given symmetric matrix, with $1$ on the diagonal. Suppose $\pi$ is a partition of $[n]=\{1,\dots,n\}$ and let us write $i \stackrel{\pi}{\sim} j$ if $i$ and $j$ belong to the same component of $\pi$.

Is there a random partition $\pi$, such that $\mathbb{P}( i \stackrel{\pi}{\sim} j ) = p_{ij}$ for all $i \neq j$?

In other words, given a matrix $(p_{ij})$, is there a distribution on partitions of $[n]$ with the above property, and if so is there a way to sample from such distribution? Also, assuming existence, is it unique?

EDIT: As has been pointed out, not all such matrices produce a distribution. But what are the conditions on $(p_{ij})$ that allows for such distribution?