Example #1
0
 /**
  * Initializes a new Vault.
  *
  * The Vault must've not been previously initialized
  *
  * @see    https://www.vaultproject.io/docs/http/sys-init.html
  * @return mixed
  */
 public function init(array $body = [])
 {
     $body = OptionsResolver::resolve($body, ['secret_shares', 'secret_threshold', 'pgp_keys']);
     $body = OptionsResolver::required($body, ['secret_shares', 'secret_threshold']);
     $params = ['body' => json_encode($body)];
     return $this->client->put('/v1/sys/init', $params);
 }