Delen via


SubscriptionAliasCollection.CreateOrUpdateAsync Method

Definition

Create Alias Subscription.

  • Request Path: /providers/Microsoft.Subscription/aliases/{aliasName}
  • Operation Id: Alias_Create
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Subscription.SubscriptionAliasResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string aliasName, Azure.ResourceManager.Subscription.Models.SubscriptionAliasCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Subscription.Models.SubscriptionAliasCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Subscription.SubscriptionAliasResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Subscription.Models.SubscriptionAliasCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Subscription.SubscriptionAliasResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, aliasName As String, content As SubscriptionAliasCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of SubscriptionAliasResource))

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.

aliasName
String

AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

aliasName or content is null.

Applies to