---
title: "Type"
description: "Optimize policy conditions with type constraints and regular expressions. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/access-policies/conditions/type"
---

# Type

The `type` condition allows you to constrain a policy statement so that it applies to entities of a specific type. This condition supports regular expressions, allowing you to focus in on a single ID or wildcard expressions within an ID.

## Configuration

```
{
    "type": "type",
    "config": {
        "type": "{type name}"
    }
}
```

## Samples

This policy document grants the Consumer role to all Projects.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "type",
            "config": {
                "type": "project"
            }
        }]
    }]
}
```
