credentials
Creates, updates, deletes, gets or lists a credentials
resource.
Overview
Name | credentials |
Type | Resource |
Id | azure.automation.credentials |
Fields
- vw_credentials
- credentials
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
automationAccountName | text | field from the properties object |
creation_time | text | field from the properties object |
credentialName | text | field from the properties object |
last_modified_time | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
user_name | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Definition of the credential properties |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | automationAccountName, credentialName, resourceGroupName, subscriptionId | Retrieve the credential identified by credential name. |
list_by_automation_account | SELECT | automationAccountName, resourceGroupName, subscriptionId | Retrieve a list of credentials. |
create_or_update | INSERT | automationAccountName, credentialName, resourceGroupName, subscriptionId, data__name, data__properties | Create a credential. |
delete | DELETE | automationAccountName, credentialName, resourceGroupName, subscriptionId | Delete the credential. |
update | UPDATE | automationAccountName, credentialName, resourceGroupName, subscriptionId | Update a credential. |
SELECT
examples
Retrieve a list of credentials.
- vw_credentials
- 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 }}';
SELECT
properties
FROM azure.automation.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: properties
value:
- name: userName
value: string
- name: password
value: string
- name: description
value: string
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 }}';