/// <summary> /// Updates specific product subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <param name='parameters'> /// Required. Update parameters. /// </param> /// <param name='etag'> /// Required. ETag. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> UpdateAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string etag) { return(operations.UpdateAsync(resourceGroupName, serviceName, sid, parameters, etag, CancellationToken.None)); }
/// <summary> /// Updates specific product subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <param name='parameters'> /// Required. Update parameters. /// </param> /// <param name='etag'> /// Required. ETag. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Update(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string etag) { return(Task.Factory.StartNew((object s) => { return ((ISubscriptionsOperations)s).UpdateAsync(resourceGroupName, serviceName, sid, parameters, etag); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Updates the details of a subscription specificied by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='sid'> /// Subscription entity Identifier. The entity represents the association /// between a user and a product in API Management. /// </param> /// <param name='parameters'> /// Update parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='notify'> /// 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 /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, bool?notify = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Updates the details of a subscription specificied by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='sid'> /// Subscription entity Identifier. The entity represents the association /// between a user and a product in API Management. /// </param> /// <param name='parameters'> /// Update parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='notify'> /// 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 /// </param> public static void Update(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, bool?notify = default(bool?)) { operations.UpdateAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify).GetAwaiter().GetResult(); }
/// <summary> /// Updates the details of a subscription specified by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='sid'> /// Subscription entity Identifier. The entity represents the association /// between a user and a product in API Management. /// </param> /// <param name='parameters'> /// Update parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='notify'> /// 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 /// </param> /// <param name='appType'> /// Determines the type of application which send the create user request. /// Default is legacy publisher portal. Possible values include: 'portal', /// 'developerPortal' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SubscriptionContract> UpdateAsync(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, bool?notify = default(bool?), string appType = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify, appType, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates the details of a subscription specified by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='sid'> /// Subscription entity Identifier. The entity represents the association /// between a user and a product in API Management. /// </param> /// <param name='parameters'> /// Update parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='notify'> /// 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 /// </param> /// <param name='appType'> /// Determines the type of application which send the create user request. /// Default is legacy publisher portal. Possible values include: 'portal', /// 'developerPortal' /// </param> public static SubscriptionContract Update(this ISubscriptionOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionUpdateParameters parameters, string ifMatch, bool?notify = default(bool?), string appType = default(string)) { return(operations.UpdateAsync(resourceGroupName, serviceName, sid, parameters, ifMatch, notify, appType).GetAwaiter().GetResult()); }