Class JsonPolicyWriter


  • public class JsonPolicyWriter
    extends Object
    Serializes an AWS policy object to a JSON string, suitable for sending to an AWS service.
    • Constructor Detail

      • JsonPolicyWriter

        public JsonPolicyWriter()
        Constructs a new instance of JSONPolicyWriter.
    • Method Detail

      • writePolicyToString

        public String writePolicyToString​(Policy policy)
        Converts the specified AWS policy object to a JSON string, suitable for passing to an AWS service.
        Parameters:
        policy - The AWS policy object to convert to a JSON string.
        Returns:
        The JSON string representation of the specified policy object.
        Throws:
        IllegalArgumentException - If the specified policy is null or invalid and cannot be serialized to a JSON string.