Skip to main content

job_credentials

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

Overview

Namejob_credentials
TypeResource
Idazure.sql.job_credentials

Fields

NameDatatypeDescription
credentialNametextfield from the properties object
jobAgentNametextfield from the properties object
passwordtextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object
usernametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcredentialName, jobAgentName, resourceGroupName, serverName, subscriptionIdGets a jobs credential.
list_by_agentSELECTjobAgentName, resourceGroupName, serverName, subscriptionIdGets a list of jobs credentials.
create_or_updateINSERTcredentialName, jobAgentName, resourceGroupName, serverName, subscriptionIdCreates or updates a job credential.
deleteDELETEcredentialName, jobAgentName, resourceGroupName, serverName, subscriptionIdDeletes a job credential.

SELECT examples

Gets a list of jobs credentials.

SELECT
credentialName,
jobAgentName,
password,
resourceGroupName,
serverName,
subscriptionId,
username
FROM azure.sql.vw_job_credentials
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_credentials resource.

/*+ create */
INSERT INTO azure.sql.job_credentials (
credentialName,
jobAgentName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ credentialName }}',
'{{ jobAgentName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified job_credentials resource.

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