consul.api.acl.templated_policy module

class consul.api.acl.templated_policy.TemplatedPolicy(agent)[source]

Bases: object

list(token=None)[source]

Lists all the templated policies. :param token: token with acl:read capability :return: A dictionary of templated policies

Parameters:

token (str | None)

read(name, token=None)[source]

Reads a templated policy with the given name. :param name: The name of the templated policy to read :param token: token with acl:read capability :return: The templated policy information

Parameters:
  • name (str)

  • token (str | None)

preview(name, template_variables=None, token=None)[source]

Preview the result of a templated policy. :param name: The name of the templated policy :param template_variables: The variables to use in the template :param token: token with acl:write capability :return: The preview of the policy

Parameters: