public String translatePolicyInput()

in common/src/main/java/software/amazon/kms/common/KeyTranslator.java [167:179]


    public String translatePolicyInput(final Object policy) {
        // Key Policy can be specified as either a string or an object (JSON)
        // Convert it to a string so it can be used in our API calls
        if (policy instanceof Map) {
            try {
                return objectMapper.writeValueAsString(policy);
            } catch (final JsonProcessingException e) {
                throw new TerminalException(e);
            }
        }

        return (String) policy;
    }