Share via


UserAssignedIdentityCollection.CreateOrUpdate Method

Definition

Create or update an identity in the specified subscription and resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}
  • Operation Id: UserAssignedIdentities_CreateOrUpdate
  • Default Api Version: 2023-01-31
  • Resource: UserAssignedIdentityResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string resourceName, Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ManagedServiceIdentities.UserAssignedIdentityResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, resourceName As String, data As UserAssignedIdentityData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of UserAssignedIdentityResource)

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.

resourceName
String

The name of the identity resource.

data
UserAssignedIdentityData

Parameters to create or update the identity.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

resourceName or data is null.

Applies to