---
title: "ezgh iam policies create"
description: "Create a custom policy."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh iam policies create

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh iam policies create <name> --document @policy.json [--description d] [flags]
```

Create a custom policy. The document comes from `--document` @file.json, `--document` - (stdin), or stdin when `--document` is left out:

```text
{
  "statements": [
    { "effect": "allow", "actions": ["projects.list", "projects.get"], "resources": ["*"] },
    { "effect": "deny", "actions": ["projects.delete"], "resources": ["ezgh::org_k3f9a0x2m7qp:prj_*"] }
  ]
}
```

Part of [`ezgh iam policies`](/cli/reference/iam-policies).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--description` | string |  | what the policy is for |
| `--document` | string |  | the policy document: @file.json, - for stdin, or the JSON |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/iam-policies-create/index.mdx
