Sql Virtual Machine Groups - Delete

Deletes a SQL virtual machine group.

DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}?api-version=2023-10-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

sqlVirtualMachineGroupName
path True

string

Name of the SQL virtual machine group.

subscriptionId
path True

string

Subscription ID that identifies an Azure subscription.

api-version
query True

string

API version to use for the request.

Responses

Name Type Description
200 OK

Successfully deleted the SQL virtual machine group.

202 Accepted

Deleting the SQL virtual machine group.

Headers

Location: string

204 No Content

The specified SQL virtual machine group does not exist.

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 RPGenericUser - User Failure when calling other Resource Provider.

  • 400 RPResponseMissingAsyncOperationHeader - Response is missing Async operation header information

  • 400 InvalidArgument - Invalid argument '{0}'.

  • 400 ArgumentNotInRange - Argument '{0}' not in range.

  • 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

  • 400 CRPNotAllowedOperation - Operation cannot be completed due to the following error: {0}

  • 400 AadAppDisabled - Microsoft AAD app SQLVMResourceProviderAuth ({0}) is disabled in your tenant.

  • 400 InternalAPIAccessDenied - Internal API Access denied. App Id {0} is not valid to use this API.

  • 400 InvalidSQLAuthPasswordLength - SQL auth password should not be greater than 128 characters

  • 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

  • 400 InvalidParameterValue - An invalid value was given to parameter.

  • 400 AgDoesNotExist - Availability group does not exist.

  • 400 AgListDoesNotMatch - SQL Availability group list does not match the list of virtual machines in SQL Virtual machine group.

  • 400 NoIpProvided - At least one IP needs to be provided.

  • 400 MoreIpProvided - Only one IP needs to be provided.

  • 400 SqlVmGroupDoesNotHaveAGListener - SQL virtual machine group does not have the AG listener.

  • 400 AgListenerUpdateNotAllowed - Only handful properties of availability group listener can be updated.

  • 400 SqlVmNotInGroup - SQL virtual machine is not part of the group.

  • 400 SqlVmListCannotBeEmpty - SQL virtual machines list cannot be empty.

  • 400 PublicIpNotIPv4 - Public IP must be IPv4 address.

  • 400 PublicIPDynamicAllocation - Public IP allocation mode must be static

  • 400 PublicLBInvalid - Load balancer specified is not public.

  • 400 SubnetMissingFromPrivateIP - Subnet must be provided with private IP.

  • 400 IPNotInSubnet - IP not part of subnet.

  • 400 NoActivePrimaryInAG - None of the nodes in AvailabilityGroup are Primary

  • 400 MultipleListenerSameAG - Multiple availability group listeners for same availability group are not allowed.

  • 400 AgListenerNotEmpty - Availability group listener not empty.

  • 400 AgListenerVnetMismatch - Provided VNet for Availability group listener does not match Vnet of internal load balancer.

  • 400 InternalLBInvalid - Load balancer specified is not internal.

  • 400 InvalidSqlVmResourceIdParameterValue - SQL virtual machine resource id provided is invalid.

  • 400 DifferentSubSqlVmList - All SQL virtual machines should be under same subscription.

  • 400 OnlyStandardPublicIp - Every virtual machine should have standard public IP.

  • 400 ListenerNameTooLong - Listener name should not exceed 15 characters.

  • 400 InvalidListenerName - Invalid listener name.

  • 400 InvalidLBResourceIdParameterValue - Load balancer resource id is invalid.

  • 400 InvalidPublicIpResourceIdParameterValue - Public IP resource id is invalid.

  • 400 InvalidSubnetIdParameterValue - Invalid resource id provided for subnet parameter.

  • 400 InvalidPrivateIpParameterValue - Invalid address given for private IP address.

  • 400 ExtVersionNotSupported - The virtual machine: {0} is running older version of SqlIaasExtension which is not supported by this operation. Please update the extension and retry the operation.

  • 400 InvalidReplicaRole - Invalid replica role: {0} specified for SQL VM: {1}.

  • 400 InvalidReplicaFailover - Invalid replica Failover: {0} for SQL VM: {1}.

  • 400 InvalidReplicaReadableSecondary - Invalid replica readable secondary: {0} for SQL VM: {1}.

  • 400 InvalidReplicaCommit - Invalid replica commit mode: {0} for SQL VM: {1}.

  • 400 ExpectedSynchronousCommitForAutomaticFailover - Invalid replica commit mode: {0} for SQL VM: {1}. {2} is expected for failover mode: {3}.

  • 400 NoPrimaryInAg - There are no replicas with primary role. There should be exactly one replica with role as primary.

  • 400 MoreThanOnePrimaryInAg - There are more than one replica with primary role. There should be exactly one replica with role as primary.

  • 400 MoreThanThreeSynchronousCommitInAg - There are more than three replica with commit mode as: {0}. There should be at most three replica with commit mode as: {0}

  • 400 MoreThanEightSecondariesInAg - There are more than eight secondary replica with secondary role. There should be at most eight replica with role as secondary.

  • 400 AlwaysOnNotEnabled - Always on feature is not enabled on Virtual machine: {0}.

  • 400 ExpectedReplicaNotPrimary - The VM: {0} does not host the primary replica.

  • 400 ListenerSqlvmsMismatchWithReplicaSqlvms - List of SQL VMs specified in Availability group does not match list of SQL VMs in listener config.

  • 400 ReplicaSqlvmHasDuplicateEntries - Replica configuration should be unique for each SQL virtual machine. We have found one or more configuration for the same SQL virtual machine resource.

  • 400 ReplicaDeleteNotAllowed - Replica deletion through SQL VM RP is not supported yet.

  • 400 OnlyBasicPublicIP - All VM specified should contain only Basic Public IP, when providing Loadbalancer Basic Sku.

  • 400 NICCannotUseMultipleLBsOfSameType - NIC: {0} cannot reference more than one load balancer of INTERNAL or PUBLIC type

  • 400 AGReplicaSQLStartupAccount - NT service account cannot be used as SQL startup account for AG setup. You should use a domain account.

  • 400 AgListenerMultiSubnetUpdateNotAllowed - Update of multi subnet AG listener is not allowed.

  • 400 ListenerIpSubnetVmSubnetMismatch - Listener static ip address subnet and VM subnet should be same

  • 400 IpAddressEmpty - Cannot get the subnet mask when IP address is null or empty.

  • 400 InvalidIpAddress - Invalid address given for IP address.

  • 400 VmNicVnetMismatch - Virtual machine NIC VNet mismatch.

  • 400 NoAvailabilitySet - Vm is not associated with any availability set.

  • 400 AvailabilitySetMismatch - Availability set of virtual machines does not match.

  • 400 MismatchVmGroupSubscription - Subscription id for SQL virtual machine and SQL virtual machine group are different.

  • 400 VmNotRunning - The VM is not in running state.

  • 400 VmAgentNotRunning - The VM agent is not installed or in running state.

  • 400 NoIpAvailable - No available IP.

  • 400 SqlVmGroupUpdateFailVmAttached - SQL virtual machine group cannot be updated as it has attached a SQL virtual machine.

  • 400 InvalidSqlImageOffer - Provided SQL image offer is invalid.

  • 400 InvalidSqlSku - Provided SQL sku is invalid. Sql VM Group allowed values are Enterprise or Developer.

  • 400 OuPathAndDomainMismatch - OU path is not within the domain provided.

  • 400 InvalidAccountNameFormat - Account name format is invalid.

  • 400 CloudWitnessUnsupported - For Windows Server 2012R2 setup cloud witness is not allowed.

  • 400 FileShareWitnessDisAllowed - For Windows Server 2016 and beyond setup, file share witness is not allowed.

  • 400 InvalidStorageAccountUrl - Invalid storage account url.

  • 400 SqlVmGroupNameTooLong - SQL virtual machine group name cannot exceed 15 characters.

  • 400 InvalidSqlVmGroupName - Invalid SQL virtual machine group name.

  • 400 SqlVmGroupNotEmpty - SQL virtual machine group is not empty.

  • 400 SqlVmGroupUpdateNotAllowed - Update to SQL virtual machine group is not allowed.

  • 403 AccessDenied - Access denied.

  • 404 SubscriptionDoesNotExist - Subscription id does not exist.

  • 404 ResourceDoesNotExist - Resource does not exist.

  • 404 RPOperationNotFound - Operation not found

  • 404 OperationIdNotFound - Operation id could not be found.

  • 404 OperationTypeNotFound - Operation Type not found.

  • 404 ResourceNotFound - The requested resource was not found.

  • 404 SubscriptionDoesNotHaveSqlVMGroupInResourceGroup - Subscription does not have SQL virtual machine group in resource group.

  • 404 SubscriptionDoesNotHaveSqlVMGroupInResourceGroup - Subscription does not have SQL virtual machine group in resource group.

  • 409 OperationInProgress - Operation in progress on resource already.

  • 409 OperationCanceled - Operation Cancelled.

  • 409 ResourceAlreadyExists - Resource already exists.

  • 409 LBGenericErrors - LB operation failed

  • 409 NICGenericError - NIC operation failed

  • 409 SqlExtensionNotInstalled - SQL extension not installed.

  • 409 RPPluginSubstatusMissing - RP plugin substatus missing

  • 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

  • 409 ResourceExists - There was an internal error in cleaning up of resources.

  • 409 SubscriptionOperationInProgress - An operation on subscription is already in progress

  • 409 ReplicasWithDifferentSqlStartupAccounts - Please make sure all your SQL server startup accounts in the specified replicas are the same. This is one of our prerequisites for setting up availability groups.

  • 409 ReplicasJoinedToMoreThanOneCluster - AG replicas are joined to more than one failover cluster. Please make sure all your replicas are joined to same failover cluster.

  • 409 IPNotAvailable - IP {0} is not available{1}. Consider using one from ({2})

  • 409 IpAddressAlreadyReserved - IP address reserved for this listener already exists. Please use the IP address

  • 429 SqlVmGroupGmsaNotAllowed - GMSA account is not supported yet.

  • 429 SqlVmGroupGmsaInfoInvalid - GMSA info such as SqlServiceAccount is not valid.

  • 429 TooManyRequestsReceived - Request throttled due to too many requests.

  • 429 ArgumentMissingForSetup - Argument is missing for setup. Please provide a value for the argument.

  • 429 MultisubnetOperationNotAllowed - Multi subnet HA setup operation is not allowed.

  • 500 UnExpectedErrorOccurred - Unexpected error occurred.

  • 500 OperationTimeout - Operation timed out.

  • 500 RPGenericSystem - System Failure when calling other Resource Provider.

  • 500 StorageAccountUnexpectedError - Unexpected error for storage account.

  • 500 SqlVmEntityNotFound - SQL VM entity not found.

  • 500 RestoreJobEntityNotFound - Restore job entity not found.

  • 500 RpPluginSubstatusHAStatusMissing - Resource provider plugin substatus is missing HA status.

  • 500 SqlVmGroupIsBusy - SQL virtual machine group is busy.

Examples

Deletes a SQL virtual machine group.

Sample Request

DELETE https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup?api-version=2023-10-01

Sample Response

azure-asyncoperation: http://azure.async.operation/status
location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.SqlVirtualMachine/locations/eastus2/sqlVirtualMachineGroupOperationResults/f0405ceb-e867-4f00-8085-738f2c5d76fd?api-version=2022-02-01-preview
azure-asyncoperation: http://azure.async.operation/status
location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.SqlVirtualMachine/locations/eastus2/sqlVirtualMachineGroupOperationResults/f0405ceb-e867-4f00-8085-738f2c5d76fd?api-version=2022-08-01-preview

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.