Skip to main content

agents

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

Overview

Nameagents
TypeResource
Idazure.sql.agents

Fields

NameDatatypeDescription
managedInstanceNametextfield from the properties object
resourceGroupNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTmanagedInstanceName, resourceGroupName, subscriptionIdGets current instance sql agent configuration.
create_or_updateINSERTmanagedInstanceName, resourceGroupName, subscriptionIdPuts new sql agent configuration to instance.

SELECT examples

Gets current instance sql agent configuration.

SELECT
managedInstanceName,
resourceGroupName,
state,
subscriptionId
FROM azure.sql.vw_agents
WHERE managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.agents (
managedInstanceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;