Given a principal bundle $P \to M$ with structure group $G$ ($M$ and $G$ are connected), it is well known that one can recover the data of $P$ and a flat connection $\Gamma \in \Omega^{1}(P, \mathfrak{g})$ up to gauge transformation from the data of the monodromy representation $\Phi: \pi_{1}(M) \to G$.
My question is whether one can generalize this to non-flat connections in the following specific way. Suppose again that $M$ is a connected manifold, and $G$ a connected Lie group, $H \subseteq G$ a closed connected subgroup and $H' \subseteq G$ a Lie subgroup whose identity component is $H$ and in which $H$ is normal. Let $\Phi: \pi_{1}(M) \to H'/H$ be a representation.
Can one construct a principal bundle $P \to M$ with structure group $G$ and a connection $\Gamma \in \Omega^{1}(P, \mathfrak{g})$ such that the holonomy group, restricted holonomy group and monodromy representation are respectively $H'$, $H$ and $\Phi$, up to conjugation?
If the answer to the above is yes, is the pair $(P, \Gamma)$ uniquely determined up to gauge transformations, in the sense that if $(P', \Gamma')$ is another such pair then $P$ and $P'$ can be identified as principal bundles and $\Gamma'$ and $\Gamma$ differ by a gauge transformation?
If it simplifies the question, we may assume that $M$ is a compact, orientable surface and $G$ is compact, connected and simply connected, so that the only principal bundle is the trivial one $M \times G \to M$.