/// <summary> /// Deletes the pecified Network Security Group from your /// subscription.If the Network Security group is still associated /// with some VM/Role/Subnet, the deletion will fail. In order to /// successfully delete the Network Security, it needs to be not used. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the Network Security Group to delete. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static Task <OperationStatusResponse> BeginDeletingAsync(this INetworkSecurityGroupOperations operations, string networkSecurityGroupName) { return(operations.BeginDeletingAsync(networkSecurityGroupName, CancellationToken.None)); }
/// <summary> /// The Delete NetworkSecurityGroup operation deletes the specifed /// network security group /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Network.INetworkSecurityGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='networkSecurityGroupName'> /// Required. The name of the network security group. /// </param> /// <returns> /// If the resource provide needs to return an error to any operation, /// it should return the appropriate HTTP error code and a message /// body as can be seen below.The message should be localized per the /// Accept-Language header specified in the original request such /// thatit could be directly be exposed to users /// </returns> public static Task <UpdateOperationResponse> BeginDeletingAsync(this INetworkSecurityGroupOperations operations, string resourceGroupName, string networkSecurityGroupName) { return(operations.BeginDeletingAsync(resourceGroupName, networkSecurityGroupName, CancellationToken.None)); }