Skip to main content

job_agents

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

Overview

Namejob_agents
TypeResource
Idazure.sql.job_agents

Fields

NameDatatypeDescription
database_idtextfield from the properties object
jobAgentNametextfield from the properties object
locationtextResource location.
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
skutextAn ARM Resource SKU.
statetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTjobAgentName, resourceGroupName, serverName, subscriptionIdGets a job agent.
list_by_serverSELECTresourceGroupName, serverName, subscriptionIdGets a list of job agents in a server.
create_or_updateINSERTjobAgentName, resourceGroupName, serverName, subscriptionId, data__locationCreates or updates a job agent.
deleteDELETEjobAgentName, resourceGroupName, serverName, subscriptionIdDeletes a job agent.
updateUPDATEjobAgentName, resourceGroupName, serverName, subscriptionIdUpdates a job agent.

SELECT examples

Gets a list of job agents in a server.

SELECT
database_id,
jobAgentName,
location,
resourceGroupName,
serverName,
sku,
state,
subscriptionId,
tags
FROM azure.sql.vw_job_agents
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.job_agents (
jobAgentName,
resourceGroupName,
serverName,
subscriptionId,
data__location,
location,
tags,
sku,
properties
)
SELECT
'{{ jobAgentName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ location }}',
'{{ tags }}',
'{{ sku }}',
'{{ properties }}'
;

UPDATE example

Updates a job_agents resource.

/*+ update */
UPDATE azure.sql.job_agents
SET
tags = '{{ tags }}'
WHERE
jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified job_agents resource.

/*+ delete */
DELETE FROM azure.sql.job_agents
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';