Skip to main content

dsc_configuration

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

Overview

Namedsc_configuration
TypeResource
Idazure.automation.dsc_configuration

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.
creationTimestring (date-time)Gets or sets the creation time.
descriptionstringGets or sets the description.
etagstringGets or sets the etag of the resource.
jobCountintegerGets or sets the job count of the configuration.
lastModifiedTimestring (date-time)Gets or sets the last modified time.
locationstringThe geo-location where the resource lives. Required.
logVerbosebooleanGets or sets verbose log option.
nodeConfigurationCountintegerGets the number of compiled node configurations.
parametersobjectGets or sets the configuration parameters.
provisioningStatestringGets or sets the provisioning state of the configuration. Default value is "Succeeded".
sourceobjectGets or sets the source.
statestringGets or sets the state of the configuration. Known values are: "New", "Edit", and "Published". (New, Edit, Published)
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, configuration_name, subscription_idRetrieve the configuration identified by configuration name.
list_by_automation_accountselectresource_group_name, automation_account_name, subscription_id$filter, $skip, $top, $inlinecountRetrieve a list of configurations.
create_or_updateinsertresource_group_name, automation_account_name, configuration_name, subscription_id, propertiesCreate the configuration identified by configuration name.
updateupdateresource_group_name, automation_account_name, configuration_name, subscription_idCreate the configuration identified by configuration name.
create_or_updatereplaceresource_group_name, automation_account_name, configuration_name, subscription_id, propertiesCreate the configuration identified by configuration name.
deletedeleteresource_group_name, automation_account_name, configuration_name, subscription_idDelete the dsc configuration identified by configuration name.
get_contentexecresource_group_name, automation_account_name, configuration_name, subscription_idRetrieve the configuration script identified by configuration name.

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.
configuration_namestringThe configuration name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringThe filter to apply on the operation. Default value is None.
$inlinecountstringReturn total rows. Default value is None.
$skipintegerThe number of rows to skip. Default value is None.
$topintegerThe number of rows to take. Default value is None.

SELECT examples

Retrieve the configuration identified by configuration name.

SELECT
id,
name,
creationTime,
description,
etag,
jobCount,
lastModifiedTime,
location,
logVerbose,
nodeConfigurationCount,
parameters,
provisioningState,
source,
state,
systemData,
tags,
type
FROM azure.automation.dsc_configuration
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND configuration_name = '{{ configuration_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create the configuration identified by configuration name.

INSERT INTO azure.automation.dsc_configuration (
properties,
name,
location,
tags,
resource_group_name,
automation_account_name,
configuration_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ name }}',
'{{ location }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ automation_account_name }}',
'{{ configuration_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Create the configuration identified by configuration name.

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

REPLACE examples

Create the configuration identified by configuration name.

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

DELETE examples

Delete the dsc configuration identified by configuration name.

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

Lifecycle Methods

Retrieve the configuration script identified by configuration name.

EXEC azure.automation.dsc_configuration.get_content 
@resource_group_name='{{ resource_group_name }}' --required,
@automation_account_name='{{ automation_account_name }}' --required,
@configuration_name='{{ configuration_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;