sql_virtual_machines
Creates, updates, deletes, gets or lists a sql_virtual_machines
resource.
Overview
Name | sql_virtual_machines |
Type | Resource |
Id | azure.sql_vm.sql_virtual_machines |
Fields
Name | Datatype | Description |
---|---|---|
identity | object | Azure Active Directory identity configuration for a resource. |
location | string | Resource location. |
properties | object | The SQL virtual machine properties. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, sqlVirtualMachineName, subscriptionId | Gets a SQL virtual machine. |
list | SELECT | subscriptionId | Gets all SQL virtual machines in a subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Gets all SQL virtual machines in a resource group. |
list_by_sql_vm_group | SELECT | resourceGroupName, sqlVirtualMachineGroupName, subscriptionId | Gets the list of sql virtual machines in a SQL virtual machine group. |
create_or_update | INSERT | resourceGroupName, sqlVirtualMachineName, subscriptionId, data__location | Creates or updates a SQL virtual machine. |
delete | DELETE | resourceGroupName, sqlVirtualMachineName, subscriptionId | Deletes a SQL virtual machine. |
update | UPDATE | resourceGroupName, sqlVirtualMachineName, subscriptionId | Updates SQL virtual machine tags. |
fetch_dc_assessment | EXEC | resourceGroupName, sqlVirtualMachineName, subscriptionId | Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine |
redeploy | EXEC | resourceGroupName, sqlVirtualMachineName, subscriptionId | Uninstalls and reinstalls the SQL IaaS Extension. |
start_assessment | EXEC | resourceGroupName, sqlVirtualMachineName, subscriptionId | Starts SQL best practices Assessment on SQL virtual machine. |
SELECT
examples
Gets all SQL virtual machines in a subscription.
SELECT
identity,
location,
properties,
systemData,
tags
FROM azure.sql_vm.sql_virtual_machines
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sql_virtual_machines
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql_vm.sql_virtual_machines (
resourceGroupName,
sqlVirtualMachineName,
subscriptionId,
data__location,
location,
tags,
identity,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlVirtualMachineName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: location
value: string
- name: tags
value: object
- name: identity
value:
- name: principalId
value: string
- name: type
value: string
- name: tenantId
value: string
- name: properties
value:
- name: virtualMachineResourceId
value: string
- name: provisioningState
value: string
- name: sqlImageOffer
value: string
- name: sqlServerLicenseType
value: string
- name: sqlManagement
value: string
- name: leastPrivilegeMode
value: string
- name: sqlImageSku
value: string
- name: sqlVirtualMachineGroupResourceId
value: string
- name: wsfcDomainCredentials
value:
- name: clusterBootstrapAccountPassword
value: string
- name: clusterOperatorAccountPassword
value: string
- name: sqlServiceAccountPassword
value: string
- name: wsfcStaticIp
value: string
- name: autoPatchingSettings
value:
- name: enable
value: boolean
- name: dayOfWeek
value: string
- name: maintenanceWindowStartingHour
value: integer
- name: maintenanceWindowDuration
value: integer
- name: additionalVmPatch
value: string
- name: autoBackupSettings
value:
- name: enable
value: boolean
- name: enableEncryption
value: boolean
- name: retentionPeriod
value: integer
- name: storageAccountUrl
value: string
- name: storageContainerName
value: string
- name: storageAccessKey
value: string
- name: password
value: string
- name: backupSystemDbs
value: boolean
- name: backupScheduleType
value: string
- name: fullBackupFrequency
value: string
- name: daysOfWeek
value:
- string
- name: fullBackupStartTime
value: integer
- name: fullBackupWindowHours
value: integer
- name: logBackupFrequency
value: integer
- name: keyVaultCredentialSettings
value:
- name: enable
value: boolean
- name: credentialName
value: string
- name: azureKeyVaultUrl
value: string
- name: servicePrincipalName
value: string
- name: servicePrincipalSecret
value: string
- name: serverConfigurationsManagementSettings
value:
- name: sqlConnectivityUpdateSettings
value:
- name: connectivityType
value: string
- name: port
value: integer
- name: sqlAuthUpdateUserName
value: string
- name: sqlAuthUpdatePassword
value: string
- name: sqlWorkloadTypeUpdateSettings
value:
- name: sqlWorkloadType
value: string
- name: sqlStorageUpdateSettings
value:
- name: diskCount
value: integer
- name: startingDeviceId
value: integer
- name: diskConfigurationType
value: string
- name: additionalFeaturesServerConfigurations
value:
- name: isRServicesEnabled
value: boolean
- name: sqlInstanceSettings
value:
- name: collation
value: string
- name: maxDop
value: integer
- name: isOptimizeForAdHocWorkloadsEnabled
value: boolean
- name: minServerMemoryMB
value: integer
- name: maxServerMemoryMB
value: integer
- name: isLpimEnabled
value: boolean
- name: isIfiEnabled
value: boolean
- name: azureAdAuthenticationSettings
value:
- name: clientId
value: string
- name: storageConfigurationSettings
value:
- name: sqlDataSettings
value:
- name: luns
value:
- integer
- name: defaultFilePath
value: string
- name: useStoragePool
value: boolean
- name: sqlTempDbSettings
value:
- name: dataFileSize
value: integer
- name: dataGrowth
value: integer
- name: logFileSize
value: integer
- name: logGrowth
value: integer
- name: dataFileCount
value: integer
- name: persistFolder
value: boolean
- name: persistFolderPath
value: string
- name: luns
value:
- integer
- name: defaultFilePath
value: string
- name: useStoragePool
value: boolean
- name: sqlSystemDbOnDataDisk
value: boolean
- name: diskConfigurationType
value: string
- name: storageWorkloadType
value: string
- name: enableStorageConfigBlade
value: boolean
- name: troubleshootingStatus
value:
- name: rootCause
value: string
- name: lastTriggerTimeUtc
value: string
- name: startTimeUtc
value: string
- name: endTimeUtc
value: string
- name: troubleshootingScenario
value: string
- name: properties
value:
- name: unhealthyReplicaInfo
value:
- name: availabilityGroupName
value: string
- name: assessmentSettings
value:
- name: enable
value: boolean
- name: runImmediately
value: boolean
- name: schedule
value:
- name: enable
value: boolean
- name: weeklyInterval
value: integer
- name: monthlyOccurrence
value: integer
- name: dayOfWeek
value: string
- name: startTime
value: string
- name: enableAutomaticUpgrade
value: boolean
- name: additionalVmPatch
value: string
- name: virtualMachineIdentitySettings
value:
- name: type
value: string
- name: resourceId
value: string
- name: osType
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
UPDATE
example
Updates a sql_virtual_machines
resource.
/*+ update */
UPDATE azure.sql_vm.sql_virtual_machines
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineName = '{{ sqlVirtualMachineName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified sql_virtual_machines
resource.
/*+ delete */
DELETE FROM azure.sql_vm.sql_virtual_machines
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineName = '{{ sqlVirtualMachineName }}'
AND subscriptionId = '{{ subscriptionId }}';