public async Task <Response> Delete(int id) { await _userOperations.DeleteAsync(id); return(new Response { Status = ResponseStatus.Ok }); }
/// <summary> /// Delete a user. (see /// http://msdn.microsoft.com/en-us/library/azure/dn151676.aspx for /// more information) /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IUserOperations. /// </param> /// <param name='user'> /// Required. user object id or user principal name /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this IUserOperations operations, string user) { return(operations.DeleteAsync(user, CancellationToken.None)); }
/// <summary> /// Deletes specific user. /// </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='userId'> /// User identifier. Must be unique in the current API Management service /// instance. /// </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='deleteSubscriptions'> /// Whether to delete user's subscription or not. /// </param> /// <param name='notify'> /// Send an Account Closed Email notification to the User. /// </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 void Delete(this IUserOperations operations, string resourceGroupName, string serviceName, string userId, string ifMatch, bool?deleteSubscriptions = default(bool?), bool?notify = default(bool?), string appType = default(string)) { operations.DeleteAsync(resourceGroupName, serviceName, userId, ifMatch, deleteSubscriptions, notify, appType).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static void Delete(this IUserOperations operations, string id) { operations.DeleteAsync(id).GetAwaiter().GetResult(); }