public function putPolicy($name, array $body)
    {
        $body = OptionsResolver::resolve($body, ['policy']);

        $params = [
            'body' => json_encode($body)
        ];

        return $this->client->put('/v1/sys/policy/' . $name, $params);
    }
public function putPolicy($name, array $body)
    {
        $body = OptionsResolver::resolve($body, ['policy']);

        $params = [
            'body' => json_encode($body)
        ];

        return $this->client->put('/v1/sys/policy/' . $name, $params);
    }
public function putPolicy ( $ name , array $ body ) { $ body = OptionsResolver :: resolve ( $ body , [ 'policy' ] ) ; $ params = [ 'body' => json_encode ( $ body ) ] ; return $ this -> client -> put ( '/v1/sys/policy/' . $ name , $ params ) ; }
Add or update a policy.

Once a policy is updated, it takes effect immediately to all associated users.

@see    https://www.vaultproject.io/docs/http/sys-policy.html
@param  string $name
@param  array  $body
@return mixed
Add or update a policy .