Sql Virtual Machines - Update

Updates SQL virtual machine tags.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}?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.

sqlVirtualMachineName
path True

string

Name of the SQL virtual machine.

Regex pattern: ^((?!_)[^\\/"'\[\]:|<>+=;,?*@&]{1,64}(?<![.-]))$

subscriptionId
path True

string

Subscription ID that identifies an Azure subscription.

api-version
query True

string

API version to use for the request.

Request Body

Name Type Description
tags

object

Resource tags.

Responses

Name Type Description
200 OK

SqlVirtualMachine

Successfully updated the SQL virtual machine.

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 RestoreJobIdsMismatch - Restore Job Id mismatch, current restore job id is {0} while input is {1}.

  • 400 RestoreJobSetToAutoCutover - Restore Job is set to AutoCutover. No Operation will be accept except Cancel.

  • 400 DuplicateTargetDatabaseName - Two or more target databases have the same name: '{0}'.

  • 400 AutoBackupEncryptionPasswordNotSpecified - Password not provided when enabling encryption as auto backup setting.

  • 400 BackupScheduleTypeNotSet - Backup schedule type needs to be set.

  • 400 BackupStorageCredentialsNotSpecified - Backup storage credentials are not specified.

  • 400 KeyVaultCredentialsNotSpecified - Key vault credentials not specified.

  • 400 SqlCredentialsNotSpecified - SQL Server credentials are not specified.

  • 400 IncompleteAutoPatchingSettings - Incomplete auto patching settings specified.

  • 400 IncompleteAutoBackupSettings - Incomplete auto backup settings specified.

  • 400 IncompleteSqlStorageSettings - Incomplete SQL storage settings specified.

  • 400 InvalidVmResourceIdChange - Virtual machine resource id property cannot be updated.

  • 400 SqlVmAlreadyIncludedInGroup - SQL virtual machine cannot be moved from one group to another in same operation.

  • 400 SqlVmCannotRemoveFromGroup - SQL virtual machine cannot be removed from group.

  • 400 VmLocationMismatch - VM location does not match that of SQL virtual machine.

  • 400 VmInsufficientPermission - Insufficient permission to Vm.

  • 400 SingleNicOnVmAllowed - Only Single NIC virtual machines are allowed in a SQL VM Group.

  • 400 InvalidSqlVmGroupResourceIdParameterValue - SQL virtual machine group resource id is not in correct format.

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

  • 400 IncompleteDomainCredentialsProperty - Incomplete input provided for domain credentials property.

  • 400 BYOLChangeToPAYGNotSupported - The conversion from AHUB to PAYG is not supported for BYOL images

  • 400 InvalidVmResourceIdParameterValue - Provided virtual machine resource id is not valid.

  • 400 MismatchInSqlVmAndVmResourceIdSubscription - Mismatch in subscription id for SQL virtual machine and virtual machine resource id property.

  • 400 MismatchSqlVmAndVmName - SQL virtual machine name is not same as the virtual machine name provided on VirtualMachineResourceId property.

  • 400 MismatchSqlVmAndVmRgName - SQL virtual machine resource group name is not same as the virtual machine resource group name provided on VirtualMachineResourceId property.

  • 400 NotSupportedSqlVmOSVersion - Virtual machine OS type is not Windows. Only Windows OS versions are supported

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

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

  • 400 PAYGNotSupportedForNonGalleryVM - License type PAYG is invalid for this Virtual Machine as this was not created from Azure marketplace image.

  • 400 CannotDetermineSqlVersionAndEditionFromVm - Sql IaaS Extension cannot determine the SQL version and edition from the vm.

  • 400 MismatchSqlVmSku - Sql virtual machine sku mismatch.

  • 400 CannotConvertToFreeBenefit - Cannot convert Free SQL editions to {0}.

  • 400 SqlEvaluationSkuNotSupported - SQL Evaluation version does not support licensing changes.

  • 400 IncompleteStorageConfigurationSettings - Incomplete Storage Configuration Settings

  • 400 InvalidDefaultFilePath - Invalid Default File Path

  • 400 InvalidLUNSpecified - Invalid Logical Unit number specified, Logical Unit number should be a non-negative number.

  • 400 BothStorageV1V2Specified - Invalid Request. Only one of SQL Storage Storage Setting or Storage Configuration Settings should be specified

  • 400 InvalidLUNsSpecifiedForSameDrive - Invalid Logical Unit numbers specified. Logical Unit number used for the same drive need to be the same.

  • 400 InvalidLUNsSpecifiedForDifferentDrives - Invalid Logical Unit numbers specified. Different drive could not reuse the same Logical Unit number.

  • 400 InvalidExtendPayload - Invalid Sql Storage Settings Extend Payload. Only support extend one drive at a time.

  • 400 SqlLicenseTypeMissing - Please specify license type for Sql Virtual Machine. The property is 'SqlServerLicenceType' and allowed values are PAYG, AHUB and DR.

  • 400 VmAgentIsRunningForNoAgent - Cannot create or update as NoAgent model while the Guest Agent is running.

  • 400 InvalidSqlManagementMode - Cannot update the SQL management mode to {0}, the current mode is {1}. Please specify the value of property 'SqlManagement' as {1}.

  • 400 CannotDetermineSqlEditionFromRequest - Cannot determine the SQL edition.

  • 400 SqlManagementMissing - Please specify the Management Mode for Sql Virtual Machine. The property is 'SqlManagement' and allowed values are LightWeight or Full.

  • 400 SqlImageSkuMissingNoAgent - Please specify the Sql Server Edition for Sql Virtual Machine in NoAgent Mode. The property is 'SqlImageSku' and allowed values are Developer, Express, Web, Standard, or Enterprise.

  • 400 SqlImageOfferMissingNoAgent - Please specify the Sql Server Version and OS Version for Sql Virtual Machine in NoAgent Mode. The property is 'SqlImageOffer' and allowed values are SQL2008-WS2008 and SQL2008R2-WS2008.

  • 400 InvalidSqlImageOfferChange - SqlImageOffer property cannot be updated.

  • 400 SqlLicenseTypeNotSupported - SqlLicenseType NotSet incorrectly provided

  • 400 UnsupportedSqlManagementMode - Cannot update the SQL management mode to {0}, only {1} mode is supported for {2}.

  • 400 SqlVmInValidState - Cannot delete SqlVm since it's provisioned.

  • 400 ClusterOperatorAccountIsEmpty - Cannot add a VM to a SQLVM Group when cluster operator account is null or empty. Please update the group resource: {0} with the cluster operator account.

  • 400 SqlServiceAccountIsEmpty - Cannot add a VM to a SQLVM Group when SQL service account is null or empty. Please update the group resource: {0} with the SQL service account.

  • 400 UnknownSqlManagementMode - Cannot update the SQL management mode to {0}, please use one of the supported values.

  • 400 CandidateCurrentTimeIsAfterRegEndTime - Cannot register candidate entity as current time {0} is after allowed end time {1}.

  • 400 CandidateRegStartTimeIsAfterRegEndTime - Cannot register candidate entity as allowed start time {0} is after allowed end time {1}.

  • 400 VmOsTypeNotFound - OS type is not found.

  • 400 SqlLicenseManagementNotAllowed - Please set the License type of sql vm resource to null. License type manageability is currently not supported in this cloud.

  • 400 IPNotInSubnet - IP not part of subnet.

  • 400 InvalidSqlSkuUpdate - SqlImageSku property cannot be updated when license type management is blocked.

  • 400 VmOsVersionIsUnsupported - OS version is unsupported.

  • 400 RedeployIsNotSupported - Redeploy is not supported when SqlVm is not provisioned.

  • 400 InvalidLightweightMode - Invalid SQL VM Management mode. Please change SQL VM property 'SqlManagement' to FULL

  • 400 InvalidAssessmentSettingsEnableIsFalse - Invalid assessment settings specified. Enable must be set to true to use other assessment settings.

  • 400 SqlInstanceSettingsSet1NotAllowed - SQL Instance Settings MAXDOP, and Collation are not allowed to be configured if the Feature Switch is disabled

  • 400 InvalidAssessmentScheduleSettings - Invalid assessment schedule settings specified.

  • 400 LinuxDistroIsNotSupported - Linux distro is unsupported

  • 400 SqlServerSettingCollationNotAllowedToUpdate - SQL Server collation is not allowed to be updated in manageability.

  • 400 SqlServerSettingMinMemoryGreaterThanMaxMemory - SQL Server Min Server Memory (MB) cannot be greater than Max Server Memory (MB)

  • 400 SqlInstanceSettingsSet2NotAllowed - SQL Instance Settings Optimize for adhoc workloads, Min server memory (MB) and Max server memory (MB) are not allowed to be configured if the Feature Switch is disabled

  • 400 ClusterIpShouldBeEmpty - Argument wsfcStaticIp should be empty for single subnet listener

  • 400 InvalidClusterIpAddress - Invalid cluster ip address provided.

  • 400 SqlServerSettingLPIMNotAllowedToUpdate - SQL Server Lock Pages In Memory is not allowed to be updated in manageability.

  • 400 SqlServerSettingIFINotAllowedToUpdate - SQL Server IFI is not allowed to be updated in manageability.

  • 400 LeastPrivilegeModeEnableNotSupported - Least Privilege mode is not supported on LightWeight or NoAgent extension mode.

  • 400 LeastPrivilegeModeChangeNotSupported - Cannot disable Least Privilege mode once enabled.

  • 400 VmOSUnsupportedForAzureAD - OS is unsupported for Azure AD authentication.

  • 400 SqlVersionUnsupportedForAzureAD - SQL version is unsupported for Azure AD authentication.

  • 400 EnableAzureADInProvisionUnsupported - Enable Azure AD authentication in provision is unsupported.

  • 400 MSIClientIdRequired - MSI client Id is required for Azure AD authentication.

  • 400 AzureADAuthenticationNotAllowed - Configuring Azure AD authentication is currently not allowed.

  • 400 CannotFindExtensionVersion - Cannot determine SQL IaaS Extension version.

  • 400 LeastPrivilegeModeOnlySupportedForSQL2012AndAbove - Least privilege mode is only supported for SQL server 2012 and above versions.

  • 400 InvalidLunForNotUseStoragePool - Invalid LUN specified for storage configuration settings. Only one lun should be provided to build the drive if not using storage pool.

  • 400 ConflictStoragePoolConfigForUseSameDrive - UseStoragePool values are different while set to share the same drive. UseStoragePool value will be considered as True by default if not specified otherwise.

  • 400 StoragePoolConfigNotSupportedInExtend - UseStoragePool parameter is not supported in EXTEND operations.

  • 400 StoragePoolConfigNotAllowed - Configuring storage pool option when creating/updating sql vm is not allowed at the moment.

  • 400 PowerBiVmsNotSupported - Creating SQL Virtual Machine Resource for PowerBI VM images is not supported.

  • 400 SubscriptionFeatureRegistrationsApiCallFailed - API call to check if subscription is registered to the feature has failed

  • 400 InvalidFileSizeSpecified - Invalid Request. File Size cannot be negative

  • 400 MissingPatchParameters - Missing PATCH parameters on the request.

  • 400 InvalidFileCountSpecified - Invalid Request. File Count cannot be negative

  • 400 InvalidMIResourceId - Invalid value given for Managed Identity Resource Id. Specify a valid value.

  • 400 MismatchMIResourceId - The provided User assigned identity is not associated with the Virtual Machine.

  • 400 ManagedIdentityNotEnabled - The provided identity type is not enabled on the Virtual Machine.

  • 400 IncorrectAdditionalVmPatch - The value provided for AdditionalVmPatch is invalid.

  • 400 SubscriptionNotReady - Subscription not ready

  • 400 SqlVersionMismatchWithGroup - SQL version mismatch with SQL virtual machine group.

  • 400 VmOSVersionMismatchWithGroup - OS version mismatch with group.

  • 400 InvalidSqlImageOffer - Provided SQL image offer is invalid.

  • 400 SqlSkuMismatchWithGroup - SQL sku set on the SQL virtual machine group does not match that of the SQL virtual machine.

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

  • 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.

  • 403 AccessDenied - Access denied.

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

  • 404 SubscriptionDoesNotExist - Subscription id does not exist.

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

  • 404 ResourceNotFound - The requested resource was not found.

  • 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.

  • 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

  • 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

  • 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 FailedToGetRestoreStatusFromTableStorage - Failed to get restore status from table storage.

  • 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.

Examples

Updates a SQL virtual machine tags.

Sample Request

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

{
  "tags": {
    "mytag": "myval"
  }
}

Sample Response

{
  "properties": {
    "virtualMachineResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm",
    "provisioningState": "Updating",
    "sqlServerLicenseType": "PAYG",
    "sqlImageSku": "Enterprise",
    "sqlImageOffer": "SQL2022-WS2022",
    "sqlManagement": "Full",
    "leastPrivilegeMode": "Enabled",
    "enableAutomaticUpgrade": true,
    "additionalVmPatch": "WUMU",
    "osType": "Windows",
    "virtualMachineIdentitySettings": {
      "type": "SystemAssigned"
    }
  },
  "location": "northeurope",
  "tags": {
    "mytag": "myval"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm",
  "name": "testvm",
  "type": "Microsoft.SqlVirtualMachine/sqlVirtualMachines"
}

Definitions

Name Description
AADAuthenticationSettings

Enable AAD authentication for SQL VM.

AdditionalFeaturesServerConfigurations

Additional SQL Server feature settings.

AdditionalOsPatch

Additional VM Patching solution enabled on the Virtual Machine

AdditionalVmPatch

Additional Patch to be enable or enabled on the SQL Virtual Machine.

AssessmentDayOfWeek

Day of the week to run assessment.

AssessmentSettings

Configure SQL best practices Assessment for databases in your SQL virtual machine.

AutoBackupDaysOfWeek

Days of the week for the backups when FullBackupFrequency is set to Weekly.

AutoBackupSettings

Configure backups for databases in your SQL virtual machine.

AutoPatchingSettings

Set a patching window during which Windows and SQL patches will be applied.

BackupScheduleType

Backup schedule type.

ConnectivityType

SQL Server connectivity option.

createdByType

The type of identity that created the resource.

DayOfWeek

Day of week to apply the patch on.

DiskConfigurationType

Disk configuration to apply to SQL Server.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

FullBackupFrequencyType

Frequency of full backups. In both cases, full backups begin during the next scheduled time window.

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

KeyVaultCredentialSettings

Configure your SQL virtual machine to be able to connect to the Azure Key Vault service.

LeastPrivilegeMode

SQL IaaS Agent least privilege mode.

OsType

Operating System of the current SQL Virtual Machine.

ResourceIdentity

Azure Active Directory identity configuration for a resource.

Schedule

Set assessment schedule for SQL Server.

ServerConfigurationsManagementSettings

Set the connectivity, storage and workload settings.

SqlConnectivityUpdateSettings

Set the access level and network port settings for SQL Server.

SqlImageSku

SQL Server edition type.

SQLInstanceSettings

Set the server/instance-level settings for SQL Server.

SqlManagementMode

SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.

SqlServerLicenseType

SQL Server license type.

SQLStorageSettings

Set disk storage settings for SQL Server.

SqlStorageUpdateSettings

Set disk storage settings for SQL Server.

SQLTempDbSettings

Set tempDb storage settings for SQL Server.

SqlVirtualMachine

A SQL virtual machine.

SqlVirtualMachineUpdate

An update to a SQL virtual machine.

SqlWorkloadType

SQL Server workload type.

SqlWorkloadTypeUpdateSettings

Set workload type to optimize storage for SQL Server.

StorageConfigurationSettings

Storage Configurations for SQL Data, Log and TempDb.

StorageWorkloadType

Storage workload type.

systemData

Metadata pertaining to creation and last modification of the resource.

TroubleshootingAdditionalProperties

SQL VM Troubleshooting additional properties.

TroubleshootingScenario

SQL VM troubleshooting scenario.

TroubleshootingStatus

Status of last troubleshooting operation on this SQL VM

UnhealthyReplicaInfo

SQL VM Troubleshoot UnhealthyReplica scenario information.

VirtualMachineIdentity

Virtual Machine Identity details used for Sql IaaS extension configurations.

VmIdentityType

Identity type of the virtual machine. Specify None to opt-out of Managed Identities.

WsfcDomainCredentials

Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.

AADAuthenticationSettings

Enable AAD authentication for SQL VM.

Name Type Description
clientId

string

The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be used for the system assigned Managed Identity

AdditionalFeaturesServerConfigurations

Additional SQL Server feature settings.

Name Type Description
isRServicesEnabled

boolean

Enable or disable R services (SQL 2016 onwards).

AdditionalOsPatch

Additional VM Patching solution enabled on the Virtual Machine

Name Type Description
WSUS

string

WU

string

WUMU

string

AdditionalVmPatch

Additional Patch to be enable or enabled on the SQL Virtual Machine.

Name Type Description
MicrosoftUpdate

string

NotSet

string

AssessmentDayOfWeek

Day of the week to run assessment.

Name Type Description
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

AssessmentSettings

Configure SQL best practices Assessment for databases in your SQL virtual machine.

Name Type Description
enable

boolean

Enable or disable SQL best practices Assessment feature on SQL virtual machine.

runImmediately

boolean

Run SQL best practices Assessment immediately on SQL virtual machine.

schedule

Schedule

Schedule for SQL best practices Assessment.

AutoBackupDaysOfWeek

Days of the week for the backups when FullBackupFrequency is set to Weekly.

Name Type Description
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

AutoBackupSettings

Configure backups for databases in your SQL virtual machine.

Name Type Description
backupScheduleType

BackupScheduleType

Backup schedule type.

backupSystemDbs

boolean

Include or exclude system databases from auto backup.

daysOfWeek

AutoBackupDaysOfWeek[]

Days of the week for the backups when FullBackupFrequency is set to Weekly.

enable

boolean

Enable or disable autobackup on SQL virtual machine.

enableEncryption

boolean

Enable or disable encryption for backup on SQL virtual machine.

fullBackupFrequency

FullBackupFrequencyType

Frequency of full backups. In both cases, full backups begin during the next scheduled time window.

fullBackupStartTime

integer

Start time of a given day during which full backups can take place. 0-23 hours.

fullBackupWindowHours

integer

Duration of the time window of a given day during which full backups can take place. 1-23 hours.

logBackupFrequency

integer

Frequency of log backups. 5-60 minutes.

password

string

Password for encryption on backup.

retentionPeriod

integer

Retention period of backup: 1-90 days.

storageAccessKey

string

Storage account key where backup will be taken to.

storageAccountUrl

string

Storage account url where backup will be taken to.

storageContainerName

string

Storage container name where backup will be taken to.

AutoPatchingSettings

Set a patching window during which Windows and SQL patches will be applied.

Name Type Default Value Description
additionalVmPatch

AdditionalVmPatch

NotSet

Additional Patch to be enable or enabled on the SQL Virtual Machine.

dayOfWeek

DayOfWeek

Day of week to apply the patch on.

enable

boolean

Enable or disable autopatching on SQL virtual machine.

maintenanceWindowDuration

integer

Duration of patching.

maintenanceWindowStartingHour

integer

Hour of the day when patching is initiated. Local VM time.

BackupScheduleType

Backup schedule type.

Name Type Description
Automated

string

Manual

string

ConnectivityType

SQL Server connectivity option.

Name Type Description
LOCAL

string

PRIVATE

string

PUBLIC

string

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DayOfWeek

Day of week to apply the patch on.

Name Type Description
Everyday

string

Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

DiskConfigurationType

Disk configuration to apply to SQL Server.

Name Type Description
ADD

string

EXTEND

string

NEW

string

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.

FullBackupFrequencyType

Frequency of full backups. In both cases, full backups begin during the next scheduled time window.

Name Type Description
Daily

string

Weekly

string

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

Name Type Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

KeyVaultCredentialSettings

Configure your SQL virtual machine to be able to connect to the Azure Key Vault service.

Name Type Description
azureKeyVaultUrl

string

Azure Key Vault url.

credentialName

string

Credential name.

enable

boolean

Enable or disable key vault credential setting.

servicePrincipalName

string

Service principal name to access key vault.

servicePrincipalSecret

string

Service principal name secret to access key vault.

LeastPrivilegeMode

SQL IaaS Agent least privilege mode.

Name Type Description
Enabled

string

NotSet

string

OsType

Operating System of the current SQL Virtual Machine.

Name Type Description
Linux

string

Windows

string

ResourceIdentity

Azure Active Directory identity configuration for a resource.

Name Type Description
principalId

string

The Azure Active Directory principal id.

tenantId

string

The Azure Active Directory tenant id.

type

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

Schedule

Set assessment schedule for SQL Server.

Name Type Description
dayOfWeek

AssessmentDayOfWeek

Day of the week to run assessment.

enable

boolean

Enable or disable assessment schedule on SQL virtual machine.

monthlyOccurrence

integer

Occurrence of the DayOfWeek day within a month to schedule assessment. Takes values: 1,2,3,4 and -1. Use -1 for last DayOfWeek day of the month

startTime

string

Time of the day in HH:mm format. Eg. 17:30

weeklyInterval

integer

Number of weeks to schedule between 2 assessment runs. Takes value from 1-6

ServerConfigurationsManagementSettings

Set the connectivity, storage and workload settings.

Name Type Description
additionalFeaturesServerConfigurations

AdditionalFeaturesServerConfigurations

Additional SQL feature settings.

azureAdAuthenticationSettings

AADAuthenticationSettings

Azure AD authentication Settings.

sqlConnectivityUpdateSettings

SqlConnectivityUpdateSettings

SQL connectivity type settings.

sqlInstanceSettings

SQLInstanceSettings

SQL Instance settings.

sqlStorageUpdateSettings

SqlStorageUpdateSettings

SQL storage update settings.

sqlWorkloadTypeUpdateSettings

SqlWorkloadTypeUpdateSettings

SQL workload type settings.

SqlConnectivityUpdateSettings

Set the access level and network port settings for SQL Server.

Name Type Description
connectivityType

ConnectivityType

SQL Server connectivity option.

port

integer

SQL Server port.

sqlAuthUpdatePassword

string

SQL Server sysadmin login password.

sqlAuthUpdateUserName

string

SQL Server sysadmin login to create.

SqlImageSku

SQL Server edition type.

Name Type Description
Developer

string

Enterprise

string

Express

string

Standard

string

Web

string

SQLInstanceSettings

Set the server/instance-level settings for SQL Server.

Name Type Description
collation

string

SQL Server Collation.

isIfiEnabled

boolean

SQL Server IFI.

isLpimEnabled

boolean

SQL Server LPIM.

isOptimizeForAdHocWorkloadsEnabled

boolean

SQL Server Optimize for Adhoc workloads.

maxDop

integer

SQL Server MAXDOP.

maxServerMemoryMB

integer

SQL Server maximum memory.

minServerMemoryMB

integer

SQL Server minimum memory.

SqlManagementMode

SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.

Name Type Description
Full

string

LightWeight

string

NoAgent

string

SqlServerLicenseType

SQL Server license type.

Name Type Description
AHUB

string

DR

string

PAYG

string

SQLStorageSettings

Set disk storage settings for SQL Server.

Name Type Description
defaultFilePath

string

SQL Server default file path

luns

integer[]

Logical Unit Numbers for the disks.

useStoragePool

boolean

Use storage pool to build a drive if true or not provided

SqlStorageUpdateSettings

Set disk storage settings for SQL Server.

Name Type Description
diskConfigurationType

DiskConfigurationType

Disk configuration to apply to SQL Server.

diskCount

integer

Virtual machine disk count.

startingDeviceId

integer

Device id of the first disk to be updated.

SQLTempDbSettings

Set tempDb storage settings for SQL Server.

Name Type Description
dataFileCount

integer

SQL Server tempdb data file count

dataFileSize

integer

SQL Server tempdb data file size

dataGrowth

integer

SQL Server tempdb data file autoGrowth size

defaultFilePath

string

SQL Server default file path

logFileSize

integer

SQL Server tempdb log file size

logGrowth

integer

SQL Server tempdb log file autoGrowth size

luns

integer[]

Logical Unit Numbers for the disks.

persistFolder

boolean

SQL Server tempdb persist folder choice

persistFolderPath

string

SQL Server tempdb persist folder location

useStoragePool

boolean

Use storage pool to build a drive if true or not provided

SqlVirtualMachine

A SQL virtual machine.

Name Type Default Value Description
id

string

Resource ID.

identity

ResourceIdentity

DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server.

location

string

Resource location.

name

string

Resource name.

properties.additionalVmPatch

AdditionalOsPatch

Additional VM Patching solution enabled on the Virtual Machine

properties.assessmentSettings

AssessmentSettings

SQL best practices Assessment Settings.

properties.autoBackupSettings

AutoBackupSettings

Auto backup settings for SQL Server.

properties.autoPatchingSettings

AutoPatchingSettings

Auto patching settings for applying critical security updates to SQL virtual machine.

properties.enableAutomaticUpgrade

boolean

False

Enable automatic upgrade of Sql IaaS extension Agent.

properties.keyVaultCredentialSettings

KeyVaultCredentialSettings

Key vault credential settings.

properties.leastPrivilegeMode

LeastPrivilegeMode

NotSet

SQL IaaS Agent least privilege mode.

properties.osType

OsType

Operating System of the current SQL Virtual Machine.

properties.provisioningState

string

Provisioning state to track the async operation status.

properties.serverConfigurationsManagementSettings

ServerConfigurationsManagementSettings

SQL Server configuration management settings.

properties.sqlImageOffer

string

SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.

properties.sqlImageSku

SqlImageSku

SQL Server edition type.

properties.sqlManagement

SqlManagementMode

SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.

properties.sqlServerLicenseType

SqlServerLicenseType

SQL Server license type.

properties.sqlVirtualMachineGroupResourceId

string

ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.

properties.storageConfigurationSettings

StorageConfigurationSettings

Storage Configuration Settings.

properties.troubleshootingStatus

TroubleshootingStatus

Troubleshooting status

properties.virtualMachineIdentitySettings

VirtualMachineIdentity

Virtual Machine Identity details used for Sql IaaS extension configurations.

properties.virtualMachineResourceId

string

ARM Resource id of underlying virtual machine created from SQL marketplace image.

properties.wsfcDomainCredentials

WsfcDomainCredentials

Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.

properties.wsfcStaticIp

string

Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

tags

object

Resource tags.

type

string

Resource type.

SqlVirtualMachineUpdate

An update to a SQL virtual machine.

Name Type Description
tags

object

Resource tags.

SqlWorkloadType

SQL Server workload type.

Name Type Description
DW

string

GENERAL

string

OLTP

string

SqlWorkloadTypeUpdateSettings

Set workload type to optimize storage for SQL Server.

Name Type Description
sqlWorkloadType

SqlWorkloadType

SQL Server workload type.

StorageConfigurationSettings

Storage Configurations for SQL Data, Log and TempDb.

Name Type Default Value Description
diskConfigurationType

DiskConfigurationType

Disk configuration to apply to SQL Server.

enableStorageConfigBlade

boolean

False

Enable SQL IaaS Agent storage configuration blade in Azure Portal.

sqlDataSettings

SQLStorageSettings

SQL Server Data Storage Settings.

sqlLogSettings

SQLStorageSettings

SQL Server Log Storage Settings.

sqlSystemDbOnDataDisk

boolean

SQL Server SystemDb Storage on DataPool if true.

sqlTempDbSettings

SQLTempDbSettings

SQL Server TempDb Storage Settings.

storageWorkloadType

StorageWorkloadType

Storage workload type.

StorageWorkloadType

Storage workload type.

Name Type Description
DW

string

GENERAL

string

OLTP

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TroubleshootingAdditionalProperties

SQL VM Troubleshooting additional properties.

Name Type Description
unhealthyReplicaInfo

UnhealthyReplicaInfo

The unhealthy replica information

TroubleshootingScenario

SQL VM troubleshooting scenario.

Name Type Description
UnhealthyReplica

string

TroubleshootingStatus

Status of last troubleshooting operation on this SQL VM

Name Type Default Value Description
endTimeUtc

string

End time in UTC timezone.

lastTriggerTimeUtc

string

Last troubleshooting trigger time in UTC timezone

properties

TroubleshootingAdditionalProperties

Troubleshooting properties

rootCause

string

Root cause of the issue

startTimeUtc

string

Start time in UTC timezone.

troubleshootingScenario

TroubleshootingScenario

UnhealthyReplica

SQL VM troubleshooting scenario.

UnhealthyReplicaInfo

SQL VM Troubleshoot UnhealthyReplica scenario information.

Name Type Description
availabilityGroupName

string

The name of the availability group

VirtualMachineIdentity

Virtual Machine Identity details used for Sql IaaS extension configurations.

Name Type Description
resourceId

string

ARM Resource Id of the identity. Only required when UserAssigned identity is selected.

type

VmIdentityType

Identity type of the virtual machine. Specify None to opt-out of Managed Identities.

VmIdentityType

Identity type of the virtual machine. Specify None to opt-out of Managed Identities.

Name Type Description
None

string

SystemAssigned

string

UserAssigned

string

WsfcDomainCredentials

Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.

Name Type Description
clusterBootstrapAccountPassword

string

Cluster bootstrap account password.

clusterOperatorAccountPassword

string

Cluster operator account password.

sqlServiceAccountPassword

string

SQL service account password.