job_target_groups
Creates, updates, deletes, gets or lists a job_target_groups
resource.
Overview
Name | job_target_groups |
Type | Resource |
Id | azure.sql.job_target_groups |
Fields
- vw_job_target_groups
- job_target_groups
Name | Datatype | Description |
---|---|---|
jobAgentName | text | field from the properties object |
members | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
targetGroupName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of job target group. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | jobAgentName, resourceGroupName, serverName, subscriptionId, targetGroupName | Gets a target group. |
list_by_agent | SELECT | jobAgentName, resourceGroupName, serverName, subscriptionId | Gets all target groups in an agent. |
create_or_update | INSERT | jobAgentName, resourceGroupName, serverName, subscriptionId, targetGroupName | Creates or updates a target group. |
delete | DELETE | jobAgentName, resourceGroupName, serverName, subscriptionId, targetGroupName | Deletes a target group. |
SELECT
examples
Gets all target groups in an agent.
- vw_job_target_groups
- job_target_groups
SELECT
jobAgentName,
members,
resourceGroupName,
serverName,
subscriptionId,
targetGroupName
FROM azure.sql.vw_job_target_groups
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.sql.job_target_groups
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new job_target_groups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.job_target_groups (
jobAgentName,
resourceGroupName,
serverName,
subscriptionId,
targetGroupName,
properties
)
SELECT
'{{ jobAgentName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ targetGroupName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: members
value:
- - name: membershipType
value: string
- name: type
value: string
- name: serverName
value: string
- name: databaseName
value: string
- name: elasticPoolName
value: string
- name: shardMapName
value: string
- name: refreshCredential
value: string
DELETE
example
Deletes the specified job_target_groups
resource.
/*+ delete */
DELETE FROM azure.sql.job_target_groups
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetGroupName = '{{ targetGroupName }}';