/// <summary> /// The Delete Network Security Group operation removes thespecified /// 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> DeleteAsync(this INetworkSecurityGroupOperations operations, string networkSecurityGroupName) { return(operations.DeleteAsync(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> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this INetworkSecurityGroupOperations operations, string resourceGroupName, string networkSecurityGroupName) { return(operations.DeleteAsync(resourceGroupName, networkSecurityGroupName, CancellationToken.None)); }