11---
22description : JSON schema reference for a Desired State Configuration document.
3- ms.date : 01/17/2024
3+ ms.date : 02/28/2025
44ms.topic : reference
55title : DSC Configuration document schema reference
66---
@@ -15,7 +15,7 @@ The YAML or JSON file that defines a DSC Configuration.
1515
1616``` yaml
1717SchemaDialect : 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
1919Type : object
2020` ` `
2121
@@ -29,7 +29,14 @@ A configuration document can be defined as either YAML or JSON. For ease of auth
2929recommends drafting configuration documents in YAML.
3030
3131For 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`
3340
3441You can use configuration document functions to dynamically determine values in the document at
3542runtime. 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
4653
4754Every configuration document must include these properties :
4855
49- - [$schema]
50- - [resources]
56+ - [$schema](#schema)
57+ - [resources](#resources)
5158
5259# # Properties
5360
5461# ## $schema
5562
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.
6866
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).
7273
7374For every version of the schema, there are three valid urls :
7475
@@ -79,12 +80,12 @@ For every version of the schema, there are three valid urls:
7980
8081- ` .../bundled/config/document.json`
8182
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.
8485
8586 This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can still
8687 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 .
8889
8990- ` .../bundled/config/document.vscode.json`
9091
@@ -100,15 +101,24 @@ Type: string
100101Required: true
101102Format: URI
102103ValidValues: [
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
112122 ]
113123` ` `
114124
@@ -142,7 +152,7 @@ For more information about defining parameters in a configuration, see
142152` ` ` yaml
143153Type: object
144154Required: 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
146156` ` `
147157
148158# ## variables
@@ -178,7 +188,7 @@ For more information about defining a valid resource instance in a configuration
178188Type: array
179189Required: true
180190MinimumItemCount: 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
182192` ` `
183193
184194<!-- Link reference definitions -->
0 commit comments