Class VaultRequest<T extends VaultRequest<T>>

    • Constructor Detail

      • VaultRequest

        public VaultRequest()
    • Method Detail

      • addCommaDelimitedArray

        protected static void addCommaDelimitedArray​(JsonObjectBuilder json,
                                                     String name,
                                                     List<String> values)
        Add aa list of values as a comma delimited string instead of a JSON Array.
        json - the builder
        name - name of the property
        values - list of values
      • add

        public T add​(String name,
                     Duration duration)
        Add a duration formatted in Vault manner, as a string with duration.
        name - name of the property
        duration - duration to add
        updated request
      • addToCommaDelimitedArray

        public T addToCommaDelimitedArray​(String name,
                                          String element)
        Add a string to an array represented as a comma delimited string in the request JSON.
        name - key in the json payload
        element - element of the array
        updated request
      • durationToTtl

        public static String durationToTtl​(Duration duration)
        Duration to time to live in HCP Vault format. The format is "5h" for exact hour values, "5m" for exact minute values, or "5s" when seconds are part of the value.
        duration - duration
        String of that duration