PrivateLinkResourceCollection.CreateOrUpdateAsync Method

Definition

Create a private link resource. This operation creates the necessary infrastructure to enable private endpoint connections to Microsoft Defender for Cloud services. For updates to existing resources, use the PATCH operation. The operation is asynchronous and may take several minutes to complete.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/privateLinks/{privateLinkName}.
  • Operation Id. : PrivateLinkResources_Create.
  • Default Api Version. : 2026-01-01.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.PrivateLinkResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateLinkName, Azure.ResourceManager.SecurityCenter.SecurityCenterPrivateLinkResourceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.SecurityCenterPrivateLinkResourceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.PrivateLinkResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.SecurityCenterPrivateLinkResourceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.PrivateLinkResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, privateLinkName As String, data As SecurityCenterPrivateLinkResourceData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of PrivateLinkResource))

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.

privateLinkName
String

The name of the private link resource.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

privateLinkName or data is null.

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

Applies to