> For the complete documentation index, see [llms.txt](https://docs.opsmx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opsmx.com/opsmx-1/opsmx-context-engine/additional-resources/previous-releases/isd-3.12/data-and-intelligence-module-autopilot/continuous-compliance-policy/runtime-policies.md).

# Runtime Policies

The runtime policies allows you to validate policies in runtime through 3rd party policy engines (like Open Policy Agent) using REST API.

### Create Policy

To create a new policy follow the steps below:

1. Click “**Compliance**” → Click “**Policy Management**” → “+**New Policy**” button as shown below:

![](/files/gYzm78uAWiABbs6PlQFz)

2\. The Policy Management screen appears and select "**Runtime**" policy type as shown below:

![](/files/hJqeXLwK45nayZ4pCGaZ)

Enter the following details:

* Enter the Name of the policy in the text box.
* Select the Policy type as Runtime from the drop-down.
* Select the Policy Engine as OPA from the drop-down.
* Select the Policy Engine Account from the drop-down.
* Enter the Policy Description in the text box.
* Select and add any available Policy file.
* Enter the **Policy Details** in the text box. Refer to the image below:

![](/files/P3jJsjDeb3tShLaKP8MO)

The Policy details is explained below:

**Step 1**

The start time is converted to nanoseconds and the Time zone is set to `America/Los_Angeles`.

```
# convert to nanoseconds
startTime := input.startTime * 1000000
# define time zone
tz = "America/Los_Angeles"
```

&#x20;**Step 2**&#x20;

A rule is set that if the pipeline has no start time then it will not execute the pipeline.

```
deny["Pipeline has no start time"] {
   startTime == 0
}
```

&#x20;**Step 3**

A rule is set that no pipeline will be deployed between 2nd - 27th September 2020.

```
deny["No deploys between 2nd - 27th sept 2020"] {
   [year, month, day] := time.date(time.now_ns())
   year == 2020
   month == 9
   day > 2
   day < 27
 }
```

3\. After entering the details click **Save & Finish** to create the policy as shown in the image below:

![](/files/Xuj2mrVE2gHaiqjBs77t)

### **Edit Policy**

To edit a policy follow the steps below:

1. Click the icon beside the name of the policy and select Edit as shown in the image below:

![](/files/3rIOFuOqrz3uHTlyAhJk)

2\. Edit the required details and click **Save & Finish.**

### **Delete Policy**

To delete a policy follow the steps given below:

1. Click the icon beside the name of the policy and select Delete as shown in the image below:

![](/files/w70lVVbOAZOJH5JGlboa)

2\. The confirmation pop-up appears as shown below:

![](/files/DSPRJmMAvVh0B1yxlm8M)

3\. Click **Yes, delete it!** to delete the policy.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.opsmx.com/opsmx-1/opsmx-context-engine/additional-resources/previous-releases/isd-3.12/data-and-intelligence-module-autopilot/continuous-compliance-policy/runtime-policies.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
