Dsc Node Configuration - Create Or Update

Create the node configuration identified by node configuration name.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}?api-version=2018-01-15

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

automationAccountName
path True
  • string

The name of the automation account.

nodeConfigurationName
path True
  • string

The Dsc node configuration name.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
name
  • string

Name of the node configuration.

properties.configuration True

Gets or sets the configuration of the node.

properties.incrementNodeConfigurationBuild
  • boolean

If a new build version of NodeConfiguration is required.

properties.source True

Gets or sets the source.

tags
  • object

Gets or sets the tags attached to the resource.

Responses

Name Type Description
200 OK

OK

201 Created

Created

Other Status Codes

Automation error response describing why the operation failed.

Examples

Create node configuration

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/nodeConfigurations/configName.nodeConfigName?api-version=2018-01-15
{
  "name": "configName.nodeConfigName",
  "properties": {
    "source": {
      "hash": {
        "algorithm": "sha256",
        "value": "6DE256A57F01BFA29B88696D5E77A383D6E61484C7686E8DB955FA10ACE9FFE5"
      },
      "type": "embeddedContent",
      "value": "\r\ninstance of MSFT_RoleResource as $MSFT_RoleResource1ref\r\n{\r\nResourceID = \"[WindowsFeature]IIS\";\r\n Ensure = \"Present\";\r\n SourceInfo = \"::3::32::WindowsFeature\";\r\n Name = \"Web-Server\";\r\n ModuleName = \"PsDesiredStateConfiguration\";\r\n\r\nModuleVersion = \"1.0\";\r\r\n ConfigurationName = \"configName\";\r\r\n};\r\ninstance of OMI_ConfigurationDocument\r\n\r\r\n                    {\r\n Version=\"2.0.0\";\r\n \r\r\n                        MinimumCompatibleVersion = \"1.0.0\";\r\n \r\r\n                        CompatibleVersionAdditionalProperties= {\"Omi_BaseResource:ConfigurationName\"};\r\n \r\r\n                        Author=\"weijiel\";\r\n \r\r\n                        GenerationDate=\"03/30/2017 13:40:25\";\r\n \r\r\n                        GenerationHost=\"TEST-BACKEND\";\r\n \r\r\n                        Name=\"configName\";\r\n\r\r\n                    };\r\n",
      "version": "1.0"
    },
    "incrementNodeConfigurationBuild": true,
    "configuration": {
      "name": "configName"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount20/nodeConfigurations/configName.nodeConfigName",
  "name": "configName.nodeConfigName",
  "type": "Microsoft.Automation/AutomationAccounts/nodeConfigurations",
  "properties": {
    "lastModifiedTime": "2018-03-25T01:29:17.1205764+00:00",
    "creationTime": "2018-03-25T01:29:17.1205764+00:00",
    "configuration": {
      "name": "configName"
    },
    "source": null,
    "nodeCount": 0,
    "incrementNodeConfigurationBuild": false
  }
}

Definitions

ContentHash

Definition of the runbook property type.

ContentSource

Definition of the content source.

ContentSourceType

Gets or sets the content source type.

DscConfigurationAssociationProperty

The Dsc configuration property associated with the entity.

DscNodeConfiguration

Definition of the dsc node configuration.

DscNodeConfigurationCreateOrUpdateParameters

The parameters supplied to the create or update node configuration operation.

ErrorResponse

Error response of an operation failure

ContentHash

Definition of the runbook property type.

Name Type Description
algorithm
  • string

Gets or sets the content hash algorithm used to hash the content.

value
  • string

Gets or sets expected hash value of the content.

ContentSource

Definition of the content source.

Name Type Description
hash

Gets or sets the hash.

type

Gets or sets the content source type.

value
  • string

Gets or sets the value of the content. This is based on the content source type.

version
  • string

Gets or sets the version of the content.

ContentSourceType

Gets or sets the content source type.

Name Type Description
embeddedContent
  • string
uri
  • string

DscConfigurationAssociationProperty

The Dsc configuration property associated with the entity.

Name Type Description
name
  • string

Gets or sets the name of the Dsc configuration.

DscNodeConfiguration

Definition of the dsc node configuration.

Name Type Description
id
  • string

Fully qualified resource Id for the resource

name
  • string

The name of the resource

properties.configuration

Gets or sets the configuration of the node.

properties.creationTime
  • string

Gets or sets creation time.

properties.incrementNodeConfigurationBuild
  • boolean

If a new build version of NodeConfiguration is required.

properties.lastModifiedTime
  • string

Gets or sets the last modified time.

properties.nodeCount
  • integer

Number of nodes with this nodeconfiguration assigned

properties.source
  • string

Source of node configuration.

type
  • string

The type of the resource.

DscNodeConfigurationCreateOrUpdateParameters

The parameters supplied to the create or update node configuration operation.

Name Type Description
name
  • string

Name of the node configuration.

properties.configuration

Gets or sets the configuration of the node.

properties.incrementNodeConfigurationBuild
  • boolean

If a new build version of NodeConfiguration is required.

properties.source

Gets or sets the source.

tags
  • object

Gets or sets the tags attached to the resource.

ErrorResponse

Error response of an operation failure

Name Type Description
code
  • string

Error code

message
  • string

Error message indicating why the operation failed.