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

# Create IAM Policy

Creates a policy.

<Note>
  External Documentation

  To learn more, visit the [GCP documentation](https://cloud.google.com/iam/docs/reference/rest/v2beta/policies/createPolicy).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter   | Description                                                                                                                                                                                                                                                                          |
  | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Parent ID   | The ID of the parent resource to access.<br /><br />For organizations and folders, must be the numeric ID.<br />For projects, can be the alphanumeric or numeric ID.<br /><br />All action responses contain the numeric ID.                                                         |
  | Parent Type | Which type of parent resource to access.                                                                                                                                                                                                                                             |
  | Policy ID   | The ID to use for this policy, which will become the final component of the policy's resource name. The ID must contain 3 to 63 characters. It can contain lowercase letters and numbers, as well as dashes (`-`) and periods (`.`). The first character must be a lowercase letter. |
  | Rules       | A list of rules that specify the behavior of the `Policy`. All of the rules should be of the `kind` specified in the `Policy`.                                                                                                                                                       |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter    | Description                                                                                                                        |
  | ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
  | Annotations  | A key-value map to store arbitrary metadata for the `Policy`. Keys can be up to 63 characters. Values can be up to 255 characters. |
  | Display Name | A user-specified description of the `Policy`. This value can be up to 63 characters.                                               |
</div>

## Example Output

```json theme={"dark"}
{
	"done": false,
	"error": {
		"code": 0,
		"details": [
			{}
		],
		"message": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client."
	},
	"metadata": {},
	"name": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.",
	"response": {}
}
```

## Workflow Library Example

[Create Iam Policy with Gcp and Send Results Via Email](https://library.blinkops.com/workflows/create-iam-policy-with-gcp-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/create-iam-policy-with-gcp-and-send-results-via-email/canvas" />
</div>
