def update(options = {}, existing_rules = [])

      request = Net::HTTP::Put.new(
          URI.join(@base_uri.to_s, "cloudlets/api/v2/policies/#{@policy_id}/versions/#{@version_id}?omitRules=false&matchRuleFormat=1.0").to_s,
          { 'Content-Type' => 'application/json'}
        )
      rules = generate_path_rules(options) + generate_cookie_rules(options) + existing_rules

      if rules.empty?
        puts "No rules to apply, please check syntax"
        return
      end

      request.body =  {
                        matchRules: rules
                      }.to_json
      response = @http_host.request(request)
      response.body
    end
def update(options = {}, existing_rules = [])

      request = Net::HTTP::Put.new(
          URI.join(@base_uri.to_s, "cloudlets/api/v2/policies/#{@policy_id}/versions/#{@version_id}?omitRules=false&matchRuleFormat=1.0").to_s,
          { 'Content-Type' => 'application/json'}
        )
      rules = generate_path_rules(options) + generate_cookie_rules(options) + existing_rules

      if rules.empty?
        puts "No rules to apply, please check syntax"
        return
      end

      request.body =  {
                        matchRules: rules
                      }.to_json
      response = @http_host.request(request)
      response.body
    end
Update policy version, all rules