Skip to main content

job_target_groups

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

Overview

Namejob_target_groups
TypeResource
Idazure.sql.job_target_groups

Fields

The following fields are returned by SELECT queries:

Successfully retrieved the target group.

NameDatatypeDescription
propertiesobjectResource properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serverName, jobAgentName, targetGroupName, subscriptionIdGets a target group.
list_by_agentselectresourceGroupName, serverName, jobAgentName, subscriptionIdGets all target groups in an agent.
create_or_updateinsertresourceGroupName, serverName, jobAgentName, targetGroupName, subscriptionIdCreates or updates a target group.
deletedeleteresourceGroupName, serverName, jobAgentName, targetGroupName, subscriptionIdDeletes a target group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
jobAgentNamestringThe name of the job agent.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverNamestringThe name of the server.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.
targetGroupNamestringThe name of the target group.

SELECT examples

Gets a target group.

SELECT
properties
FROM azure.sql.job_target_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND jobAgentName = '{{ jobAgentName }}' -- required
AND targetGroupName = '{{ targetGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or updates a target group.

INSERT INTO azure.sql.job_target_groups (
data__properties,
resourceGroupName,
serverName,
jobAgentName,
targetGroupName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ jobAgentName }}',
'{{ targetGroupName }}',
'{{ subscriptionId }}'
RETURNING
properties
;

DELETE examples

Deletes a target group.

DELETE FROM azure.sql.job_target_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
AND jobAgentName = '{{ jobAgentName }}' --required
AND targetGroupName = '{{ targetGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;