ApiManagementSubscriptionCollection.CreateOrUpdate Method

Definition

Creates or updates the subscription of specified user to the specified product.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}
  • Operation Id: Subscription_CreateOrUpdate
  • Default Api Version: 2023-03-01-preview
  • Resource: ApiManagementSubscriptionResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApiManagement.ApiManagementSubscriptionResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string sid, Azure.ResourceManager.ApiManagement.Models.ApiManagementSubscriptionCreateOrUpdateContent content, bool? notify = default, Azure.ETag? ifMatch = default, Azure.ResourceManager.ApiManagement.Models.AppType? appType = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ApiManagement.Models.ApiManagementSubscriptionCreateOrUpdateContent * Nullable<bool> * Nullable<Azure.ETag> * Nullable<Azure.ResourceManager.ApiManagement.Models.AppType> * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApiManagement.ApiManagementSubscriptionResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ApiManagement.Models.ApiManagementSubscriptionCreateOrUpdateContent * Nullable<bool> * Nullable<Azure.ETag> * Nullable<Azure.ResourceManager.ApiManagement.Models.AppType> * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApiManagement.ApiManagementSubscriptionResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, sid As String, content As ApiManagementSubscriptionCreateOrUpdateContent, Optional notify As Nullable(Of Boolean) = Nothing, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional appType As Nullable(Of AppType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ApiManagementSubscriptionResource)

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.

sid
String

Subscription entity Identifier. The entity represents the association between a user and a product in API Management.

notify
Nullable<Boolean>

Notify change in Subscription State.

  • If false, do not send any email notification for change of state of subscription
  • If true, send email notification of change of state of subscription
ifMatch
Nullable<ETag>

ETag of the Entity. Not required when creating an entity, but required when updating an entity.

appType
Nullable<AppType>

Determines the type of application which send the create user request. Default is legacy publisher portal.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

sid or content is null.

Applies to