Edit

resourcePolicyRule resource type

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Contains the Rego policy and applicability information in the rule property of resourcePolicyDefinition.

In JSON requests, supply the Rego text as a JSON-escaped string in policy. The create, update, and upsert operations also accept Content-Type: text/plain, with the unescaped Rego text as the entire request body.

Methods

None.

Properties

Property Type Description
appliesTo policyAppliesTo The resource or action and operations that the policy applies to, extracted from the Rego policy's __metadata__.selector. Read-only.
policy String The Rego policy, represented as a JSON-escaped string in JSON requests and responses. Its package name supplies the definition's unique name and version.

Relationships

None.

JSON representation

The following JSON representation shows the resource type.

{
  "@odata.type": "#microsoft.graph.resourcePolicyRule",
  "appliesTo": {
    "@odata.type": "microsoft.graph.policyAppliesTo"
  },
  "policy": "String"
}