Share via


Rule Based Policies - Create Rule Based Policy

Create rule based policy.
Create new rule based policy. The input includes rule sets, inputs, and other metadata related to the policy.

POST https://api.powerplatform.com/governance/ruleBasedPolicies?api-version=2022-03-01-preview

URI Parameters

NameInRequiredTypeDescription
api-version
query True

string

The API version.

Request Body

NameTypeDescription
name

string

The name of the policy.

ruleSets

RuleSet[]

Responses

NameTypeDescription
200 OK

RuleAssignment

The details of the policy.

400 Bad Request

Bad Request - The query parameters are invalid.

401 Unauthorized

Unauthorized - Invalid credentials or missing authentication.

404 Not Found

Not Found - The specified resource does not exist.

500 Internal Server Error

Internal Server Error - Unexpected server error.

Security

oauth2

Microsoft Entra ID OAuth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize?resource=https://api.powerplatform.com

Scopes

NameDescription
.default .default

Definitions

NameDescription
PolicyRequest
RuleAssignment
RuleSet

PolicyRequest

NameTypeDescription
name

string

The name of the policy.

ruleSets

RuleSet[]

RuleAssignment

NameTypeDescription
policyId

string

The unique identifier of the policy.

resourceId

string

The unique identifier of the resource.

resourceType enum:
  • EnvironmentGroup
  • NotSpecified

The type of resource assigned to the rule.

ruleSetCount

integer

The count of rule sets assigned.

tenantId

string

The unique identifier of the tenant.

RuleSet

NameTypeDescription
id

string

The unique identifier of the rule set.

inputs

object

The inputs for the rule set, which may vary based on the rule.

version

string

The version of the rule set.