Class AddOrUpdatePolicyRequestBuilder


  • public class AddOrUpdatePolicyRequestBuilder
    extends java.lang.Object
    • Method Detail

      • with

        public AddOrUpdatePolicyRequestBuilder with​(java.io.Reader policyJson)
                                             throws java.io.IOException,
                                                    io.envoyproxy.pgv.ValidationException
        Read a JSON encoded policy from the given reader and add to the batch.
        Parameters:
        policyJson - Reader for a JSON object
        Returns:
        this
        Throws:
        java.io.IOException - if the policy cannot be read from the reader
        io.envoyproxy.pgv.ValidationException - if the policy is invalid
      • with

        public AddOrUpdatePolicyRequestBuilder with​(java.lang.String policyJson)
                                             throws java.io.IOException,
                                                    io.envoyproxy.pgv.ValidationException
        Read a JSON encoded policy from the given string and add to the batch.
        Parameters:
        policyJson - String containing a JSON policy
        Returns:
        this
        Throws:
        java.io.IOException - if the policy cannot be read
        io.envoyproxy.pgv.ValidationException - if the policy is invalid
      • addOrUpdate

        public void addOrUpdate()
        Execute the addOrUpdate call.
        Throws:
        CerbosException - if the call fails