Skip to main content

automation_account

Creates, updates, deletes, gets or lists an automation_account resource.

Overview

Nameautomation_account
TypeResource
Idazure.automation.automation_account

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
automationHybridServiceUrlstringURL of automation hybrid service which is used for hybrid worker on-boarding.
creationTimestring (date-time)Gets the creation time.
descriptionstringGets or sets the description.
disableLocalAuthbooleanIndicates whether requests using non-AAD authentication are blocked.
encryptionobjectEncryption properties for the automation account.
etagstringGets or sets the etag of the resource.
identityobjectIdentity for the resource.
lastModifiedBystringGets or sets the last modified by.
lastModifiedTimestring (date-time)Gets the last modified time.
locationstringThe geo-location where the resource lives. Required.
privateEndpointConnectionsarrayList of Automation operations supported by the Automation resource provider.
publicNetworkAccessbooleanIndicates whether traffic on the non-ARM endpoint (Webhook/Agent) is allowed from the public internet.
skuobjectGets or sets the SKU of account.
statestringGets status of account. Known values are: "Ok", "Unavailable", and "Suspended". (Ok, Unavailable, Suspended)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, automation_account_name, subscription_idGet information about an Automation Account.
list_by_resource_groupselectresource_group_name, subscription_idRetrieve a list of accounts within a given resource group.
listselectsubscription_idLists the Automation Accounts within an Azure subscription. Retrieve a list of accounts within a given subscription.
create_or_updateinsertresource_group_name, automation_account_name, subscription_idCreate or update automation account.
updateupdateresource_group_name, automation_account_name, subscription_idUpdate an automation account.
create_or_updatereplaceresource_group_name, automation_account_name, subscription_idCreate or update automation account.
deletedeleteresource_group_name, automation_account_name, subscription_idDelete an automation account.
list_deleted_runbooksexecresource_group_name, automation_account_name, subscription_idRetrieve the deleted runbooks for an automation account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
automation_account_namestringThe name of the automation account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get information about an Automation Account.

SELECT
id,
name,
automationHybridServiceUrl,
creationTime,
description,
disableLocalAuth,
encryption,
etag,
identity,
lastModifiedBy,
lastModifiedTime,
location,
privateEndpointConnections,
publicNetworkAccess,
sku,
state,
systemData,
tags,
type
FROM azure.automation.automation_account
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update automation account.

INSERT INTO azure.automation.automation_account (
properties,
name,
location,
identity,
tags,
resource_group_name,
automation_account_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ name }}',
'{{ location }}',
'{{ identity }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ automation_account_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update an automation account.

UPDATE azure.automation.automation_account
SET
properties = '{{ properties }}',
name = '{{ name }}',
location = '{{ location }}',
identity = '{{ identity }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update automation account.

REPLACE azure.automation.automation_account
SET
properties = '{{ properties }}',
name = '{{ name }}',
location = '{{ location }}',
identity = '{{ identity }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete an automation account.

DELETE FROM azure.automation.automation_account
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Retrieve the deleted runbooks for an automation account.

EXEC azure.automation.automation_account.list_deleted_runbooks 
@resource_group_name='{{ resource_group_name }}' --required,
@automation_account_name='{{ automation_account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;