UsagePlanEnrollmentCollection.CreateOrUpdate Method

Definition

Create or update an Enrollment.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureResilienceManagement/usagePlans/{usagePlanName}/enrollments/{enrollmentName}.
  • Operation Id. : Enrollments_CreateOrUpdate.
  • Default Api Version. : 2026-04-01-preview.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ResilienceManagement.UsagePlanEnrollmentResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string enrollmentName, Azure.ResourceManager.ResilienceManagement.UsagePlanEnrollmentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ResilienceManagement.UsagePlanEnrollmentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ResilienceManagement.UsagePlanEnrollmentResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ResilienceManagement.UsagePlanEnrollmentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ResilienceManagement.UsagePlanEnrollmentResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, enrollmentName As String, data As UsagePlanEnrollmentData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of UsagePlanEnrollmentResource)

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.

enrollmentName
String

The name of the enrollment.

data
UsagePlanEnrollmentData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

enrollmentName or data is null.

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

Applies to