BillingTrustRuleCollection.CreateOrUpdate Method

Definition

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.

  • Request Path. : /{resourceUri}/providers/Microsoft.BillingTrust/assessments/default/rules/{ruleName}.
  • Operation Id. : Rules_CreateOrUpdate.
  • Default Api Version. : 2026-03-17-preview.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Billing.Trust.BillingTrustRuleResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleName, Azure.ResourceManager.Billing.Trust.BillingTrustRuleData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Billing.Trust.BillingTrustRuleData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Billing.Trust.BillingTrustRuleResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Billing.Trust.BillingTrustRuleData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Billing.Trust.BillingTrustRuleResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, ruleName As String, data As BillingTrustRuleData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of BillingTrustRuleResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

ruleName
String

The name of the rule. Rules are created by the service when the parent assessment is created — the available rule names are determined by the assessment template. Names start with an alphanumeric character and may contain letters, digits, underscores, and hyphens.

data
BillingTrustRuleData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

ruleName or data is null.

ruleName is an empty string, and was expected to be non-empty.

Applies to