Dsc Configuration - Create Or Update
Create the configuration identified by configuration name.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}?api-version=2023-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
configuration
|
path | True |
string |
The create or update parameters for configuration. |
resource
|
path | True |
string |
Name of an Azure Resource group. Regex pattern: |
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
Request Body
Media Types: "application/json", "text/plain; charset=utf-8"
Name | Required | Type | Description |
---|---|---|---|
properties.source | True |
Gets or sets the source. |
|
location |
string |
Gets or sets the location of the resource. |
|
name |
string |
Gets or sets name of the resource. |
|
properties.description |
string |
Gets or sets the description of the configuration. |
|
properties.logProgress |
boolean |
Gets or sets progress log option. |
|
properties.logVerbose |
boolean |
Gets or sets verbose log option. |
|
properties.parameters |
<string,
Dsc |
Gets or sets the configuration parameters. |
|
tags |
object |
Gets or sets the tags attached to the resource. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK Media Types: "application/json", "text/plain; charset=utf-8" |
|
201 Created |
Created Media Types: "application/json", "text/plain; charset=utf-8" |
|
Other Status Codes |
Automation error response describing why the operation failed. Media Types: "application/json", "text/plain; charset=utf-8" |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create or Update Configuration
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount18/configurations/SetupServer?api-version=2023-11-01
{
"properties": {
"source": {
"hash": {
"algorithm": "sha256",
"value": "A9E5DB56BA21513F61E0B3868816FDC6D4DF5131F5617D7FF0D769674BD5072F"
},
"type": "embeddedContent",
"value": "Configuration SetupServer {\r\n Node localhost {\r\n WindowsFeature IIS {\r\n Name = \"Web-Server\";\r\n Ensure = \"Present\"\r\n }\r\n }\r\n}"
},
"description": "sample configuration"
},
"name": "SetupServer",
"location": "East US 2"
}
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer",
"name": "SetupServer",
"type": "Microsoft.Automation/AutomationAccounts/Configurations",
"location": "East US 2",
"tags": {},
"etag": null,
"properties": {
"provisioningState": "Succeeded",
"jobCount": 0,
"parameters": {},
"description": "sample configuration",
"state": null,
"creationTime": "0001-01-01T00:00:00+00:00",
"lastModifiedTime": "0001-01-01T00:00:00+00:00",
"logVerbose": false
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/configurations/SetupServer",
"name": "SetupServer",
"type": "Microsoft.Automation/AutomationAccounts/Configurations",
"location": "East US 2",
"tags": {},
"etag": "\"636263396635600000\"",
"properties": {
"provisioningState": "Succeeded",
"jobCount": 0,
"parameters": {},
"description": "sample configuration",
"state": "Published",
"creationTime": "2017-03-28T23:14:23.56+00:00",
"lastModifiedTime": "2017-03-28T23:14:23.56+00:00",
"logVerbose": false
}
}
Definitions
Name | Description |
---|---|
Content |
Definition of the runbook property type. |
Content |
Definition of the content source. |
Content |
Gets or sets the content source type. |
Dsc |
Definition of the configuration type. |
Dsc |
The parameters supplied to the create or update configuration operation. |
Dsc |
Definition of the configuration parameter type. |
Dsc |
Gets or sets the provisioning state of the configuration. |
Dsc |
Gets or sets the state of the configuration. |
Error |
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 |
DscConfiguration
Definition of the configuration type.
Name | Type | Description |
---|---|---|
etag |
string |
Gets or sets the etag of the resource. |
id |
string |
Fully qualified resource Id for the resource |
location |
string |
The Azure Region where the resource lives |
name |
string |
The name of the resource |
properties.creationTime |
string |
Gets or sets the creation time. |
properties.description |
string |
Gets or sets the description. |
properties.jobCount |
integer |
Gets or sets the job count of the configuration. |
properties.lastModifiedTime |
string |
Gets or sets the last modified time. |
properties.logVerbose |
boolean |
Gets or sets verbose log option. |
properties.nodeConfigurationCount |
integer |
Gets the number of compiled node configurations. |
properties.parameters |
<string,
Dsc |
Gets or sets the configuration parameters. |
properties.provisioningState |
Gets or sets the provisioning state of the configuration. |
|
properties.source |
Gets or sets the source. |
|
properties.state |
Gets or sets the state of the configuration. |
|
tags |
object |
Resource tags. |
type |
string |
The type of the resource. |
DscConfigurationCreateOrUpdateParameters
The parameters supplied to the create or update configuration operation.
Name | Type | Description |
---|---|---|
location |
string |
Gets or sets the location of the resource. |
name |
string |
Gets or sets name of the resource. |
properties.description |
string |
Gets or sets the description of the configuration. |
properties.logProgress |
boolean |
Gets or sets progress log option. |
properties.logVerbose |
boolean |
Gets or sets verbose log option. |
properties.parameters |
<string,
Dsc |
Gets or sets the configuration parameters. |
properties.source |
Gets or sets the source. |
|
tags |
object |
Gets or sets the tags attached to the resource. |
DscConfigurationParameter
Definition of the configuration parameter type.
Name | Type | Description |
---|---|---|
defaultValue |
string |
Gets or sets the default value of parameter. |
isMandatory |
boolean |
Gets or sets a Boolean value to indicate whether the parameter is mandatory or not. |
position |
integer |
Get or sets the position of the parameter. |
type |
string |
Gets or sets the type of the parameter. |
DscConfigurationProvisioningState
Gets or sets the provisioning state of the configuration.
Name | Type | Description |
---|---|---|
Succeeded |
string |
DscConfigurationState
Gets or sets the state of the configuration.
Name | Type | Description |
---|---|---|
Edit |
string |
|
New |
string |
|
Published |
string |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |