Condividi tramite


CognitiveServicesOutboundRuleBasicCollection.CreateOrUpdateAsync Method

Definition

The PUT API for creating or updating a single outbound rule of the managed network associated with the cognitive services account.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}.
  • Operation Id. : OutboundRuleBasicResources_CreateOrUpdate.
  • Default Api Version. : 2026-01-15-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesOutboundRuleBasicResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleName, Azure.ResourceManager.CognitiveServices.CognitiveServicesOutboundRuleBasicData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesOutboundRuleBasicData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesOutboundRuleBasicResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesOutboundRuleBasicData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesOutboundRuleBasicResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, ruleName As String, data As CognitiveServicesOutboundRuleBasicData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CognitiveServicesOutboundRuleBasicResource))

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

Name of the cognitive services account managed network outbound rule.

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