{{ policy.filename }}

{% if policy.valid %} valid {% else %} invalid {% endif %} · {{ policy.statements|length }} statement{{ '' if policy.statements|length == 1 else 's' }} {% if has_backup %}· history{% endif %}

{% if not policy.valid and policy.validation_errors %}
Validation errors:
{% endif %}

Statements

{% for s in policy.statements %}
{{ s.sid or "(no sid)" }} {% if s.effect == "Allow" %} {{ s.effect }} {% elif s.effect == "Deny" %} {{ s.effect }} {% else %} {{ s.effect or "(no effect)" }} {% endif %}
{% for fld in ("principals", "not_principals", "actions", "not_actions", "resources", "not_resources") %} {% if s.get(fld) %}
{{ fld }}:
    {% for v in s[fld] %}
  • {{ v }}
  • {% endfor %}
{% endif %} {% endfor %} {% if s.get("condition") %}
condition: {{ s.condition | tojson }}
{% endif %}
{% else %}

No statements.

{% endfor %}

Raw YAML

{{ policy.raw }}