> ## 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.

# Set New Policy Rule

Adds a new policy rule in a policy set for the specified set ID.

<Note>
  External Documentation

  To learn more, visit the [Zscaler Private Access documentation](https://help.zscaler.com/zpa/policy-set-controller#/mgmtconfig/v2/admin/customers/\{customerId}/policySet/\{policySetId}/rule-post).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter            | Description                                                                                                                                                                                                                                                                    |
  | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Microtenant ID       | The unique identifier of the Microtenant for the ZPA tenant. If you are within the Default Microtenant, insert **0**.                                                                                                                                                          |
  | Policy Rule Resource | The object of the new policy rule. For more information on the supported object's attributes, please refer to [Zscaler ZPA documentation](https://help.zscaler.com/zpa/policy-set-controller#/mgmtconfig/v2/admin/customers/\{customerId}/policySet/\{policySetId}/rule-post). |
  | Policy Set ID        | The unique identifier of the policy set.                                                                                                                                                                                                                                       |
  | Tenant ID            | The unique identifier of the ZPA tenant.                                                                                                                                                                                                                                       |
</div>

## Example Output

```json theme={"dark"}
{
	"action": "ALLOW",
	"appServerGroups": [
		{
			"name": "string",
			"enabled": true,
			"dynamicDiscovery": true
		}
	],
	"appConnectorGroups": [
		{
			"name": "string",
			"enabled": true,
			"connectors": [
				{
					"name": "string",
					"enabled": true,
					"controlChannelStatus": "UNKNOWN",
					"currentVersion": "string",
					"upgradeStatus": "COMPLETE"
				}
			]
		}
	],
	"conditions": [
		{
			"negated": true,
			"operator": "AND"
		}
	],
	"name": "string",
	"operator": "AND",
	"policySetId": 0,
	"policyType": 0,
	"priority": 0,
	"serviceEdgeGroups": [
		{
			"name": "string",
			"enabled": true,
			"serviceEdges": [
				{
					"name": "string",
					"enabled": true,
					"controlChannelStatus": "UNKNOWN",
					"currentVersion": "string",
					"upgradeStatus": "COMPLETE"
				}
			]
		}
	]
}
```

## Workflow Library Example

[Set New Policy Rule with Zscaler Private Access and Send Results Via Email](https://library.blinkops.com/workflows/set-new-policy-rule-with-zscaler-private-access-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/set-new-policy-rule-with-zscaler-private-access-and-send-results-via-email/canvas" />
</div>
