Skip to main content

credentials

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

Overview

Namecredentials
TypeResource
Idazure.automation.credentials

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
automationAccountNametextfield from the properties object
creation_timetextfield from the properties object
credentialNametextfield from the properties object
last_modified_timetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
user_nametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTautomationAccountName, credentialName, resourceGroupName, subscriptionIdRetrieve the credential identified by credential name.
list_by_automation_accountSELECTautomationAccountName, resourceGroupName, subscriptionIdRetrieve a list of credentials.
create_or_updateINSERTautomationAccountName, credentialName, resourceGroupName, subscriptionId, data__name, data__propertiesCreate a credential.
deleteDELETEautomationAccountName, credentialName, resourceGroupName, subscriptionIdDelete the credential.
updateUPDATEautomationAccountName, credentialName, resourceGroupName, subscriptionIdUpdate a credential.

SELECT examples

Retrieve a list of credentials.

SELECT
description,
automationAccountName,
creation_time,
credentialName,
last_modified_time,
resourceGroupName,
subscriptionId,
user_name
FROM azure.automation.vw_credentials
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.automation.credentials (
automationAccountName,
credentialName,
resourceGroupName,
subscriptionId,
data__name,
data__properties,
name,
properties
)
SELECT
'{{ automationAccountName }}',
'{{ credentialName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__name }}',
'{{ data__properties }}',
'{{ name }}',
'{{ properties }}'
;

UPDATE example

Updates a credentials resource.

/*+ update */
UPDATE azure.automation.credentials
SET
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
automationAccountName = '{{ automationAccountName }}'
AND credentialName = '{{ credentialName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified credentials resource.

/*+ delete */
DELETE FROM azure.automation.credentials
WHERE automationAccountName = '{{ automationAccountName }}'
AND credentialName = '{{ credentialName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';