Skip to main content

workload_classifiers

Creates, updates, deletes, gets or lists a workload_classifiers resource.

Overview

Nameworkload_classifiers
TypeResource
Idazure.sql.workload_classifiers

Fields

NameDatatypeDescription
contexttextfield from the properties object
databaseNametextfield from the properties object
end_timetextfield from the properties object
importancetextfield from the properties object
labeltextfield from the properties object
member_nametextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
start_timetextfield from the properties object
subscriptionIdtextfield from the properties object
workloadClassifierNametextfield from the properties object
workloadGroupNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, resourceGroupName, serverName, subscriptionId, workloadClassifierName, workloadGroupNameGets a workload classifier
list_by_workload_groupSELECTdatabaseName, resourceGroupName, serverName, subscriptionId, workloadGroupNameGets the list of workload classifiers for a workload group
create_or_updateINSERTdatabaseName, resourceGroupName, serverName, subscriptionId, workloadClassifierName, workloadGroupNameCreates or updates a workload classifier.
deleteDELETEdatabaseName, resourceGroupName, serverName, subscriptionId, workloadClassifierName, workloadGroupNameDeletes a workload classifier.

SELECT examples

Gets the list of workload classifiers for a workload group

SELECT
context,
databaseName,
end_time,
importance,
label,
member_name,
resourceGroupName,
serverName,
start_time,
subscriptionId,
workloadClassifierName,
workloadGroupName
FROM azure.sql.vw_workload_classifiers
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workloadGroupName = '{{ workloadGroupName }}';

INSERT example

Use the following StackQL query and manifest file to create a new workload_classifiers resource.

/*+ create */
INSERT INTO azure.sql.workload_classifiers (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
workloadClassifierName,
workloadGroupName,
properties
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ workloadClassifierName }}',
'{{ workloadGroupName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified workload_classifiers resource.

/*+ delete */
DELETE FROM azure.sql.workload_classifiers
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workloadClassifierName = '{{ workloadClassifierName }}'
AND workloadGroupName = '{{ workloadGroupName }}';