---
title: "PUT /{resourceUri}/providers/Microsoft.BillingTrust/assessments/default/rules/{ruleName}"
method: PUT
path: "/{resourceUri}/providers/Microsoft.BillingTrust/assessments/default/rules/{ruleName}"
tags: ["Rules"]
---

# PUT /{resourceUri}/providers/Microsoft.BillingTrust/assessments/default/rules/{ruleName}

`PUT /{resourceUri}/providers/Microsoft.BillingTrust/assessments/default/rules/{ruleName}`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/{resourceUri}/providers/Microsoft.BillingTrust/assessments/default/rules/{ruleName}`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Create or update a Rule. **This operation is required for RPaaS tracked-resource
cache population and MUST remain in the public spec.** Rules are created by the
service when the parent assessment is created; they are not directly creatable
by end users. All customer PUT calls are rejected at runtime with
`OperationNotAllowed` via the RPaaS ResourceCreationValidate extension.
Use PATCH to modify rule fields that the customer is authorized to change.
Peer RPs with the same topology (extension singleton parent + proxy child)
declare an identical public PUT for the same RPaaS cache-population reason:
Microsoft.ScVmm/virtualMachineInstances/guestAgents,
Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/guestAgents.

## Path parameters

- `resourceUri` string, required
- `ruleName` string, required

## Parameters

- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ApiVersionParameter` (unresolved $ref)

## Request body

- Rule (unresolved $ref)

## Response `200`

Resource 'Rule' update operation succeeded

- Rule (unresolved $ref)

## Other responses

- `201`: Resource 'Rule' create operation succeeded
- `default`: An unexpected error response.

---

[API](https://skmtc.dev/azure/apis/billingtrust-management-api.md) - [All operations](https://skmtc.dev/azure/apis/billingtrust-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/billingtrust-management-api/revisions/d80eb2ee5211?raw)
