func DeleteDisk(diskName string) error { if len(diskName) == 0 { return fmt.Errorf(azure.ParamNotSpecifiedError, "diskName") } requestURL := fmt.Sprintf(azureVMDiskURL, diskName) requestId, err := azure.SendAzureDeleteRequest(requestURL) if err != nil { return err } azure.WaitAsyncOperation(requestId) return nil }
func DeleteVMDeployment(cloudserviceName, deploymentName string) error { if len(cloudserviceName) == 0 { return fmt.Errorf(azure.ParamNotSpecifiedError, "cloudserviceName") } if len(deploymentName) == 0 { return fmt.Errorf(azure.ParamNotSpecifiedError, "deploymentName") } requestURL := fmt.Sprintf(deleteAzureDeploymentURL, cloudserviceName, deploymentName) requestId, err := azure.SendAzureDeleteRequest(requestURL) if err != nil { return err } azure.WaitAsyncOperation(requestId) return nil }
func DeleteHostedService(dnsName string) error { if len(dnsName) == 0 { return fmt.Errorf(azure.ParamNotSpecifiedError, "dnsName") } err := verifyDNSname(dnsName) if err != nil { return err } requestURL := fmt.Sprintf(deleteAzureHostedServiceURL, dnsName) requestId, err := azure.SendAzureDeleteRequest(requestURL) if err != nil { return err } azure.WaitAsyncOperation(requestId) return nil }