workload_classifiers
Creates, updates, deletes, gets or lists a workload_classifiers
resource.
Overview
Name | workload_classifiers |
Type | Resource |
Id | azure.sql.workload_classifiers |
Fields
- vw_workload_classifiers
- workload_classifiers
Name | Datatype | Description |
---|---|---|
context | text | field from the properties object |
databaseName | text | field from the properties object |
end_time | text | field from the properties object |
importance | text | field from the properties object |
label | text | field from the properties object |
member_name | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
start_time | text | field from the properties object |
subscriptionId | text | field from the properties object |
workloadClassifierName | text | field from the properties object |
workloadGroupName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV). |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, resourceGroupName, serverName, subscriptionId, workloadClassifierName, workloadGroupName | Gets a workload classifier |
list_by_workload_group | SELECT | databaseName, resourceGroupName, serverName, subscriptionId, workloadGroupName | Gets the list of workload classifiers for a workload group |
create_or_update | INSERT | databaseName, resourceGroupName, serverName, subscriptionId, workloadClassifierName, workloadGroupName | Creates or updates a workload classifier. |
delete | DELETE | databaseName, resourceGroupName, serverName, subscriptionId, workloadClassifierName, workloadGroupName | Deletes a workload classifier. |
SELECT
examples
Gets the list of workload classifiers for a workload group
- vw_workload_classifiers
- workload_classifiers
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 }}';
SELECT
properties
FROM azure.sql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.workload_classifiers (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
workloadClassifierName,
workloadGroupName,
properties
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ workloadClassifierName }}',
'{{ workloadGroupName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: memberName
value: string
- name: label
value: string
- name: context
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: importance
value: string
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 }}';