1
1
---
2
2
description : JSON schema reference for a Desired State Configuration document.
3
- ms.date : 01/17/2024
3
+ ms.date : 02/28/2025
4
4
ms.topic : reference
5
5
title : DSC Configuration document schema reference
6
6
---
@@ -15,7 +15,7 @@ The YAML or JSON file that defines a DSC Configuration.
15
15
16
16
``` yaml
17
17
SchemaDialect : https://json-schema.org/draft/2020-12/schema
18
- SchemaID : https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04 /config/document.json
18
+ SchemaID : https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0 /config/document.json
19
19
Type : object
20
20
` ` `
21
21
@@ -29,7 +29,14 @@ A configuration document can be defined as either YAML or JSON. For ease of auth
29
29
recommends drafting configuration documents in YAML.
30
30
31
31
For DSC's authoring tools to recognize a file as a DSC Configuration document, the filename must
32
- end with ` .dsc.config.json`, `.dsc.config.yml`, or `.dsc.config.yaml`.
32
+ end with one of the following:
33
+
34
+ - ` .dsc.config.json`
35
+ - ` .dsc.config.yml`
36
+ - ` .dsc.config.yaml` .
37
+ - ` .dsc.json`
38
+ - ` .dsc.yml`
39
+ - ` .dsc.yaml`
33
40
34
41
You can use configuration document functions to dynamically determine values in the document at
35
42
runtime. For more information, see [DSC Configuration document functions reference][01]
@@ -46,29 +53,23 @@ The rest of this document describes the schema DSC uses to validation configurat
46
53
47
54
Every configuration document must include these properties :
48
55
49
- - [$schema]
50
- - [resources]
56
+ - [$schema](#schema)
57
+ - [resources](#resources)
51
58
52
59
# # Properties
53
60
54
61
# ## $schema
55
62
56
- The `$schema` property indicates the canonical URL for the version of this schema that the document
57
- adheres to. DSC uses this property when validating the configuration document before any
58
- configuration operations.
59
-
60
- There are currently 3 published versions of the schema, compatible with different versions of DSC :
61
-
62
- - ` 2024/04` is the latest version of the schema, compatible with DSC version 3.0.0-preview.7 and
63
- later.
64
- - ` 2023/10` is the previous version of the schema, compatible with DSC versions `3.0.0-alpha.4` and
65
- ` 3.0.0-alpha.5` .
66
- - ` 2023/08` is the first version of the schema, compatible with DSC versions `3.0.0-alpha.1` through
67
- ` 3.0.0-alpha.3` .
63
+ The `$schema` property indicates the URI that resolves to the version of this schema that the
64
+ document adheres to. DSC uses this property when validating and processing the configuration
65
+ document.
68
66
69
- This documentation is for the latest version of the schema. You should update your configuration
70
- documents and resource manifests to the latest version of the schema. Prior versions don't work
71
- with new releases of DSC. The schemas remain published, but won't get any updates.
67
+ The JSON schemas for DSC are published in multiple versions and forms. This documentation is for
68
+ the latest version of the schema. As a convenience, you can specify either the full URI for the
69
+ schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema for a specific
70
+ semantic version, the latest schema for a minor version, or the latest schema for a major version
71
+ of DSC. For more information about schema URIs and versioning, see
72
+ [DSC JSON Schema URIs](../schema-uris.md).
72
73
73
74
For every version of the schema, there are three valid urls :
74
75
@@ -79,12 +80,12 @@ For every version of the schema, there are three valid urls:
79
80
80
81
- ` .../bundled/config/document.json`
81
82
82
- The URL to the bundled schema. When it's used for validation, the validating client only needs to
83
- retrieve this schema.
83
+ The URL to the canonically bundled schema. When it's used for validation, the validating client
84
+ only needs to retrieve this schema.
84
85
85
86
This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can still
86
87
validate the document when it uses this schema, other tools may error or behave in unexpected
87
- ways.
88
+ ways if they don't fully support the 2020-12 specification .
88
89
89
90
- ` .../bundled/config/document.vscode.json`
90
91
@@ -100,15 +101,24 @@ Type: string
100
101
Required: true
101
102
Format: URI
102
103
ValidValues: [
103
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
104
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/config/document.json
105
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/config/document.vscode.json
106
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
107
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/config/document.json
108
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/config/document.vscode.json
109
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
110
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/config/document.json
111
- https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/config/document.vscode.json
104
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json
105
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json
106
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json
107
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json
108
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json
109
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json
110
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json
111
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json
112
+ https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json
113
+ https://aka.ms/dsc/schemas/v3/config/document.json
114
+ https://aka.ms/dsc/schemas/v3/bundled/config/document.json
115
+ https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json
116
+ https://aka.ms/dsc/schemas/v3.0/config/document.json
117
+ https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json
118
+ https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json
119
+ https://aka.ms/dsc/schemas/v3.0.0/config/document.json
120
+ https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json
121
+ https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json
112
122
]
113
123
` ` `
114
124
@@ -142,7 +152,7 @@ For more information about defining parameters in a configuration, see
142
152
` ` ` yaml
143
153
Type: object
144
154
Required: false
145
- ValidPropertySchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04 /config/document.parameter.json
155
+ ValidPropertySchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0 /config/document.parameter.json
146
156
` ` `
147
157
148
158
# ## variables
@@ -178,7 +188,7 @@ For more information about defining a valid resource instance in a configuration
178
188
Type: array
179
189
Required: true
180
190
MinimumItemCount: 1
181
- ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04 /config/document.resource.json
191
+ ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0 /config/document.resource.json
182
192
` ` `
183
193
184
194
<!-- Link reference definitions -->
0 commit comments