diff --git a/dsc/docs-conceptual/dsc-3.0/changelog.md b/dsc/docs-conceptual/dsc-3.0/changelog.md index a5f0867..8738614 100644 --- a/dsc/docs-conceptual/dsc-3.0/changelog.md +++ b/dsc/docs-conceptual/dsc-3.0/changelog.md @@ -130,7 +130,7 @@ in this release, see the [diff on GitHub][compare-v3.1.0]. - Added support for extensions to DSC. You can now use the `dsc extension list` command to enumerate available extensions. DSC now supports a single extension capability, `discover`, which returns JSON objects indicating where to find DSC resource manifests that aren't in the `PATH` or - `DSC_PATH`, as with resources installed as Appx packages. + `DSC_RESOURCE_PATH`, as with resources installed as Appx packages. Now when DSC performs discovery, it recursively discovers extensions and resources on the system. @@ -586,11 +586,11 @@ Version `3.0.0` is the first generally available release of DSC. [release-v3.0.0]: https://github.com/PowerShell/DSC/releases/tag/v3.0.0 "Link to the DSC v3.0.0 release on GitHub" -[cli.option.p]: ./reference/cli/index.md#--progress-format -[cli.resource.export]: ./reference/cli/resource/export.md -[schema.config.resource]: ./reference/schemas/config/resource.md -[schema.definitions.resourceKind]: ./reference/schemas/definitions/resourcekind.md -[schema.metadata]: ./reference/schemas/metadata/Microsoft.DSC/properties.md +[cli.option.p]: /powershell/dsc/reference/cli/?view=dsc-3.0&preserve-view=true#--progress-format +[cli.resource.export]: /powershell/dsc/reference/cli/resource/export?view=dsc-3.0&preserve-view=true +[schema.config.resource]: /powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true +[schema.definitions.resourceKind]: /powershell/dsc/reference/schemas/definitions/resourcekind?view=dsc-3.0&preserve-view=true +[schema.metadata]: /powershell/dsc/reference/schemas/metadata/microsoft.dsc/properties?view=dsc-3.0&preserve-view=true [#328]: https://github.com/PowerShell/DSC/issues/328 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/export.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/export.md index 57546c0..c5b7575 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/export.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/export.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc config export' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc config export --- @@ -31,6 +31,18 @@ dsc config export [Options] --input cat | dsc config export [Options] --file - ``` +### Configuration document from file with parameters from stdin + +```sh +cat | dsc config --parameters-file - export [Options] --file +``` + +### Configuration document from option string with parameters from stdin + +```sh +cat | dsc config --parameters-file - export [Options] --input +``` + ## Description The `export` subcommand generates a configuration document that includes every instance of a set of diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/get.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/get.md index 3694d36..97e0e1a 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/get.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/get.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc config get' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc config get --- @@ -31,6 +31,18 @@ dsc config get [Options] --input cat | dsc config get [Options] --file - ``` +### Configuration document from file with parameters from stdin + +```sh +cat | dsc config --parameters-file - get [Options] --file +``` + +### Configuration document from option string with parameters from stdin + +```sh +cat | dsc config --parameters-file - get [Options] --input +``` + ## Description The `get` subcommand returns the actual state of the resource instances in a configuration diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/index.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/index.md index ceb9475..9ee324a 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/index.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/index.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc config' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc config --- @@ -78,6 +78,11 @@ for that parameter. This option is mutually exclusive with the `--parameters` option. +Starting with DSC version 3.1.0, you can pass the parameters data to a subcommand over stdin. When +you do, you must pass the configuration document as an input string or the path to a file on the +system. You can't pass both the parameters file and the configuration document to a command from +stdin. + For more information about defining parameters in a configuration document, see [DSC Configuration document parameter schema][06]. For more information about using parameters in configuration document, see the [parameters function reference][07]. diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/set.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/set.md index 196597c..197cb85 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/set.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/set.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc config set' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc config set --- @@ -31,6 +31,19 @@ dsc config set [Options] --input cat | dsc config set [Options] --file - ``` +### Configuration document from file with parameters from stdin + +```sh +cat | dsc config --parameters-file - set [Options] --file +``` + +### Configuration document from option string with parameters from stdin + +```sh +cat | dsc config --parameters-file - set [Options] --input +``` + + ## Description The `set` subcommand enforces the desired state of the resource instances in a configuration @@ -80,22 +93,22 @@ cat ./example.dsc.config.yaml | dsc config set --file - -The command uses the **path** option to enforce the configuration defined in the +The command uses the **file** option to enforce the configuration defined in the `example.dsc.config.yaml` file. ```sh -dsc config set --path ./example.dsc.config.yaml +dsc config set --file ./example.dsc.config.yaml ``` ### Example 3 - Passing a configuration document as a variable -The command uses the **document** option to enforce the configuration stored in the `$desired` +The command uses the **input** option to enforce the configuration stored in the `$desired` variable. ```sh -dsc config set --document $desired +dsc config set --input $desired ``` ## Options diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/test.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/test.md index ca84dc4..57dbfae 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/config/test.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/config/test.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc config test' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc config test --- @@ -22,7 +22,7 @@ dsc config test [Options] --file ### Configuration document from option string ```sh -dsc config test [Options] --document +dsc config test [Options] --input ``` ### Configuration document from stdin @@ -31,6 +31,18 @@ dsc config test [Options] --document cat | dsc config test [Options] --file - ``` +### Configuration document from file with parameters from stdin + +```sh +cat | dsc config --parameters-file - test [Options] --file +``` + +### Configuration document from option string with parameters from stdin + +```sh +cat | dsc config --parameters-file - test [Options] --input +``` + ## Description The `test` subcommand verifies whether the resource instances in a configuration document are in diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/extension/index.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/extension/index.md new file mode 100644 index 0000000..63c8f5c --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/extension/index.md @@ -0,0 +1,64 @@ +--- +description: Command line reference for the 'dsc extension' command +ms.date: 03/25/2025 +ms.topic: reference +title: dsc extension +--- + +# dsc extension + +## Synopsis + +Operations on DSC extensions. + +## Syntax + +```sh +dsc extension [Options] +``` + +## Description + +The `dsc extension` command contains a subcommand for listing DSC extensions. + +## Commands + +### list + +The `list` command returns the list of available DSC extensions with an optional filter. For more +information, see [dsc extension list][01]. + +### help + +The `help` command returns help information for this command or a subcommand. + +To get the help for a command or subcommand, use the syntax: + +```sh +dsc extension help [] +``` + +For example, `dsc extension help` gets the help for this command. `dsc extension help list` +gets the help for the `list` subcommand. + +You can also use the [--help](#--help) option on the command or subcommand to display the help +information. For example, `dsc extension --help` or `dsc extension list --help`. + +## Options + +### -h, --help + + + + +Displays the help for the current command or subcommand. When you specify this option, the +application ignores all other options and arguments. + +```yaml +Type : boolean +Mandatory : false +LongSyntax : --help +ShortSyntax : -h +``` + +[01]: ./list.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/extension/list.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/extension/list.md new file mode 100644 index 0000000..bc136d9 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/extension/list.md @@ -0,0 +1,180 @@ +--- +description: Command line reference for the 'dsc extension list' command +ms.date: 03/25/2025 +ms.topic: reference +title: dsc extension list +--- + +# dsc extension list + +## Synopsis + +Retrieves the list of available DSC extensions with an optional filter. + +## Syntax + +```sh +dsc extension list [Options] +``` + +## Description + +The `list` subcommand searches for available DSC extensions and returns their information. DSC +discovers extensions by first searching the `PATH` or `DSC_RESOURCE_PATH` environment variable for +`.dsc.extension.json`, `.dsc.extension.yml`, and `dsc.extension.yaml` files. For more information +about the environment variables DSC uses, see [Environment variables][01] + +DSC returns the list of discovered extensions with their implementation information and metadata. If +the command includes the `EXTENSION_NAME` argument, DSC filters the list of discovered extensions +before returning them. Filters are always applied after extension discovery. + +## Examples + +### Example 1 - List all extensions + +Without any filters, the command returns every discovered DSC extension. + +```sh +dsc extension list +``` + +```Output +Type Version Capabilities Description +---------------------------------------------------------------------------------------------------------- +Microsoft.Windows.Appx/Discover 0.1.0 d Discovers DSC resources packaged as Appx packages. +``` + +### Example 2 - List a specific extension + +When the `EXTENSION_NAME` argument doesn't include a wildcard, the command returns only the extension +with the specified type name. + +```sh +dsc extension list Microsoft.Windows.Appx/Discover +``` + +```Output +Type Version Capabilities Description +---------------------------------------------------------------------------------------------------------- +Microsoft.Windows.Appx/Discover 0.1.0 d Discovers DSC resources packaged as Appx packages. +``` + +### Example 3 - List extensions with a matching type name + +When the `EXTENSION_NAME` argument includes a wildcard, the command returns every extension with a +matching type name. + +```sh +dsc extension list Microsoft* +``` + +```Output +Type Version Capabilities Description +---------------------------------------------------------------------------------------------------------- +Microsoft.Windows.Appx/Discover 0.1.0 d Discovers DSC resources packaged as Appx packages. +``` + +## Arguments + +### EXTENSION_NAME + +Specifies an optional filter to apply for the type names of discovered DSC extensions. The filter +can include wildcards (`*`). The filter isn't case-sensitive. + +When this argument is specified, DSC filters the results to include only extensions where the +extension type name matches the filter. + +For example, specifying the filter `Microsoft.*` returns only the extensions published by +Microsoft. Specifying the filter `*Windows*` returns any extension with the string `Windows` in its +name, regardless of the casing. + +```yaml +Type : string +Mandatory : false +``` + +## Options + +### -o, --output-format + + + + +The `--output-format` option controls which format DSC uses for the data the command returns. The +available formats are: + +- `json` to emit the data as a [JSON Line][02]. +- `pretty-json` to emit the data as JSON with newlines, indentation, and spaces for readability. +- `yaml` to emit the data as YAML. +- `table-no-truncate` to emit the data as a summary table without truncating each line to the + current console width. + +The default output format depends on whether DSC detects that the output is being redirected or +captured as a variable: + +- If the command isn't being redirected or captured, DSC displays the output as a summary table + described in the [Output](#output) section of this document. +- If the command output is redirected or captured, DSC emits the data as the `json` format to + stdout. + +When you use this option, DSC uses the specified format regardless of whether the command is being +redirected or captured. + +When the command isn't redirected or captured, the output in the console is formatted for improved +readability. When the command isn't redirected or captured, the output includes terminal sequences +for formatting. + +```yaml +Type : string +Mandatory : false +ValidValues : [json, pretty-json, yaml, table-no-truncate] +LongSyntax : --output-format +ShortSyntax : -o +``` + +### -h, --help + + + + +Displays the help for the current command or subcommand. When you specify this option, the +application ignores all other options and arguments. + +```yaml +Type : boolean +Mandatory : false +LongSyntax : --help +ShortSyntax : -h +``` + +## Output + +This command returns a formatted array containing an object for each extension that includes the +extension's type, version, manifest settings, and other metadata. For more information, see +[dsc extension list result schema][03]. + +If the output of the command isn't captured or redirected, it displays in the console by default as +a summary table for the returned extensions. The summary table includes the following columns, +displayed in the listed order: + +- **Type** - The fully qualified type name of the extension. +- **Version** - The semantic version of the extension. +- **Capabilities** - A display of the extension's [capabilities][04] as flags. The capabilities are + displayed in the following order, using a `-` instead of the appropriate letter if the extension + doesn't have a specific capability: + + - `d` indicates that the extension has the [discover capability][05]. + + For example, the `icrosoft.Windows.Appx/Discover` extension has the following capabilities: `d`, + indicating it has the `discover` capability. +- **Description** - The short description of the extension's purpose and usage. + +For more information about the formatting of the output data, see the +[--output-format option](#--output-format). + + +[01]: ../index.md#environment-variables +[02]: https://jsonlines.org/ +[03]: ../../schemas/outputs/extension/list.md +[04]: ../../schemas/outputs/extension/list.md#capabilities +[05]: ../../schemas/outputs/extension/list.md#capability-discover diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/export.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/export.md index 9779779..142aeb2 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/export.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/export.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc resource export' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource export --- @@ -13,15 +13,40 @@ Generates a configuration document that defines the existing instances of a spec ## Syntax +### Without instance properties + ```sh dsc resource export [Options] --resource ``` +### Instance properties from input option + +```sh +dsc resource export --input --resource +``` + +### Instance properties from file + +```sh +dsc resource export --file --resource +``` + +### Instance properties from stdin + +```sh +cat | dsc resource get [Options] --resource --file - +``` + ## Description The `export` subcommand generates a configuration document that includes every instance of a specific resource. The resource must be specified with the `--resource` option. +Starting with DSC 3.1.0, You can use the `--input` or `--file` option to specify a resource +instance to use as a filter for the exported resources. When you do, the specified instance is +passed to the resource for use in filtering. The implementation for filtering depends on each +resource, not DSC itself. + Only specify exportable resources with a resource manifest that defines the [export][01] section in the input configuration. If the specified resource type isn't exportable, DSC raises an error. @@ -48,6 +73,46 @@ LongSyntax : --resource ShortSyntax : -r ``` +### -i, --input + + + + +Specifies the resource instance to use as a filter for exported resource instances. + +The instance must be a string containing a JSON or YAML object. DSC validates the object against +the resource's instance schema. If the validation fails, DSC raises an error. + +This option is mutually exclusive with the `--file` option. + +```yaml +Type : string +Mandatory : false +LongSyntax : --input +ShortSyntax : -i +``` + +### -f, --file + + + + +Defines the path to a file defining the resource instance to use as a filter for exported resource +instances. + +The specified file must contain a JSON or YAML object that represents valid properties for the +resource. DSC validates the object against the resource's instance schema. If the validation fails, +or if the specified file doesn't exist, DSC raises an error. + +This option is mutually exclusive with the `--input` option. + +```yaml +Type : string +Mandatory : false +LongSyntax : --file +ShortSyntax : -f +``` + ### -o, --output-format diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/get.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/get.md index 17e6ea7..602308e 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/get.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/get.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc resource get' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource get --- @@ -237,6 +237,11 @@ available formats are: - `pretty-json` to emit the data as JSON with newlines, indentation, and spaces for readability. - `yaml` to emit the data as YAML. When you use the `--all` option, each instance is returned as a YAML document with the `---` document separator between each returned instance. +- `json-array` to emit the data as a single milti-line JSON array containing each object. This + option is only valid with the [--all option](#--all). +- `pass-through` to return the data from the resource directly without wrapping it in a DSC result. + When you use this output option, the emitted JSON Line adheres to the resource's instance schema, + not the DSC get result schema. The default output format depends on whether DSC detects that the output is being redirected or captured as a variable: @@ -256,7 +261,7 @@ for formatting. ```yaml Type : string Mandatory : false -ValidValues : [json, pretty-json, yaml] +ValidValues : [json, pretty-json, yaml, json-array, pass-through] LongSyntax : --output-format ShortSyntax : -o ``` @@ -280,7 +285,8 @@ ShortSyntax : -h By default, this command returns a formatted data object that includes the actual state of the instance. When the `--all` option is specified, the command returns the formatted data for each -instance. +instance. When you specify the `pass-through` output format option, the emitted data is the +unmodified output from the resource, not a DSC resource get result. For more information about the structure of the output JSON, see [dsc resource get result schema][04]. diff --git a/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/list.md b/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/list.md index 8fd6244..f91e8b1 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/list.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/cli/resource/list.md @@ -1,6 +1,6 @@ --- description: Command line reference for the 'dsc resource list' command -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource list --- @@ -245,6 +245,8 @@ available formats are: - `json` to emit the data as a [JSON Line][02]. - `pretty-json` to emit the data as JSON with newlines, indentation, and spaces for readability. - `yaml` to emit the data as YAML. +- `table-no-truncate` to emit the data as a summary table without truncating each line to the + current console width. The default output format depends on whether DSC detects that the output is being redirected or captured as a variable: @@ -264,7 +266,7 @@ for formatting. ```yaml Type : string Mandatory : false -ValidValues : [json, pretty-json, yaml] +ValidValues : [json, pretty-json, yaml, table-no-truncate] LongSyntax : --output-format ShortSyntax : -o ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/DSC/PackageManagement/APT/examples/manage-packages-with-apt.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/DSC/PackageManagement/APT/examples/manage-packages-with-apt.md new file mode 100644 index 0000000..a63f22b --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/DSC/PackageManagement/APT/examples/manage-packages-with-apt.md @@ -0,0 +1,104 @@ +--- +description: > + Demonstrates how to manage packages with the DSC.PackageManagement/Apt resource +ms.date: 07/03/2025 +ms.topic: reference +title: Manage packages with APT +--- + +# Manage packages with APT + +This example demonstrates how to use the `DSC.PackageManagement/Apt` resource to manage packages on +Linux systems that use the APT package manager. + +## Test if package is installed + +The following snippet shows how you can use the resource with the [dsc resource test][00] command +to check whether the `nginx` package exists. + +```bash +dsc resource test --resource DSC.PackageManagement/Apt --input '{"packageName":"nginx"}' +``` + +When the package is not installed, DSC returns the following result. + +> [!NOTE] +> Note that the version and source values can differ depending on your system's package +> repositories and available package versions. + +```yaml +desiredState: + packageName: nginx +actualState: + _exist: false + packageName: nginx + version: 1.24.0-2ubuntu7.3 + source: noble-updates,noble-security,now +inDesiredState: false +differingProperties: + - _exist +``` + +## Ensure a package is installed + +To ensure the system is in the desired state, use the [dsc resource set][01] command. + +```bash +dsc resource set --resource DSC.PackageManagement/Apt --input '{"packageName":"nginx"}' +``` + +When the resource installs the package, DSC returns the following result: + +```yaml +beforeState: + packageName: "nginx" + _exist: false +afterState: + packageName: nginx + version: "1.24.0-2ubuntu7.3" + source: noble-updates,noble-security,now +changedProperties: +- _exist +``` + +You can test the instance again to confirm that the package exists: + +```bash +dsc resource test --resource DSC.PackageManagement/Apt --input '{"packageName":"nginx"}' +``` + +```yaml +desiredState: + packageName: nginx +actualState: + _exist: true + packageName: nginx + version: 1.24.0-2ubuntu7.3 + source: noble-updates,noble-security,now +inDesiredState: true +differingProperties: [] +``` + +## Uninstall a package + +To uninstall a package, set the `_exist` property to `false`: + +```bash +dsc resource set --resource DSC.PackageManagement/Apt --input '{"packageName":"nginx", "_exist": false}' +``` + +To verify the package no longer exists, use the `dsc resource get` command + +```powershell +dsc resource get --resource DSC.PackageManagement/Apt --input '{"packageName":"nginx"}' +``` + +```yaml +actualState: + packageName: nginx + _exist: false +``` + + +[00]: ../../../../../cli/resource/test.md +[01]: ../../../../../cli/resource/set.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/DSC/PackageManagement/APT/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/DSC/PackageManagement/APT/index.md new file mode 100644 index 0000000..532925d --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/DSC/PackageManagement/APT/index.md @@ -0,0 +1,202 @@ +--- +description: DSC.PackageManagement/Apt resource reference documentation +ms.date: 07/03/2025 +ms.topic: reference +title: DSC.PackageManagement/Apt +--- + +# DSC.PackageManagement/Apt + +## Synopsis + +Manage packages with the advanced package tool (APT) on Linux systems. + +> [!IMPORTANT] +> The `DSC.PackageManagement/Apt` resource is a proof-of-concept example +> for use with DSC. Don't use it in production. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [Linux, apt, PackageManagement] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: DSC.PackageManagement/Apt + properties: + # Required properties + packageName: string + # Instance properties + _exist: boolean + version: string +``` + +## Description + +The `DSC.PackageManagement/Apt` resource enables you to idempotently manage packages with the +Advanced Package Tool (APT) on Linux systems. The resource can: + +- Install packages +- Uninstall packages +- Check if a package is installed +- Verify the version of an installed package + +> [!NOTE] +> This resource only works on Linux systems that use the APT package manager, such as Ubuntu and +> Debian. + +## Requirements + +- A Linux system with APT installed +- Administrative privileges (root or sudo access) to install and remove packages + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of an instance. +- `set` - You can use the resource to enforce the desired state for an instance. +- `export` - You can use the resource to export the current state of the system. + +This resource uses the synthetic test functionality of DSC to determine whether an instance is in +the desired state. For more information about resource capabilities, see +[DSC resource capabilities][00]. + +## Examples + +1. [Manage packages with APT](./examples/manage-packages-with-apt.md) - Shows how to install, + uninstall, and check packages with the `DSC.PackageManagement/Apt` resource. + +## Properties + +The following list describes the properties for the resource. + +- **Required properties:** The following properties are always + required when defining an instance of the resource. An instance that doesn't define each of these + properties is invalid. For more information, see the "Required resource properties" section in + [DSC resource properties][01] + + - [packageName](#packagename) - The name of the package to query or install. + +- **Key properties:** The following properties uniquely identify an + instance. If two instances of a resource have the same values for their key properties, the + instances are conflicting. For more information about key properties, see the "Key resource + properties" section in [DSC resource properties][02]. + + - [packageName](#packagename) (required) - The name of the package to query or install. + +- **Instance properties:** The following properties are optional. + They define the desired state for an instance of the resource. + + - [_exist](#_exist) - Defines whether the package should exist. + - [version](#version) - The version of the package to install. + +- **Read-only properties:** The resource returns the following + properties, but they aren't configurable. For more information about read-only properties, see + the "Read-only resource properties" section in [DSC resource properties][03]. + + - [source](#source) - Indicates the source of the package. + +### packageName + +
Expand for packageName property metadata + +```yaml +Type : string +IsRequired : true +IsKey : true +IsReadOnly : false +IsWriteOnly : false +``` + +
+ +Defines the name of the package to query or install. This property is required and serves as the +key for uniquely identifying the package. + +### _exist + +
Expand for _exist property metadata + +```yaml +Type : boolean +IsRequired : false +IsKey : false +IsReadOnly : false +IsWriteOnly : false +DefaultValue : true +``` + +
+ +The `_exist` canonical resource property determines whether a package should exist. When the value +for `_exist` is `true`, the resource installs the package if it doesn't exist. When the value for +`_exist` is `false`, the resource removes or uninstalls the package if it does exist. The default +value for this property when not specified for an instance is `true`. + +### version + +
Expand for version property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : false +IsWriteOnly : false +``` + +
+ +Defines the version of the package to install. If not specified, the latest available version will +be installed. + +### source + +
Expand for source property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +IsWriteOnly : false +``` + +
+ +Indicates the source of the package. This is a read-only property returned by the resource after a +`get` operation. + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Invalid parameter + +### Exit code 0 + +Indicates the resource operation completed without errors. + +### Exit code 1 + +Indicates the resource operation failed due to an invalid parameter. When the resource returns this +exit code, it also emits an error message with details about the invalid parameter. + +## See also + +- [For more information about APT](https://wiki.debian.org/Apt) + + +[00]: ../../../../../concepts/resources/capabilities.md +[01]: ../../../../../concepts/resources/properties.md#required-resource-properties +[02]: ../../../../../concepts/resources/properties.md#key-resource-properties +[03]: ../../../../../concepts/resources/properties.md#read-only-resource-properties diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/Debug/echo/examples/basic-echo-example.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/Debug/echo/examples/basic-echo-example.md new file mode 100644 index 0000000..72a7ee7 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/Debug/echo/examples/basic-echo-example.md @@ -0,0 +1,103 @@ +--- +description: Demonstrates basic usage of the Microsoft.DSC.Debug/Echo resource +ms.date: 07/03/2025 +ms.topic: reference +title: Basic echo example +--- + +# Basic echo example + +This example demonstrates how to use the `Microsoft.DSC.Debug/Echo` to test the output returned by +DSC. + +## Test the output returned by DSC + +The following snippet shows how you can use the resource with the [dsc resource test][01] command +to test if the system is in the desired state. + +```powershell +$instance = @{ + output = 'Hello World!' +} | ConvertTo-Json + +dsc resource test --resource Microsoft.DSC.Debug/Echo --input $instance +``` + +```yaml +desiredState: + output: Hello World! +actualState: + output: Hello World! +inDesiredState: true +differingProperties: [] +``` + +> [!NOTE] +> The `Microsoft.DSC.Debug/Echo` resource always returns `inDesiredState: true` because it's a test +> resource designed to echo back values. +> +> It doesn't actually check or enforce anything on the system - it simply returns whatever value +> you provide as output. + +## Using the get capability + +The `Microsoft.DSC.Debug/Echo` resource's `get` capability returns the current value in the output +property: + +```powershell +$instance = @{ + output = 'Hello World!' +} | ConvertTo-Json + +dsc resource get --resource Microsoft.DSC.Debug/Echo --input $instance +``` + +The resource will return the same output value: + +```yaml +actualState: + output: Hello World! +``` + +## Using the set capability + +The `Microsoft.DSC.Debug/Echo` resource's `set` capability simply accepts a value and echoes it +back without modifying anything: + +```powershell +$instance = @{ + output = @{ + name = "ExampleSetting" + value = 123 + enabled = $true + } +} | ConvertTo-Json + +dsc resource set --resource Microsoft.DSC.Debug/Echo --input $instance +``` + +This will report success and echo the complex object: + +```yaml +beforeState: + output: + value: 123 + enabled: true + name: ExampleSetting +afterState: + output: + value: 123 + enabled: true + name: ExampleSetting +changedProperties: [] +``` + +> [!NOTE] +> Even though you're using the `set` capability, no actual changes are made to the system. + +## See also + +- [Microsoft.DSC.Debug/Echo resource](../index.md) + + +[01]: ../../../../../../cli/resource/test.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/Debug/echo/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/Debug/echo/index.md new file mode 100644 index 0000000..a5b0170 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/Debug/echo/index.md @@ -0,0 +1,169 @@ +--- +description: Microsoft.DSC.Debug/Echo resource reference documentation +ms.date: 07/03/2025 +ms.topic: reference +title: Microsoft.DSC.Debug/Echo +--- + +# Microsoft.DSC.Debug/Echo + +## Synopsis + +A debug resource for testing and troubleshooting Microsoft DSC (Desired State Configuration) +behavior. + +## Metadata + +```yaml +Version : 1.0.0 +Kind : resource +Tags : [Windows, MacOS, Linux] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.DSC.Debug/Echo + properties: + # Required properties + output: anyOf # array, boolean, integer, object, string +``` + +## Description + +The `Microsoft.DSC.Debug/Echo` resource is a debugging utility that echoes back the configuration +data passed to it. This resource is particularly useful for: + +- Testing DSC configuration syntax and structure. +- Debugging parameter passing between resources. +- Verifying that DSC is processing configurations as expected. +- Understanding how DSC transforms and handles configuration data. + +> [!NOTE] +> This resource is installed with DSC itself on any systems. +> +> You can update this resource by updating DSC. When you update DSC, the updated version of this +> resource is automatically available. + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of an instance. +- `set` - You can use the resource to enforce the desired state for an instance. +- `test` - You can use the resource to check if the actual state matches the desired state for an + instance. + +For more information about resource capabilities, see [DSC resource capabilities][01]. + +> [!NOTE] +> Invoking any operation on this resource doesn't affect the system. +> This resource only echoes the value in the output. + +## Examples + +1. [Basic echo example](./examples/basic-echo-example.md) - Shows how to use the Echo resource + for basic string and complex data output. + +## Properties + +The following list describes the properties for the resource. + +- **Required properties:** The following property is always + required when defining an instance of the resource. An instance that doesn't define this property + is invalid. For more information, see the "Required resource properties" section in + [DSC resource properties][02] + + - [output](#output) - The value to be echoed back by the resource. + +- **Key properties:** The following property uniquely identifies an + instance. If two instances of a resource have the same value for this property, the instances are + conflicting. For more information about key properties, see the "Key resource properties" section + in [DSC resource properties][03]. + + - [output](#output) (required) - The value to be echoed back by the resource. + +### output + +
Expand for output property metadata + +```yaml +Type : anyOf (array, boolean, integer, object, string) +IsRequired : true +IsKey : true +IsReadOnly : false +IsWriteOnly : false +``` + +
+ +Defines the value to be echoed back by the resource. The `output` property can be any of the +following types: + +| Type | Description | +|:-------:|:---------------------------------------------| +| array | An array of values. | +| boolean | A boolean value (`true` or `false`). | +| integer | An integer value. | +| object | A JSON object of key-value pairs. | +| string | A string value. | + +## Instance validating schema + +The following snippet contains the JSON Schema that validates an instance of the resource. The +validating schema only includes schema keywords that affect how the instance is validated. All non +validating keywords are omitted. + +```json +{ + "type": "object", + "required": [ + "output" + ], + "properties": { + "output": { + "$ref": "#/definitions/Output" + } + }, + "additionalProperties": false, + "definitions": { + "Output": { + "anyOf": [ + { + "type": "array", + "items": true + }, + { + "type": "boolean" + }, + { + "type": "integer", + "format": "int64" + }, + true, + true, + { + "type": "object" + }, + { + "type": "string" + } + ] + } + } +} +``` + +## See also + +- [Microsoft/OSInfo resource][04] +- [DSC resource capabilities][01] + + +[01]: ../../../../../../concepts/resources/capabilities.md +[02]: ../../../../../../concepts/resources/properties.md#required-resource-properties +[03]: ../../../../../../concepts/resources/properties.md#key-resource-properties +[04]: ../../../osinfo/index.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/PowerShell/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/PowerShell/index.md new file mode 100644 index 0000000..19f7b13 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/DSC/PowerShell/index.md @@ -0,0 +1,207 @@ +--- +description: Microsoft.DSC/PowerShell resource reference documentation +ms.date: 07/03/2025 +ms.topic: reference +title: Microsoft.DSC/PowerShell +--- + +# Microsoft.DSC/PowerShell + +## Synopsis + +Adapter for resources implemented as PowerShell classes + +## Metadata + +```yaml +Version: 0.1.0 +Kind: adapter +Tags: [linux, windows, macos, pwsh, powershell] +Executable: powershell.resource.ps1 +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.DSC/PowerShell + properties: + # Required Properties + resources: + - name: + type: / + properties: # adapted resource properties +``` + +## Implicit adapted instance definition syntax + +```yaml +resources: +- name: + type: / + properties: # adapted resource properties +``` + +## Description + +The `Microsoft.DSC/PowerShell` adapter resource enables you to use PowerShell Desired State +Configuration (PSDSC) resources in DSC. The adapter is able to discover and invoke PSDSC resources +implemented as PowerShell classes. + +The adapter manages the PSDSC resources in PowerShell, not Windows PowerShell. To use MOF-based +PSDSC resources or PSDSC resources that require Windows PowerShell, use the +[Microsoft.Windows/WindowsPowerShell](../../windows/windowspowershell/index.md) adapter. + +This adapter doesn't use the **PSDesiredStateConfiguration** module. You don't need to install the +**PSDesiredStateConfiguration** module to use PSDSC resources in DSC through this adapter. + +### PowerShell resource adapter cache + +The process for discovering the PowerShell resources available to the adapter can be +time-consuming. To improve performance, the adapter caches PowerShell resources and modules during +discovery. If the cache doesn't exist during discovery, the adapter creates it. + +The location of the cache depends on your operating system. The following table defines the path +for each platform. + +| Platform | Path | +| :------: | :----------------------------------------| +| Linux | `$HOME/.dsc/PSAdapterCache.json` | +| macOS | `$HOME/.dsc/PSAdapterCache.json` | +| Windows | `%LOCALAPPDATA%\dsc\PSAdapterCache.json` | + +The adapter versions the cache. The current version is `2`. If the version of the cache on a +machine differs from the current version, the adapter refreshes the cache. + +The adapter checks whether the cache is stale on each run and refreshes it if: + +- The `PSModulePath` environmental variable is updated. +- Any module is added or removed from the `PSModulePath`. +- Any related file in a cached PSDSC resource module has been updated since the cache was written. + The adapter watches the `LastWriteTime` property of module files with the following extensions: + `.ps1`, `.psd1`, and `.psm1`. + +You can directly call the adapter script to clear the cache with the **Operation** parameter value +set to `ClearCache`: + +```powershell +$adapterScript = dsc resource list Microsoft.DSC/PowerShell | + ConvertFrom-Json | + Select-Object -ExpandProperty directory | + Join-Path -ChildPath 'psDscAdapter' -AdditionalChildPath 'powershell.resource.ps1' + +& $adapterScript -Operation ClearCache +``` + +## Requirements + +- Using this adapter requires a supported version of PowerShell. DSC invokes the adapter as a + PowerShell script. For more information about installing PowerShell, see + [Install PowerShell on Windows, Linux, and macOS](/powershell/scripting/install/installing-powershell). + +## Required properties + +The following properties are required. + +### resources + +The `resources` property defines a list of adapted PSDSC resource instances that the adapter +manages. Every instance in the list must be unique, but instances may share the same DSC resource +type. + +For more information about defining a valid adapted resource instance, see the +[Adapted resource instances](#adapted-resource-instances) section of this document. + +```yaml +Type: array +Required: true +MinimumItemCount: 1 +ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.resource.json +``` + +## Adapted resource instances + +Adapted resources instances always adhere to the +[DSC Configuration document resource instance schema](../../../../schemas/config/resource.md). + +Every adapted instance must be an object that defines the [name](#adapted-instance-name), +[type](#adapted-instance-name), and [properties](#adapted-instance-properties) for the instance. + +### Adapted instance name + +The `name` property of the adapted resource instance defines the short, human-readable name for the +instance. The adapted instance name must be a non-empty string containing only letters, numbers, +and spaces. This property should be unique within the adapter's `resources` array. + +> ![NOTE] +> The adapter doesn't currently raise an error when you define two adapted instances with the same +> name. In a future release, the adapter will be updated to emit a warning when adapted instances +> share the same name. In the next major version of the adapter, name conflicts will raise an +> error. +> +> Using the same name for multiple instances can make debugging and reviewing output more +> difficult. Always use unique names for every instance. + +```yaml +PropertyName: name +Type: string +Required: true +MinimumLength: 1 +Pattern: ^[a-zA-Z0-9 ]+$ +``` + +### Adapted instance type + +The `type` property identifies the adapted instance's PSDSC Resource. The value for this property +must be the valid fully qualified type name for the resource. + +This adapter uses the following syntax for determining the fully qualified type name of a PSDSC +resource implemented as a PowerShell class: + +```Syntax +/ +``` + +For example, if a PowerShell module named **TailspinToys** has a class-based PSDSC resource named +`TSToy`, the fully qualified type name for that resource is `TailspinToys/TSToy`. + +For more information about type names in DSC, see +[DSC Resource fully qualified type name schema reference][01]. + +```yaml +Type: string +Required: true +Pattern: ^\w+(\.\w+){0,2}\/\w+$ +``` + +### Adapted instance properties + +The `properties` of an adapted resource instance define its desired state. The value of this +property must be an object. The specified properties are validated at runtime when the adapter +tries to invoke the adapted PSDSC resource instance. This adapter doesn't support static linting +for adapted instance properties in a configuration document. + +Each name for each property must be a configurable property of the PSDSC resource. The property +name isn't case sensitive. The value for each property must be valid for that property. If you +specify an invalid property name or value, the adapter raises an error when it tries to invoke the +resource. + +```yaml +Type: object +Required: true +``` + +## Exit Codes + +The resource uses the following exit codes to report success and errors: + +- `0` - Success +- `1` - Error + +## See also + +- [Microsoft.Windows/WindowsPowerShell](../../windows/WindowsPowerShell/index.md) + + +[01]: ../../../../../concepts/resources/overview.md#test-operations diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/check-for-pending-reboot.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/check-for-pending-reboot.md new file mode 100644 index 0000000..b103a27 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/check-for-pending-reboot.md @@ -0,0 +1,54 @@ +--- +description: > + Example showing how to use the Microsoft.Windows/RebootPending resource + with DSC to check if a Windows system has a pending reboot. +ms.date: 07/03/2025 +ms.topic: reference +title: Check for pending reboot +--- + +# Check for pending reboot + +This example shows how you can use the `Microsoft.Windows/RebootPending` resource to check whether +a Windows system has a pending reboot. + +## Check reboot status + +The following snippet shows how to use the resource with the [dsc resource get][01] command to +retrieve the pending reboot status. + +```powershell +dsc resource get --resource Microsoft.Windows/RebootPending +``` + +When you run this command, DSC returns the following result if a reboot is pending: + +```yaml +actualState: + rebootPending: true +``` + +If no reboot is pending, the result is: + +```yaml +actualState: + rebootPending: false +``` + +The `rebootPending` property indicates whether the system requires a reboot (`true`) or not +(`false`). + +> The resource doesn't implement the **Set**, **WhatIf**, **Export**, **Delete**, or **Test** +> capabilities. You can't use this resource to enforce or export configurations. +> +> Note that even though the resource doesn't implement **Test**, you can still invoke the test +> operation against the resource and use it in the `Microsoft.Dsc/Assertion` group resource. This +> resource relies on the synthetic testing provided by DSC. For more information about synthetic +> testing with DSC, see +> [DSC resource capabiltiies](../../../../../../concepts/resources/capabilities.md#test). +> +> For an example using this resource in an assertion, see +> [Use the RebootPending resource in a configuration](./use-rebootpending-in-configuration.md). + + +[01]: ../../../../../cli/resource/get.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/pendingReboot.config.dsc.yaml b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/pendingReboot.config.dsc.yaml new file mode 100644 index 0000000..9824a2d --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/pendingReboot.config.dsc.yaml @@ -0,0 +1,19 @@ +# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Managed key + type: Microsoft.Windows/Registry + properties: + _exist: true + keyPath: HKCU\DscExamples\ManagedKey + dependsOn: + - "[resourceId('Microsoft.DSC/Assertion','Assert pending reboot')]" +- name: Assert pending reboot + type: Microsoft.DSC/Assertion + properties: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Check pending reboot + type: Microsoft.Windows/RebootPending + properties: + rebootPending: true diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/use-rebootpending-in-configuration.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/use-rebootpending-in-configuration.md new file mode 100644 index 0000000..4cbf6bc --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/examples/use-rebootpending-in-configuration.md @@ -0,0 +1,257 @@ +--- +description: > + Example showing how to use the Microsoft.Windows/RebootPending resource in a + configuration document with an assertion to check for a pending reboot. +ms.date: 07/03/2025 +ms.topic: reference +title: Use RebootPending resource in a configuration +--- + +# Use the RebootPending resource in a configuration + +This example demonstrates how to use the `Microsoft.Windows/RebootPending` resource in a +configuration document. The configuration checks if a reboot is pending and, if so, skips the +subsequent step using an assertion. + +## Definition + +This configuration document demonstrates how to use the `Microsoft.Windows/RebootPending` resource +together with an assertion. + +The first instance defines the desired state for the `ManagedKey` registry key, ensuring it exists +only if no reboot is pending. It uses the `dependsOn` property to reference the assertion resource, +which checks the system's reboot status using the `Microsoft.Windows/RebootPending` resource. The +assertion passes when `rebootPending` is `false`,allowing the registry key resource to run. If a +reboot is pending, the assertion fails and the registry key is not set. + +:::code language="yaml" source="pendingReboot.config.dsc.yaml"::: + +Copy the configuration document and save it as `pendingReboot.config.dsc.yaml`. + +## Test configuration + +To see whether the system is in the desired state, use the [dsc config test][01] command on the +configuration document. + +```powershell +dsc config test --file ./pendingReboot.config.dsc.yaml +``` + +```yaml +metadata: + Microsoft.DSC: + version: 3.0.0 + operation: test + executionType: actual + startDatetime: 2025-06-03T06:49:22.573486200+02:00 + endDatetime: 2025-06-03T06:49:35.813770500+02:00 + duration: PT13.2402843S + securityContext: restricted +results: +- metadata: + Microsoft.DSC: + duration: PT10.0162818S + name: Assert pending reboot + type: Microsoft.DSC/Assertion + result: + desiredState: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Check pending reboot + type: Microsoft.Windows/RebootPending + properties: + rebootPending: false + actualState: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + contentVersion: 1.0.0 + resources: + - type: Microsoft.Windows/RebootPending + name: Check pending reboot + properties: + rebootPending: false + inDesiredState: true + differingProperties: [] +- metadata: + Microsoft.DSC: + duration: PT0.0549784S + name: Managed key + type: Microsoft.Windows/Registry + result: + desiredState: + _exist: true + keyPath: HKCU\DscExamples\ManagedKey + actualState: + keyPath: HKCU\DscExamples\ManagedKey + _exist: false + inDesiredState: false + differingProperties: + - _exist +messages: [] +hadErrors: false +``` + +Review the individual results to understand whether each instance is in the desired state. + +The result for the first instance, named `Check pending reboot`, was: + +```yaml +desiredState: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Check pending reboot + type: Microsoft.Windows/RebootPending + properties: + rebootPending: false +actualState: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + contentVersion: 1.0.0 + resources: + - type: Microsoft.Windows/RebootPending + name: Check pending reboot + properties: + rebootPending: false +inDesiredState: true +differingProperties: [] +``` + +The output indicates there is no pending reboot. When you use the **Set** operation on +this confifguration, the second instance will run. + +The result for the second instance, named `Managed value`, was: + +```yaml +desiredState: + _exist: true + keyPath: HKCU\DscExamples\ManagedKey +actualState: + keyPath: HKCU\DscExamples\ManagedKey + _exist: false +inDesiredState: false +differingProperties: +- _exist +``` + +The output indicates the registry path doesn't exist. + +The first instance indicates the resource is in the desired state. The second +instance indicates it isn't in the desired state. + +## Enforce configuration + +To update the system to the desired state, use the [dsc config set][02] command on the +configuration document. + +```powershell +dsc config set --file ./pendingReboot.config.dsc.yaml +``` + +```yaml +metadata: + Microsoft.DSC: + version: 3.0.0 + operation: set + executionType: actual + startDatetime: 2025-06-03T06:55:12.123456+02:00 + endDatetime: 2025-06-03T06:55:15.654321+02:00 + duration: PT3.530865S + securityContext: restricted +results: +- metadata: + Microsoft.DSC: + duration: PT2.000000S + name: Assert pending reboot + type: Microsoft.DSC/Assertion + result: + beforeState: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Check pending reboot + type: Microsoft.Windows/RebootPending + properties: + rebootPending: false + afterState: + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Check pending reboot + type: Microsoft.Windows/RebootPending + properties: + rebootPending: false + changedProperties: [] +- metadata: + Microsoft.DSC: + duration: PT0.0549784S + name: Managed key + type: Microsoft.Windows/Registry + result: + beforeState: + keyPath: HKCU\DscExamples\ManagedKey + _exist: false + afterState: + keyPath: HKCU\DscExamples\ManagedKey + changedProperties: + - _exist +messages: [] +hadErrors: false +``` + +Review the individual results to understand how the resource modified the system to enforce the +desired state for each instance. + +The result for the assertion instance, named `Assert pending reboot`, was: + +```yaml +beforeState: +- name: Check pending reboot + type: Microsoft.Windows/RebootPending + result: + actualState: + rebootPending: false +afterState: +- metadata: + Microsoft.DSC: + duration: PT0.5209322S + name: Check pending reboot + type: Microsoft.Windows/RebootPending + result: + desiredState: + rebootPending: false + actualState: + rebootPending: false + inDesiredState: true + differingProperties: [] +changedProperties: [] +``` + +The output indicates the assertion passed and no changes were needed. + +The result for the registry key instance, named `Managed key`, was: + +```yaml +beforeState: + keyPath: HKCU\DscExamples\ManagedKey + _exist: false +afterState: + keyPath: HKCU\DscExamples\ManagedKey +changedProperties: +- _exist +``` + +The output indicates that the resource created the registry key. + +## Cleanup + +To return your system to its original state: + +1. Save the following configuration as `registry.cleanup.config.dsc.yaml`. + + :::code language="yaml" source="../../Registry/examples/registry.cleanup.config.dsc.yaml"::: + +1. Use the **Set** operation on the cleanup configuration document. + + ```powershell + dsc config set --file ./registry.cleanup.config.dsc.yaml + ``` + + +[01]: ../../../../../cli/config/test.md +[02]: ../../../../../cli/config/set.md \ No newline at end of file diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/index.md new file mode 100644 index 0000000..86823ea --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/RebootPending/index.md @@ -0,0 +1,182 @@ +--- +description: Microsoft.Windows/RebootPending resource reference documentation +ms.date: 07/03/2025 +ms.topic: reference +title: Microsoft.Windows/RebootPending +--- + +# Microsoft.Windows/RebootPending + +## Synopsis + +Checks if a Windows system has a pending reboot. + +> [!IMPORTANT] +> The `Microsoft.Windows/RebootPending` resource are a proof-of-concept example for use with DSC. +> Don't use it in production. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [Windows] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/RebootPending + properties: {} +``` + +## Description + +The `Microsoft.Windows/RebootPending` resource enables you to check whether a Windows system has a +pending reboot. The resource can determine if a system reboot is required due to: + +- Windows Updates +- Component-Based Servicing +- Pending file rename operations +- Pending computer rename +- Pending domain join operations + +> [!NOTE] +> This resource is installed with DSC itself on Windows systems. +> +> You can update this resource by updating DSC. When you update DSC, the updated version of this +> resource is automatically available. + +## Requirements + +- The resource is only usable on a Windows system. +- The resource must run in a process context that has permissions to query the system for reboot + status. + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the pending reboot status of a system. + +This resource doesn't implement the **Set**, **WhatIf**, **Export**, **Delete**, or **Test** +capabilities. You can't use this resource to enforce or export configurations. + +Note that even though this resource doesn't implement **Test**, you can still invoke the test +operation against this resource. This resource relies on the synthetic testing provided by DSC. + +For more information about resource capabilities, see [DSC resource capabilities][02]. + +## Examples + +1. [Check for pending reboot][04] - Shows how to check if a system has a pending reboot using the + `dsc resource get` command. +2. [Use the RebootPending resource in a configuration][05] - Shows how to include the RebootPending + resource in a configuration document to check reboot status. + +## Properties + +The resource doesn't have any configurable properties. It's a read-only resource designed to detect +a system's reboot status. + +- **Read-only properties:** The resource returns the following + properties. For more information about read-only properties, see the "Read-only resource + properties" section in [DSC resource properties][03]. + + - [rebootPending](#rebootpending) - Indicates whether the system has a pending reboot. + +### rebootPending + +
Expand for rebootPending property metadata + +```yaml +Type : boolean +IsRequired : false +IsKey : false +IsReadOnly : true +IsWriteOnly : false +``` + +
+ +A boolean value that indicates whether the system has a pending reboot. This property is `true` if +a reboot is pending and otherwise `false`. + +### Reason + +
Expand for reason property metadata + +```yaml +Type : array, null +IsRequired : false +IsKey : false +IsReadOnly : true +IsWriteOnly : false +``` + +
+ +An array of strings that provides detailed information about why a reboot is pending, or `null` if +no reboot is pending. When a reboot is required, this property contains specific reasons such as: + +- Windows Updates requiring restart +- Component-Based Servicing operations +- Pending file rename operations +- Computer rename pending +- Domain join operations pending + +## Instance validating schema + +The following snippet contains the JSON Schema that validates an instance of the resource. + +```json +{ + "type": "object", + "properties": { + "rebootPending": { + "type": "boolean", + "readOnly": true + }, + "reasons": { + "type": [ + "array", + "null" + ], + "readOnly": true + } + } +} +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. + +### Exit code 1 + +Indicates the resource operation failed. + +## See also + +- [Microsoft.Windows/Registry resource][01] +- [DSC resource capabilities][02] +- [DSC resource properties][03] +- [Check for pending reboot][04] +- [Use the RebootPending resource in a configuration][05] + + +[01]: ../registry/index.md +[02]: ../../../../../concepts/resources/capabilities.md +[03]: ../../../../../concepts/resources/properties.md +[04]: ./examples/check-for-pending-reboot.md +[05]: ./examples/use-rebootpending-in-configuration.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/Registry/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/Registry/index.md index 55d450d..2fa3c9f 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/Registry/index.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/Registry/index.md @@ -1,6 +1,6 @@ --- description: Microsoft.Windows/Registry resource reference documentation -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: Microsoft.Windows/Registry --- @@ -167,7 +167,7 @@ The default value for this property when not specified for an instance is `true`
Expand for valueData property metadata ```yaml -Type : object +Type : [object, 'null'] IsRequired : false IsKey : false IsReadOnly : false @@ -179,10 +179,14 @@ MaximumPropertyCount : 1
-Defines the data for the registry value. If specified, this property must be an object with a -single property. The property name defines the data type. The property value defines the data -value. When the instance defines this property, the `valueName` property must also be defined. An -instance that defines `valueData` without `valueName` is invalid. +Defines the data for the registry value. If you specify the `valueName`property without +`valueData`, the resource sets the value to `RZ_NONE`. + +When the instance defines this property, the `valueName` property must also be defined. An instance +that defines `valueData` without `valueName` is invalid. + +If specified, this property must be an object with a single property. The property name defines the +data type. The property value defines the data value. `valueData` has the following properties: @@ -195,8 +199,7 @@ instance that defines `valueData` without `valueName` is invalid. - [DWord](#dword-valuedata) - Defines the value as a 32-bit unsigned integer (`REG_DWORD`). - [QWord](#qword-valuedata) - Defines the value as a 64-bit unsigned integer (`REG_QWORD`). -For more information on registry value data types, see -[Registry value types][09]. +For more information on registry value data types, see [Registry value types][09]. #### String valueData @@ -343,7 +346,7 @@ operation without the `--what-if` flag. The following snippet contains the JSON Schema that validates an instance of the resource. The validating schema only includes schema keywords that affect how the instance is validated. All -nonvalidating keywords are omitted. +non validating keywords are omitted. ```json { diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/logicaldisk.config.dsc.yaml b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/logicaldisk.config.dsc.yaml new file mode 100644 index 0000000..d0a4bfd --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/logicaldisk.config.dsc.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: + - name: List logical disk information + type: root.cimv2/Win32_LogicalDisk + properties: + Name: + Description: + Status: diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/query-filtered-disk-info.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/query-filtered-disk-info.md new file mode 100644 index 0000000..f1c70a3 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/query-filtered-disk-info.md @@ -0,0 +1,121 @@ +--- +description: > + Example showing how to use the Microsoft.Windows/WMI resource adapter to query + disk information with filtering using the Win32_LogicalDisk class. +ms.date: 07/03/2025 +ms.topic: reference +title: Query filtered disk information using WMI adapter +--- + +# Query filtered disk information using WMI adapter + +This example demonstrates how to use the `Microsoft.Windows/WMI` resource adapter to query disk +information from a computer using the Win32_LogicalDisk WMI class with filtering to get only +specific drives using a configuration document. + +## Definition + +The configuration document for this example defines one instances of the `Win32_LogicalDisk` resource. + +The instance defines the properties to return in the output. + +:::code language="yaml" source="logicaldisk.config.dsc.yaml"::: + +Copy the configuration document and save it as `logicaldisk.config.dsc.yaml`. + +Before using the [dsc config get][01] command, the following section illustrates how you +can retrieve the available `Win32_LogicalDisk` properties. + +## List available disk properties + +To list out only the `Win32_LogicalDisk` WMI class, you can run the following command: + +```powershell +dsc resource list --adapter Microsoft.Windows/WMI root.cimv2/Win32_LogicalDisk | +ConvertFrom-Json | +Select-Object -ExpandProperty properties +``` + +DSC returns the following information: + +```text +Caption +Description +InstallDate +Name +Status +Availability +ConfigManagerErrorCode +ConfigManagerUserConfig +CreationClassName +DeviceID +ErrorCleared +ErrorDescription +LastErrorCode +PNPDeviceID +PowerManagementCapabilities +PowerManagementSupported +StatusInfo +SystemCreationClassName +SystemName +Access +BlockSize +ErrorMethodology +NumberOfBlocks +Purpose +FreeSpace +Size +Compressed +DriveType +FileSystem +MaximumComponentLength +MediaType +ProviderName +QuotasDisabled +QuotasIncomplete +QuotasRebuilding +SupportsDiskQuotas +SupportsFileBasedCompression +VolumeDirty +VolumeName +VolumeSerialNumber +``` + +## Query disk information with filtering + +To retrieve disk information with filtering, you can create a configuration file in YAML format and +use it with the `dsc config get` command. + +```powershell +dsc config get --file ./logicaldisk.config.dsc.yaml +``` + +```yaml +metadata: + Microsoft.DSC: + version: 3.1.0 + operation: get + executionType: actual + startDatetime: 2025-06-21T15:17:44.158969400+02:00 + endDatetime: 2025-06-21T15:17:54.213683700+02:00 + duration: PT10.0547143S + securityContext: restricted +results: +- metadata: + Microsoft.DSC: + duration: PT5.9959229S + name: List logical disk information + type: root.cimv2/Win32_LogicalDisk + result: + actualState: + Description: Local Fixed Disk + Name: 'C:' + Status: null +messages: [] +hadErrors: false +``` + +This configuration will return only the specified properties for each fixed disk. + + +[01]: ../../../../../cli/config/get.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/query-operating-system-info.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/query-operating-system-info.md new file mode 100644 index 0000000..dd19544 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/examples/query-operating-system-info.md @@ -0,0 +1,50 @@ +--- +description: > + Example showing how to use the Microsoft.Windows/WMI resource adapter to query + system information using the Win32_ComputerSystem class. + +ms.date: 07/03/2025 +ms.topic: reference +title: Query system information using WMI adapter +--- + +# Query system information using WMI adapter + +This example demonstrates how to use the `Microsoft.Windows/WMI` resource adapter to query basic +system information from a computer using the Win32_ComputerSystem WMI class. + +## List available system properties + +First, you can discover the available properties for the Win32_ComputerSystem class by running: + +```powershell +dsc resource list --adapter Microsoft.Windows/WMI +``` + +To list out only one WMI class, you can run the follwoing command: + +```powershell +dsc resource list --adapter Microsoft.Windows/WMI root.cimv2/Win32_ComputerSystem +``` + +DSC returns the following information: + +```text +Type Kind Version Capabilities RequireAdapter Description +---------------------------------------------------------------------------------------------------- +root.cimv2/Win32_ComputerSystem Resource gs--t--- Microsoft.Windows/WMI +``` + +## Query the operating system info + +To retrieve basic system information, the following snippets shows how you can use the resource +with [dsc resource get][01] command: + +```powershell +dsc resource get --resource root.cimv2/Win32_ComputerSystem +``` + +This command returns a JSON object containing information about the computer system. + + +[01]: ../../../../../cli/resource/get.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/index.md new file mode 100644 index 0000000..20814b3 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WMI/index.md @@ -0,0 +1,195 @@ +--- +description: Microsoft.Windows/WMI resource adapter reference documentation +ms.date: 07/03/2025 +ms.topic: reference +title: Microsoft.Windows/WMI +--- + +# Microsoft.Windows/WMI + +## Synopsis + +Adapter for querying and retrieving information from Windows Management Instrumentation (WMI). + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [windows, wmi] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/WMI + properties: + # Required properties + resources: + - name: + type: / + properties: # adapted resource properties +``` + +## Implicit adapted instance definition syntax + +```yaml +resources: +- name: + type: / + properties: # adapted resource properties + +``` + +## Description + +The `Microsoft.Windows/WMI` resource adapter enables you to query and retrieve information +from Windows Management Instrumentation (WMI). The resource can: + +- Execute WMI queries to retrieve system information +- Filter WMI query results based on specific conditions +- Access data from different WMI namespaces + +The adapter leverages PowerShell commands to retrieve and list information of WMI classes. + +## Requirements + +- The resource is only usable on a Windows system. +- The resource must run in a process context that has appropriate permissions to access WMI. + +## Capabilities + +The resource adapter has the following capabilities: + +- `get` - You can use the resource to retrieve information from WMI. +- `list` - Lists available WMI classes that can be queried. + +## Examples + +1. [Query Operating System Information][01] - Shows how to query basic operating system information +1. [Query Filtered Disk Information][02] - Shows how to query disk drives with filtering + +## Properties + +## Property schema + +WMI properties aren't exposed directly to a schema. To discover the available properties for a WMI +class that you can use in your configuration, run the following PowerShell command: + +```powershell +dsc resource list --adapter Microsoft.Windows/WMI / | + ConvertFrom-Json | + Select-Object properties +``` + +When defining a configuration document, the following properties are required. + +### resources + +The `resources` property defines a list of adapted WMI class instances that the adapter manages. +Every instance in the list must be unique, but instances may share the same DSC resource type. + +For more information about defining a valid adapted resource instance, see the +[Adapted resource instances](#adapted-resource-instances) section of this document. + +```yaml +Type: array +Required: true +MinimumItemCount: 1 +ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.resource.json +``` + +## Adapted resource instances + +Adapted resources instances always adhere to the +[DSC Configuration document resource instance schema](../../../../schemas/config/resource.md). + +Every adapted instance must be an object that defines the [name](#adapted-instance-name), +[type](#adapted-instance-type), and [properties](#adapted-instance-properties) for the instance. + +### Adapted instance name + +The `name` property of the adapted resource instance defines the short, human-readable name for the +instance. The adapted instance name must be a non-empty string containing only letters, numbers, +and spaces. This property should be unique within the adapter's `resources` array. + +> ![NOTE] +> The adapter doesn't currently raise an error when you define two adapted instances with the same +> name. In a future release, the adapter will be updated to emit a warning when adapted instances +> share the same name. In the next major version of the adapter, name conflicts will raise an +> error. +> +> Using the same name for multiple instances can make debugging and reviewing output more +> difficult. Always use unique names for every instance. + +```yaml +PropertyName: name +Type: string +Required: true +MinimumLength: 1 +Pattern: ^[a-zA-Z0-9 ]+$ +``` + +### Adapted instance type + +The `type` property identifies the adapted instance's WMI class resource. The value for this +property must be the valid fully qualified type name for the resource. + +This adapter uses the following syntax for determining the fully qualified type name of a WMI class: + +```Syntax +/ +``` + +For example, if a WMI class named `Win32_OperatingSystem`, the fully qualified type name for that +resource is `root.cimv2/Win32_OperatingSystem`. + +For more information about type names in DSC, see +[DSC Resource fully qualified type name schema reference][03]. + +```yaml +Type: string +Required: true +Pattern: ^\w+(\.\w+){0,2}\/\w+$ +``` + +### Adapted instance properties + +The `properties` of an adapted resource instance define its desired state. The value of this +property must be an object. In case of the WMI adapter resource, properties are added at runtime +when the adapter tries to execute. + +Each name for each property returns the filtered state. The property name isn't case sensitive. + +[!NOTE] +> The current WMI adapter doesn't warn or raise an error when an invalid property is passed. + +```yaml +Type: object +Required: true +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. + +### Exit code 1 + +Indicates the resource operation failed because the WMI query could not be executed successfully. +When the resource returns this exit code, it also emits an error message with details about the +failure. + + +[01]: ./examples/query-operating-system-info.md +[02]: ./examples/query-filtered-disk-info.md +[03]: ../../../../schemas/definitions/resourceType.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WindowsPowerShell/examples/manage-a-windows-service.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WindowsPowerShell/examples/manage-a-windows-service.md new file mode 100644 index 0000000..13a9e11 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WindowsPowerShell/examples/manage-a-windows-service.md @@ -0,0 +1,236 @@ +--- +description: > + Examples showing how you can invoke the Microsoft.Windows/WindowsPowerShell with DSC to manage + a Windows service using the PSDesiredStateConfiguration module. +ms.date: 07/03/2025 +ms.topic: reference +title: Manage a Windows service +--- + +# Manage a Windows service + +This example shows how you can use the `Microsoft.Windows/WindowsPowerShell` resource with the +`PSDesiredStateConfiguration` module to manage a Windows service. These examples manage the +`Spooler` print spooler service. + +> [!NOTE] +> Run this example in an elevated PowerShell session with `dsc.exe` version 3.1.0 or later. + +## Test whether a service is running + +The following snippet shows how you can use the resource with the [dsc resource test][01] command +to check whether the `Spooler` service is running. + +```powershell +$instance = @{ + Name = 'Spooler' + StartupType = 'Automatic' +} | ConvertTo-Json + +dsc resource test --resource PSDesiredStateConfiguration/Service --input $instance +``` + +When the service isn't running or has a different startup type, DSC returns the following result: + +```yaml +desiredState: + Name: Spooler + StartupType: Manual +actualState: + InDesiredState: false +inDesiredState: false +differingProperties: +- StartupType +``` + +The `inDesiredState` field of the result object is set to `false`, indicating that the instance +isn't in the desired state. The `differingProperties` field indicates that the `property` property +is mismatched between the desired state and actual state. + +## Ensure a service is running with automatic startup + +To set the system to the desired state and configure the service, use the [dsc resource set][02] +command. + +```powershell +dsc resource set --resource PSDesiredStateConfiguration/Service --input $instance +``` + +When the resource configures the service, DSC returns the following result: + +```yaml +beforeState: + Status: null + Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers. + DisplayName: Print Spooler + ResourceId: null + PsDscRunAsCredential: null + Name: Spooler + Credential: null + PSComputerName: localhost + ConfigurationName: null + Ensure: null + DependsOn: null + SourceInfo: null + BuiltInAccount: LocalSystem + StartupType: Manual + State: Running + ModuleVersion: '1.1' + ModuleName: PSDesiredStateConfiguration + Path: C:\WINDOWS\System32\spoolsv.exe + Dependencies: + - RPCSS + - http +afterState: + Status: null + Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers. + DisplayName: Print Spooler + ResourceId: null + PsDscRunAsCredential: null + Name: Spooler + Credential: null + PSComputerName: localhost + ConfigurationName: null + Ensure: null + DependsOn: null + SourceInfo: null + BuiltInAccount: LocalSystem + StartupType: Automatic + State: Running + ModuleVersion: '1.1' + ModuleName: PSDesiredStateConfiguration + Path: C:\WINDOWS\System32\spoolsv.exe + Dependencies: + - RPCSS + - http +changedProperties: +- StartupType +``` + +You can test the instance again to confirm that the service is configured correctly: + +```powershell +dsc resource test --resource PSDesiredStateConfiguration/Service --input $instance +``` + +```yaml +desiredState: + Name: Spooler + StartupType: Manual +actualState: + InDesiredState: true +inDesiredState: true +differingProperties: [] +``` + +## Stop a service + +The following snippet shows how you can configure the `Spooler` service to be stopped with manual +startup. + +```powershell +$stopInstance = @{ + Name = 'Spooler' + State = 'Stopped' + StartupType = 'Manual' +} | ConvertTo-Json + +dsc resource set --resource PSDesiredStateConfiguration/Service --input $stopInstance +``` + +When the resource stops the service, DSC returns the following result: + +```yaml +beforeState: + Status: null + Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers. + DisplayName: Print Spooler + ResourceId: null + PsDscRunAsCredential: null + Name: Spooler + Credential: null + PSComputerName: localhost + ConfigurationName: null + Ensure: null + DependsOn: null + SourceInfo: null + BuiltInAccount: LocalSystem + StartupType: Manual + State: Running + ModuleVersion: '1.1' + ModuleName: PSDesiredStateConfiguration + Path: C:\WINDOWS\System32\spoolsv.exe + Dependencies: + - RPCSS + - http +afterState: + Status: null + Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers. + DisplayName: Print Spooler + ResourceId: null + PsDscRunAsCredential: null + Name: Spooler + Credential: null + PSComputerName: localhost + ConfigurationName: null + Ensure: null + DependsOn: null + SourceInfo: null + BuiltInAccount: LocalSystem + StartupType: Manual + State: Stopped + ModuleVersion: '1.1' + ModuleName: PSDesiredStateConfiguration + Path: C:\WINDOWS\System32\spoolsv.exe + Dependencies: + - RPCSS + - http +changedProperties: +- State +``` + +## Verify the current state of a service + +To check the current state of the service, use the `dsc resource get` command. + +```powershell +dsc resource get --resource PSDesiredStateConfiguration/Service --input $instance +``` + +```yaml +actualState: + Status: null + Description: This service spools print jobs and handles interaction with the printer. If you turn off this service, you won't be able to print or see your printers. + DisplayName: Print Spooler + ResourceId: null + PsDscRunAsCredential: null + Name: Spooler + Credential: null + PSComputerName: localhost + ConfigurationName: null + Ensure: null + DependsOn: null + SourceInfo: null + BuiltInAccount: LocalSystem + StartupType: Manual + State: Stopped + ModuleVersion: '1.1' + ModuleName: PSDesiredStateConfiguration + Path: C:\WINDOWS\System32\spoolsv.exe + Dependencies: + - RPCSS + - http +``` + +## Restore the original service configuration + +If you want to restore the service to its original running state, you can reapply the first +configuration. + +```powershell +dsc resource set --resource Microsoft.Windows/WindowsPowerShell --input $instance +``` + + +[01]: ../../../../../cli/resource/test.md +[02]: ../../../../../cli/resource/set.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WindowsPowerShell/index.md b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WindowsPowerShell/index.md new file mode 100644 index 0000000..f6ae961 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/resources/Microsoft/Windows/WindowsPowerShell/index.md @@ -0,0 +1,266 @@ +--- +description: Microsoft.Windows/WindowsPowerShell resource adapter reference documentation +ms.date: 07/03/2025 +ms.topic: reference +title: Microsoft.Windows/WindowsPowerShell +--- + +# Microsoft.Windows/WindowsPowerShell + +## Synopsis + +Adapter for resources implemented as binary, script or PowerShell classes. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [windows, powershell] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/WindowsPowerShell + properties: + # Required properties + resources: + - name: + type: / + properties: # adapted resource properties +``` + +## Implicit adapted instance definition syntax + +```yaml +resources: +- name: + type: / + properties: # adapted resource properties +``` + +## Description + +The `Microsoft.Windows/WindowsPowerShell` resource adapter enables you to invoke and discover PSDSC +resources. The resource can: + +- Execute script-based DSC resources +- Run class-based DSC resource methods +- Execute binary DSC resources + +The adapter manages the PSDSC resources in Windows PowerShell, not PowerShell. To use PowerShell +classes in PowerShell, use the [Microsoft.DSC/PowerShell](../../dsc/powershell/index.md) adapter. + +This adapter uses the **PSDesiredStateConfiguration** module v1.1. This module is built-in when you +install Windows and is located in `%SystemRoot%\System32\WindowsPowerShell\v1.0\Modules` + +### PowerShell resource adapter cache + +The process for discovering the Windows PowerShell resources available to the adapter can be +time-consuming. To improve performance, the adapter caches Windows PowerShell resources and modules +during discovery. If the cache doesn't exist during discovery, the adapter creates it. + +The location of the cache depends on your operating system. The following table defines the path +for the Windows platform. + +| Platform | Path | +| :------: | :---------------------------------------------- | +| Windows | `%LOCALAPPDATA%\dsc\WindowsPSAdapterCache.json` | + +The adapter versions the cache. The current version is `1`. If the version of the cache on a +machine differs from the current version, the adapter refreshes the cache. + +The adapter checks whether the cache is stale on each run and refreshes it if: + +- The `PSModulePath` environmental variable is updated. +- Any module is added or removed from the `PSModulePath`. +- Any related file in a cached PSDSC resource module has been updated since the cache was written. + The adapter watches the `LastWriteTime` property of module files with the following extensions: + `.ps1`, `.psd1`, and `.psm1`. + +You can directly call the adapter script to clear the cache with the **Operation** parameter value +set to `ClearCache`: + +```powershell +$adapterScript = dsc resource list Microsoft.Windows/WindowsPowerShell | + ConvertFrom-Json | + Select-Object -ExpandProperty directory | + Join-Path -ChildPath 'psDscAdapter\powershell.resource.ps1' + +& $adapterScript -Operation ClearCache +``` + +## Requirements + +- The resource is only usable on a Windows system. +- The resource must run in a process context that has appropriate permissions for the DSC resource + to be executed. +- The PowerShell modules exposing DSC resources should be installed in + `%PROGRAMFILES%\WindowsPowerShell\Modules` or + `%SystemRoot%\System32\WindowsPowerShell\v1.0\Modules` + +## Capabilities + +The resource adapter has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of a DSC resource instance. +- `set` - You can use the resource to enforce the desired state for a DSC resource instance. +- `test` - You can use the resource to determine whether a DSC resource instance is in the desired + state. +- `export` - You can use the resource to discover and enumerate DSC resource instances currently + installed and available on the system. +- `list` - Lists available PowerShell DSC resources on your system that can be used with `dsc.exe`. + +> [!NOTE] +> The `export` capability is only available with class-based DSC resources. +> Script-based and binary DSC resources do not support the export operation. + +## Examples + +1. [Manage a Windows Service][01] - Shows how to manage a Windows service + +## Properties + +Unlike standard resources, the `Microsoft.Windows/WindowsPowerShell` resource adapter doesn't have +directly exposed properties in its schema because it acts as a bridge to PowerShell DSC resource. +Instead, the adapter: + +1. Dynamically discovers the property schema for each PowerShell DSC resource +1. Stores the schema properties in a cache file for improved performance in subsequent operations +1. Passes properties to the underlying PowerShell DSC resource + +The adapter maintains a cache of resource schemas at: + +- Windows: `%LOCALAPPDATA%\dsc\WindowsPSAdapterCache.json` + +To list the schema properties for a PowerShell DSC resource, you can run the following command: + +```powershell +dsc resource list --adapter Microsoft.Windows/WindowsPowerShell / | + ConvertFrom-Json | + Select-Object properties +``` + +You can also retrieve more information by directly reading it from the cache file: + +```powershell +$cache = Get-Content -Path "$env:LOCALAPPDATA\dsc\WindowsPSAdapterCache.json" | + ConvertFrom-Json + +($cache.ResourceCache | Where-Object -FilterScript { $_.type -eq '/' }).DscResourceInfo.Properties +``` + +When defining a configuration document, the following properties are required. + +### resources + +The `resources` property defines a list of adapted PSDSC resource instances that the adapter +manages. Every instance in the list must be unique, but instances may share the same DSC resource +type. + +For more information about defining a valid adapted resource instance, see the +[Adapted resource instances](#adapted-resource-instances) section of this document. + +```yaml +Type: array +Required: true +MinimumItemCount: 1 +ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.resource.json +``` + +## Adapted resource instances + +Adapted resources instances always adhere to the +[DSC Configuration document resource instance schema](../../../../schemas/config/resource.md). + +Every adapted instance must be an object that defines the [name](#adapted-instance-name), +[type](#adapted-instance-type), and [properties](#adapted-instance-properties) for the instance. + +### Adapted instance name + +The `name` property of the adapted resource instance defines the short, human-readable name for the +instance. The adapted instance name must be a non-empty string containing only letters, numbers, +and spaces. This property should be unique within the adapter's `resources` array. + +> ![NOTE] +> The adapter doesn't currently raise an error when you define two adapted instances with the same +> name. In a future release, the adapter will be updated to emit a warning when adapted instances +> share the same name. In the next major version of the adapter, name conflicts will raise an +> error. +> +> Using the same name for multiple instances can make debugging and reviewing output more +> difficult. Always use unique names for every instance. + +```yaml +PropertyName: name +Type: string +Required: true +MinimumLength: 1 +Pattern: ^[a-zA-Z0-9 ]+$ +``` + +### Adapted instance type + +The `type` property identifies the adapted instance's PSDSC Resource. The value for this property +must be the valid fully qualified type name for the resource. + +This adapter uses the following syntax for determining the fully qualified type name of a PSDSC +resource implemented as a Windows PowerShell script-based: + +```Syntax +/ +``` + +For example, if a PowerShell module named **TailspinToys** has a script-based PSDSC resource named +`TSToy`, the fully qualified type name for that resource is `TailspinToys/TSToy`. + +For more information about type names in DSC, see +[DSC Resource fully qualified type name schema reference][02]. + +```yaml +Type: string +Required: true +Pattern: ^\w+(\.\w+){0,3}\/\w+$ +``` + +### Adapted instance properties + +The `properties` of an adapted resource instance define its desired state. The value of this +property must be an object. The specified properties are validated at runtime when the adapter +tries to invoke the adapted PSDSC resource instance. This adapter doesn't support static linting +for adapted instance properties in a configuration document. + +Each name for each property must be a configurable property of the PSDSC resource. The property +name isn't case sensitive. The value for each property must be valid for that property. If you +specify an invalid property name or value, the adapter raises an error when it tries to invoke the +resource. + +```yaml +Type: object +Required: true +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. + +### Exit code 1 + +Indicates the resource operation failed because the underlying DSC resource method or +`Invoke-DscResource` call did not succeed. When the resource returns this exit code, it also emits +an error message with details about the failure. + + +[01]: ./examples/manage-a-windows-service.md +[02]: ../../../../schemas/definitions/resourceType.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/document.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/document.md index 758257f..c41774a 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/document.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/document.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a Desired State Configuration document. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Configuration document schema reference --- @@ -15,7 +15,7 @@ The YAML or JSON file that defines a DSC Configuration. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.json Type: object ``` @@ -29,7 +29,14 @@ A configuration document can be defined as either YAML or JSON. For ease of auth recommends drafting configuration documents in YAML. For DSC's authoring tools to recognize a file as a DSC Configuration document, the filename must -end with `.dsc.config.json`, `.dsc.config.yml`, or `.dsc.config.yaml`. +end with one of the following: + +- `.dsc.config.json` +- `.dsc.config.yml` +- `.dsc.config.yaml`. +- `.dsc.json` +- `.dsc.yml` +- `.dsc.yaml` You can use configuration document functions to dynamically determine values in the document at 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 Every configuration document must include these properties: -- [$schema] -- [resources] +- [$schema](#schema) +- [resources](#resources) ## Properties ### $schema -The `$schema` property indicates the canonical URL of the version of this schema that the document -adheres to. DSC uses this property when validating the configuration document before any -configuration operations. - -There are currently 3 published versions of the schema, compatible with different versions of DSC: - -- `2024/04` is the latest version of the schema, compatible with DSC version 3.0.0-preview.7 and - later. -- `2023/10` is the previous version of the schema, compatible with DSC versions `3.0.0-alpha.4` and - `3.0.0-alpha.5`. -- `2023/08` is the first version of the schema, compatible with DSC versions `3.0.0-alpha.1` through - `3.0.0-alpha.3`. +The `$schema` property indicates the URI that resolves to the version of this schema that the +document adheres to. DSC uses this property when validating and processing the configuration +document. -This documentation is for the latest version of the schema. You should update your configuration -documents and resource manifests to the latest version of the schema. Prior versions don't work -with new releases of DSC. The schemas remain published, but won't get any updates. +The JSON schemas for DSC are published in multiple versions and forms. This documentation is for +the latest version of the schema. As a convenience, you can specify either the full URI for the +schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema for a specific +semantic version, the latest schema for a minor version, or the latest schema for a major version +of DSC. For more information about schema URIs and versioning, see +[DSC JSON Schema URIs](../schema-uris.md). For every version of the schema, there are three valid urls: @@ -79,12 +80,12 @@ For every version of the schema, there are three valid urls: - `.../bundled/config/document.json` - The URL to the bundled schema. When it's used for validation, the validating client only needs to - retrieve this schema. + The URL to the canonically bundled schema. When it's used for validation, the validating client + only needs to retrieve this schema. This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can still - validate the document when it uses this schema, other tools might error or behave in unexpected - ways. + validate the document when it uses this schema, other tools may error or behave in unexpected + ways if they don't fully support the 2020-12 specification. - `.../bundled/config/document.vscode.json` @@ -93,22 +94,55 @@ For every version of the schema, there are three valid urls: don't include. This schema uses keywords that are only recognized by VS Code. While DSC can still validate the - document when it uses this schema, other tools might error or behave in unexpected ways. + document when it uses this schema, other tools may error or behave in unexpected ways. ```yaml Type: string Required: true Format: URI ValidValues: [ - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/config/document.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/config/document.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/config/document.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3/config/document.json + https://aka.ms/dsc/schemas/v3/bundled/config/document.json + https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3.1/config/document.json + https://aka.ms/dsc/schemas/v3.1/bundled/config/document.json + https://aka.ms/dsc/schemas/v3.1/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3.1.0/config/document.json + https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.json + https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3.0/config/document.json + https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json + https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3.0.2/config/document.json + https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json + https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3.0.1/config/document.json + https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json + https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json + https://aka.ms/dsc/schemas/v3.0.0/config/document.json + https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json + https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json ] ``` @@ -130,7 +164,7 @@ defined as key-value pair. The key for each pair defines the name of the paramet each pair must be an object that defines the `type` keyword to indicate how DSC should process the parameter. -You can override parameters at run-time, enabling re-use of the same configuration document for +Parameters may be overridden at run-time, enabling re-use of the same configuration document for different contexts. For more information about defining parameters in a configuration, see @@ -142,7 +176,7 @@ For more information about defining parameters in a configuration, see ```yaml Type: object Required: false -ValidPropertySchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.parameter.json +ValidPropertySchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.parameter.json ``` ### variables @@ -165,9 +199,8 @@ Required: false ### resources -The `resources` property defines a list of DSC resource instances that the configuration document -manages. Every instance in the list must be unique, but instances might share the same DSC resource -type. +The `resources` property defines a list of DSC Resource instances that the configuration manages. +Every instance in the list must be unique, but instances may share the same DSC Resource type. For more information about defining a valid resource instance in a configuration, see [DSC Configuration document resource schema][05]. @@ -179,7 +212,7 @@ For more information about defining a valid resource instance in a configuration Type: array Required: true MinimumItemCount: 1 -ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.resource.json +ValidItemSchema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.resource.json ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/add.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/add.md index 2d1b36b..0c65e7d 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/add.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/add.md @@ -1,6 +1,6 @@ --- description: Reference for the 'add' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: add --- @@ -30,22 +30,22 @@ This example document shows how you can use the `add()` function to return the s ```yaml # add.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Sum of 3 and 5 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[add(3, 5)]" ``` ```bash -dsc config get --document add.example.1.dsc.config.yaml +dsc config get --file add.example.1.dsc.config.yaml ``` ```yaml results: - name: Sum of 3 and 5 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 8 @@ -60,22 +60,22 @@ configuration functions that return integer values. ```yaml # add.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Add nested function outputs - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[add(mul(2,3), div(6,3))]" ``` ```bash -dsc config get --document add.example.2.dsc.config.yaml +dsc config get --file add.example.2.dsc.config.yaml ``` ```yaml results: - name: Add nested function outputs - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 8 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/base64.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/base64.md index 46b8ef9..3d51e71 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/base64.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/base64.md @@ -1,6 +1,6 @@ --- description: Reference for the 'base64' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: base64 --- @@ -31,22 +31,22 @@ The configuration converts a basic string value with the `base64()` function. ```yaml # base64.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo 'abc' in base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[base64('abc')]" ``` ```bash -dsc --input-file base64.example.1.dsc.config.yaml config get +dsc --file base64.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Echo 'abc' in base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: YWJj @@ -61,22 +61,22 @@ strings `a`, `b`, and `c` into `abc` before returning the base64 representation. ```yaml # base64.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo concatenated 'a', 'b', 'c' in base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[base64(concat('a', 'b', 'c'))]" ``` ```bash -dsc --input-file base64.example.2.dsc.config.yaml config get +dsc --file base64.example.2.dsc.config.yaml config get ``` ```yaml results: - name: Echo concatenated 'a', 'b', 'c' in base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: YWJj diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/concat.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/concat.md index 27a1048..409edc0 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/concat.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/concat.md @@ -1,6 +1,6 @@ --- description: Reference for the 'concat' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: concat --- @@ -35,22 +35,22 @@ The configuration uses the `concat()` function to join the strings `abc` and `de ```yaml # concat.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo 'abcdef' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[concat('abc', 'def')]" ``` ```bash -dsc --input-file concat.example.1.dsc.config.yaml config get +dsc config get --file concat.example.1.dsc.config.yaml ``` ```yaml results: - name: Echo 'abcdef' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: abcdef @@ -64,10 +64,10 @@ The configuration uses the `concat()` function to return a combined array of str ```yaml # concat.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo ['a', 'b', 'c', 'd', 'e', 'f'] - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [concat( @@ -77,13 +77,13 @@ resources: ``` ```bash -dsc config get --document concat.example.2.dsc.config.yaml +dsc config get --file concat.example.2.dsc.config.yaml ``` ```yaml results: - name: Echo ['a', 'b', 'c', 'd', 'e', 'f'] - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/createArray.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/createArray.md index 95cef2d..78a7a97 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/createArray.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/createArray.md @@ -1,6 +1,6 @@ --- description: Reference for the 'createArray' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: createArray --- @@ -33,22 +33,22 @@ example synopsis ```yaml # createArray.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo array of integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[createArray(1, 3, 5)]" ``` ```bash -dsc config get --document createArray.example.1.dsc.config.yaml config get +dsc config get --file createArray.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Echo array of integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: @@ -66,22 +66,22 @@ sub-array contains only integers. The second sub-array contains only strings. ```yaml # createArray.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Create array of arrays - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[createArray(createArray(1,3,5), createArray('a', 'b', 'c'))]" ``` ```bash -dsc config get --document createArray.example.2.dsc.config.yaml +dsc config get --file createArray.example.2.dsc.config.yaml ``` ```yaml results: - name: Create array of arrays - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: @@ -102,10 +102,10 @@ strings. It uses YAML's folded multiline string syntax to make the function more ```yaml # createArray.example.3.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo flattened array - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [concat( @@ -115,13 +115,13 @@ resources: ``` ```bash -dsc config get --document createArray.example.3.dsc.config.yaml +dsc config get --file createArray.example.3.dsc.config.yaml ``` ```yaml results: - name: Echo flattened array - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/div.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/div.md index ef83e21..1eb9681 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/div.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/div.md @@ -1,6 +1,6 @@ --- description: Reference for the 'div' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: div --- @@ -32,22 +32,22 @@ integers. ```yaml # div.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Dividing integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[div(6,3)]" ``` ```bash -dsc config get --document div.example.1.dsc.config.yaml config get +dsc config get --file div.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Dividing integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 2 @@ -63,22 +63,22 @@ full integer value without the remainder. It doesn't round the result up to 3. ```yaml # div.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Dividing nested functions - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[div(mul(7,2), add(4,1))]" ``` ```bash -dsc config get --document div.example.2.dsc.config.yaml +dsc config get --file div.example.2.dsc.config.yaml ``` ```yaml results: - name: Dividing nested functions - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 2 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/envvar.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/envvar.md index 20fbbf2..9e610f9 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/envvar.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/envvar.md @@ -1,6 +1,6 @@ --- description: Reference for the 'envvar' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: envvar --- @@ -31,14 +31,14 @@ commands, DSC automatically creates the `DSC_CONFIG_ROOT` environment variable a the parent folder of the specified configuration document. For more information, see [dsc config command reference][01]. -This configuration echoes that folder with the `Test/Echo` resource. +This configuration echoes that folder with the `Microsoft.DSC.Debug/Echo` resource. ```yaml # ./examples/envvar.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo 'DSC_CONFIG_ROOT' in envvar - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[envvar('DSC_CONFIG_ROOT')]" ``` @@ -50,7 +50,7 @@ dsc config get --path ~/dsc/examples/envvar.example.1.dsc.config.yaml ```yaml results: - name: Echo DSC_CONFIG_ROOT - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: ~/dsc/examples @@ -82,4 +82,4 @@ The `envvar()` function returns the value of the environment variable specified Type: string ``` -[01]: ../../../cli/config/index.md#environment-variables +[01]: ../../../cli/config/command.md#environment-variables diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/equals.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/equals.md new file mode 100644 index 0000000..7dad419 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/equals.md @@ -0,0 +1,183 @@ +--- +description: Reference for the 'equals' DSC configuration document function +ms.date: 07/02/2025 +ms.topic: reference +title: equals +--- + +# equals + +## Synopsis + +Checks whether two values are identical. + +## Syntax + +```Syntax +equals() +``` + +## Description + +The `equals()` function checks whether two values are identical, returning `true` if they are and +otherwise `false`. You can use this function to compare two values of the same data type. If the +values are different types, like a string and an integer, DSC returns `false` for this function. + +## Examples + +### Example 1 - Compare two strings + +The following example shows how you can use the function to compare two strings. + +```yaml +# equals.example.1.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Compare strings + type: Microsoft.DSC.Debug/Echo + properties: + output: + sameCase: "[equals('a', 'a')]" + differentCase: "[equals('a', 'A')]" + differentLetters: "[equals('a', 'b')]" +``` + +```bash +dsc config get --file equals.example.1.dsc.config.yaml +``` + +```yaml +results: +- name: Compare strings + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + sameCase: true + differentCase: false + differentLetters: false +messages: [] +hadErrors: false +``` + +### Example 2 - Compare two integers + +The following example shows how you can use the function to compare two integers. + +```yaml +# equals.example.2.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Compare integers + type: Microsoft.DSC.Debug/Echo + properties: + output: + sameInteger: "[equals(1, 1)]" + differentInteger: "[equals(1, 2)]" +``` + +```bash +dsc config get --file equals.example.2.dsc.config.yaml +``` + +```yaml +results: +- name: Compare integers + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + sameInteger: true + differentInteger: false + sameFloat: true + differentFloat: false + integerAndFloat: ? +messages: [] +hadErrors: false +``` + +### Example 3 - Compare two arrays + +The following example shows how you can use the function to compare two arrays. + +```yaml +# equals.example.3.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Compare arrays + type: Microsoft.DSC.Debug/Echo + properties: + output: + sameStringsAndOrder: >- + [equals( + createArray('a', 'b', 'c'), + createArray('a', 'b', 'c') + )] + sameStringsDifferentOrder: >- + [equals( + createArray('a', 'b', 'c'), + createArray('c', 'b', 'a') + )] + sameNumbers: >- + [equals( + createArray(1, 2, 3), + createArray(1, 2, 3) + )] + sameNestedArrays: >- + [equals( + createArray( + createArray('a', 'b', 'c'), + createArray(1, 2, 3) + ), + createArray( + createArray('a', 'b', 'c'), + createArray(1, 2, 3) + ) + )] +``` + +```bash +dsc config get --file equals.example.3.dsc.config.yaml +``` + +```yaml +results: +- name: Compare arrays + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + sameStringsAndOrder: true + sameStringsDifferentOrder: false + sameNumbers: true + sameNestedArrays: true +messages: [] +hadErrors: false +``` + +## Parameters + +### inputValue + +The `equals()` function expects exactly two input values of the same type. Separate each value with +a comma. If the type of the second input value is different from the first value, DSC returns an +error for the function. + +String comparisons are case-sensitive. Array comparisons are position-sensitive. + +```yaml +Type: [integer, string, object, array] +Required: true +MinimumCount: 2 +MaximumCount: 2 +``` + +## Output + +The `equals()` function returns `true` if the input values are the same and otherwise `false`. + +```yaml +Type: bool +``` + + diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/format.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/format.md new file mode 100644 index 0000000..3b98bc9 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/format.md @@ -0,0 +1,212 @@ +--- +description: Reference for the 'format' DSC configuration document function +ms.date: 07/03/2025 +ms.topic: reference +title: format +--- + +# format + +## Synopsis + +Returns a formatted string that uses placeholders to insert values. + +## Syntax + +```Syntax +format(, , , ...) +``` + +## Description + +The `format()` function returns a string that includes formatted values using a template and +placeholders. Each placeholder in the template string is replaced with the corresponding argument +value. + +### Placeholder syntax + +Placeholders must be defined with the following syntax: + +```Syntax +{[:]} +``` + +Every placeholder must specify the zero-based index of the argument. + +This function supports a subset of format specifiers for controlling how data is formatted in the +string. To use a format specifier, define a placeholder followed by a colon and then a specifier. + +The following table defines the supported format specifiers and the data types they're valid for. +If you use a format specifier with an invalid data type, DSC raises an error. + +| Specifier | Format | Valid Types | +|:---------:|:----------------------|:------------| +| `b` | Binary | `integer` | +| `e` | Lowercase exponential | `integer` | +| `E` | Uppercase exponential | `integer` | +| `o` | Octal | `integer` | +| `e` | Lowercase hexadecimal | `integer` | +| `E` | Uppercase hexadecimal | `integer` | + +## Examples + +### Example 1 - Format a simple string + +The configuration formats a string with two placeholders. + +```yaml +# format.example.1.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: + - name: Echo formatted string + type: Microsoft.DSC.Debug/Echo + properties: + output: "[format('Hello, {0}! Today is {1}.', 'World', 'Monday')]" +``` + +```bash +dsc config get --file format.example.1.dsc.config.yaml +``` + +```yaml +results: +- name: Echo formatted string + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: Hello, World! Today is Monday. +messages: [] +hadErrors: false +``` + +### Example 2 - Format specifiers + +This example demonstrates formatting every supported data type and format specifier. + +```yaml +# format.example.2.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: descriptive resource name + type: Microsoft.DSC.Debug/Echo + properties: + output: + string: "[format('{0} {1}', 'hello', 'world')]" + boolean: "[format('{0} or {1}', true, false)]" + integer: + binary: "[format('{0} => {0:b}', 123)]" + octal: "[format('{0} => {0:o}', 123)]" + lowercaseHex: "[format('{0} => {0:x}', 123)]" + uppercaseHex: "[format('{0} => {0:X}', 123)]" + lowercaseExponent: "[format('{0} => {0:e}', 123)]" + uppercaseExponent: "[format('{0} => {0:E}', 123)]" +``` + +```bash +dsc config get --file format.example.2.dsc.config.yaml +``` + +```yaml +results: +- name: descriptive resource name + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + string: hello world + boolean: true or false + integer: + binary: 1111011 + octal: 173 + lowercaseHex: 7b + uppercaseHex: 7B + lowercaseExponent: 1.23e2 + uppercaseExponent: 1.23E2 +messages: [] +hadErrors: false +``` + +### Example 3 - Format a string with parameters + +The configuration uses other functions within the `format()` function to build a dynamic message. + +```yaml +# format.example.3.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +parameters: + username: + type: string + defaultValue: Mikey + hour: + type: string + defaultValue: "09" + minute: + type: string + defaultValue: "30" +resources: + - name: Echo dynamic formatted string + type: Microsoft.DSC.Debug/Echo + properties: + output: >- + [format( + 'Hello, {0}! The time is {1}:{2}.', + parameters('username'), + parameters('hour'), + parameters('minute') + )] +``` + +```bash +dsc --file format.example.3.dsc.config.yaml config get +``` + +```yaml +results: +- name: Echo dynamic formatted string + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: Hello, Mikey! The time is 09:30. +messages: [] +hadErrors: false +``` + +## Parameters + +### formatString + +The `format()` function requires a template string that includes placeholders for argument values. + +Placeholders use the zero-based index of the function arguments. You can reference the same +argument any number of times. If DSC can't resolve the placeholder index to an argument, DSC raises +an error. + +For more information about the syntax for defining placeholders, see +[Placeholder syntax](#placeholder-syntax). + +```yaml +Type: string +Required: true +MinimumCount: 1 +MaximumCount: 1 +``` + +### arguments + +The function accepts one or more arguments to insert into the formatted string. + +```yaml +Type: [boolean, integer, string] +Required: true +MinimumCount: 1 +MaximumCount: 18446744073709551615 +``` + +## Output + +The `format()` function returns a string where each placeholder in the `formatString` is replaced +with the corresponding argument value. + +```yaml +Type: string +``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/if.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/if.md new file mode 100644 index 0000000..faf1dd7 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/if.md @@ -0,0 +1,110 @@ +--- +description: Reference for the 'if' DSC configuration document function +ms.date: 07/02/2025 +ms.topic: reference +title: if +--- + +# if + +## Synopsis + +Returns a value based on whether a condition is true or false. + +## Syntax + +```Syntax +if(, , ) +``` + +## Description + +The `if()` function returns a value based on whether a condition is true or false. You can use this +function to conditionally use different values in a configuration document. + +## Examples + +### Example 1 - Returning values + +This example shows the returning of values when the conditional evaluates to `true` and `false`. + +```yaml +# if.example.1.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Show return for true and false + type: Microsoft.DSC.Debug/Echo + properties: + output: + whenTrue: "[if(equals('a', 'a'), 1, 2)]" + whenFalse: "[if(equals('a', 'b'), 1, 2)]" +``` + +```bash +dsc config get --file if.example.1.dsc.config.yaml +``` + +```yaml +results: +- name: Show return for true and false + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + whenTrue: 1 + whenFalse: 2 +messages: [] +hadErrors: false +``` + +## Parameters + +### condition + +The `if()` function expects the first parameter to be a boolean value or an expression that +evaluates to a boolean value. When this parameter is `true`, the `if()` function returns the +`trueValue`. When this parameter is `false`, the function returns the `falseValue`. + +```yaml +Type: boolean +Required: true +MinimumCount: 1 +MaximumCount: 1 +``` + +### trueValue + +The `if()` function expects the second parameter to be the value to return when the `condition` +parameter evaluates to `true`. This parameter may be a literal value or an expression that +evaluates to a string, integer, boolean, object, or array value. + +```yaml +Type: [string, int, bool, object, array] +Required: true +MinimumCount: 1 +MaximumCount: 1 +``` + +### falseValue + +The `if()` function expects the third parameter to be the value to return when the `condition` +parameter evaluates to `false`. This parameter may be a literal value or an expression that +evaluates to a string, integer, boolean, object, or array value. + +```yaml +Type: [string, int, bool, object, array] +Required: true +MinimumCount: 1 +MaximumCount: 1 +``` + +## Output + +The function returns either the `trueValue` or `falseValue` depending on whether the `condition` +parameter evaluates to `true` or `false`. + +```yaml +Type: [string, int, bool, object, array] +``` + + diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/int.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/int.md index 2e84dc9..71d4f25 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/int.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/int.md @@ -1,6 +1,6 @@ --- description: Reference for the 'int' DSC configuration document function -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: int --- @@ -31,22 +31,22 @@ This configuration returns an integer, converting the string value `'4.7'` to `4 ```yaml # int.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo integer value - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[int('4.7')]" ``` ```bash -dsc config get --document int.example.1.dsc.config.yaml config get +dsc config get --file int.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Echo integer value of '4.7' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 4 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/max.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/max.md index c9282b7..dc083c7 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/max.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/max.md @@ -1,6 +1,6 @@ --- description: Reference for the 'max' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 02/28/2025 ms.topic: reference title: max --- @@ -30,22 +30,22 @@ This configuration returns the largest number from a list of integers. ```yaml # max.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo maximum value - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[max(3, 2, 5, 1, 7)]" ``` ```bash -dsc config get --document max.example.1.dsc.config.yaml config get +dsc config get --file max.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Echo maximum value - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 7 @@ -61,10 +61,10 @@ function more readable. ```yaml # max.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo integer array - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: - 3 @@ -73,26 +73,26 @@ resources: - 1 - 7 - name: Echo maximum integer - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [max( reference( - resourceId('Test/Echo', 'Echo integer array') + resourceId('Microsoft.DSC.Debug/Echo', 'Echo integer array') ).actualState.output )] dependsOn: - - "[resourceId('Test/Echo', 'Echo integer array')]" + - "[resourceId('Microsoft.DSC.Debug/Echo', 'Echo integer array')]" ``` ```bash -dsc config get --document max.example.2.dsc.config.yaml +dsc config get --file max.example.2.dsc.config.yaml ``` ```yaml results: - name: Echo integer array - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: @@ -102,7 +102,7 @@ results: - 1 - 7 - name: Echo maximum integer - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 7 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/min.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/min.md index 9fe2ee0..07a1d76 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/min.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/min.md @@ -1,6 +1,6 @@ --- description: Reference for the 'min' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: min --- @@ -30,22 +30,22 @@ This configuration returns the smallest number from a list of integers. ```yaml # min.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo minimum value - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[min(3, 2, 5, 1, 7)]" ``` ```bash -dsc config get --document min.example.1.dsc.config.yaml config get +dsc config get --file min.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Echo minimum value - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 1 @@ -61,10 +61,10 @@ function more readable. ```yaml # min.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo integer array - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: - 3 @@ -73,26 +73,26 @@ resources: - 1 - 7 - name: Echo minimum integer - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [min( reference( - resourceId('Test/Echo', 'Echo integer array') + resourceId('Microsoft.DSC.Debug/Echo', 'Echo integer array') ).actualState.output )] dependsOn: - - "[resourceId('Test/Echo', 'Echo integer array')]" + - "[resourceId('Microsoft.DSC.Debug/Echo', 'Echo integer array')]" ``` ```bash -dsc config get --document min.example.2.dsc.config.yaml +dsc config get --file min.example.2.dsc.config.yaml ``` ```yaml results: - name: Echo integer array - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: @@ -102,7 +102,7 @@ results: - 1 - 7 - name: Echo minimum integer - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 1 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mod.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mod.md index a0e9df6..3f034be 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mod.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mod.md @@ -1,6 +1,6 @@ --- description: Reference for the 'mod' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: mod --- @@ -30,22 +30,22 @@ division for two integers. ```yaml # mod.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Remainder for integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[mod(7, 5)]" ``` ```bash -dsc config get --document mod.example.1.dsc.config.yaml config get +dsc config get --file mod.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Remainder for integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 2 @@ -60,22 +60,22 @@ two other mathematical operations. ```yaml # mod.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Remainder for nested functions - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[mod(add(9, 5), mul(6, 2))]" ``` ```bash -dsc config get --document mod.example.2.dsc.config.yaml +dsc config get --file mod.example.2.dsc.config.yaml ``` ```yaml results: - name: Remainder for nested functions - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 2 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mul.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mul.md index f9ea8e1..3f51198 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mul.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/mul.md @@ -1,6 +1,6 @@ --- description: Reference for the 'mul' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: mul --- @@ -30,22 +30,22 @@ This example document multiplies two integers to return a product for the output ```yaml # mul.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Multiplying integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[mul(3, 5)]" ``` ```bash -dsc config get --document mul.example.1.dsc.config.yaml config get +dsc config get --file mul.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Multiplying integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 15 @@ -59,22 +59,22 @@ This document shows how you can multiply the output of nested configuration func ```yaml # mul.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Multiplying nested function outputs - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[mul(add(3, 2), div(12, 4))]" ``` ```bash -dsc config get --document mul.example.2.dsc.config.yaml +dsc config get --file mul.example.2.dsc.config.yaml ``` ```yaml results: - name: Multiplying nested function outputs - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 15 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/overview.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/overview.md index 826d359..a06b154 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/overview.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/overview.md @@ -1,6 +1,6 @@ --- description: Reference for available functions in a Desired State Configuration document. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Configuration document functions reference --- @@ -68,6 +68,35 @@ syntax. )] ``` +When the output of a function is an array or object, you can access the properties of the object or +items in the array. + +To access the property of an output object, follow the closing parenthesis of the function with a +period (`.`) and then the name of the property you want to access. You can also access the +properties of nested objects and arrays. + +```yaml +# Accessing a top-level property syntax +: "[(...).]" +# Accessing a property nested in another object syntax +: "[(...)..]" +# Accessing a property nested in an array item syntax +: "[(...)[].]" +``` + +To access a specific item in an array output, follow the closing parenthesis of the function with +an opening square bracket (`[`), then the integer index of the item you want to access, and then a +closing square bracket (`]`). You can also access items in nested arrays. + +```yaml +# Accessing a top-level array item syntax +: "[(...)[]]" +# Accessing an array item nested in a property syntax +: "[(...).[]]" +# Accessing an array item nested in another array syntax +: "[(...)[][nested-array-index]]" +``` + ## Examples ### Example 1 - Use a function with valid syntaxes @@ -78,42 +107,42 @@ the [base64()][base64] function. ```yaml # overview.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Double quoted syntax - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: "[base64('ab')]" - name: Folded block syntax - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: >- [base64('ab')] - name: Literal block syntax - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: |- [base64('ab')] ``` ```sh -dsc --input-file overview.example.1.dsc.config.yaml config get +dsc config get --file overview.example.1.dsc.config.yaml ``` ```yaml results: - name: Double quoted syntax - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: YWI= - name: Folded block syntax - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: YWI= - name: Literal block syntax - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: YWI= @@ -128,22 +157,22 @@ output of the [concat()][concat] function, combining the strings `a` and `b` int ```yaml # overview.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo the concatenated strings 'a' and 'b' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: "[concat('a', 'b')]" ``` ```sh -dsc --input-file overview.example.2.dsc.config.yaml config get +dsc config get --file overview.example.2.dsc.config.yaml ``` ```yaml results: - name: Echo the concatenated strings 'a' and 'b' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: ab @@ -161,22 +190,22 @@ nested functions shown in the third instance to base64. ```yaml # overview.example.3.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Echo the concatenated strings 'a' and 'b' as base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: "[base64(concat('a', 'b'))]" - name: Echo the concatenated strings 'c' and 'd' as base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: "[base64(concat('c', 'd'))]" - name: Echo the concatenated base64 of strings 'ab' and 'cd' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: text: "[concat(base64(concat('a', 'b')), base64(concat('c', 'd')))]" - name: Echo the concatenated base64 of strings 'ab' and 'cd' as base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: # text: "[base64(concat(base64(concat('a', 'b')), base64(concat('c', 'd'))))]" text: >- @@ -189,28 +218,28 @@ resources: ``` ```sh -dsc --input-file overview.example.3.dsc.config.yaml config get +dsc config get --file overview.example.3.dsc.config.yaml ``` ```yaml results: - name: Echo the concatenated strings 'a' and 'b' as base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: YWI= - name: Echo the concatenated strings 'c' and 'd' as base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: Y2Q= - name: Echo the concatenated base64 of strings 'ab' and 'cd' - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: YWI=Y2Q= - name: Echo the concatenated base64 of strings 'ab' and 'cd' as base64 - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: text: WVdJPVkyUT0= @@ -218,6 +247,322 @@ messages: [] hadErrors: false ``` +### Example 4 - Access object properties and array items + +The following configuration documents show how you can access the properties of objects and items +in arrays. The example uses a shared parameter definition file to make it easier to reference a +single data source in each configuration document. + +The parameters file defines two parameters: + +- The `data` parameter is a complex object. The `message` property is a nested object. The + `services` property is a nested array. +- The `list` parameter is a complex array. The third item in the array is an object. The fourth + item in the array is a nested array. + +```yaml +# overview.example.4.dsc.parameters.yaml +parameters: + # Object parameter + data: + # Object property as string + name: Example 4 + # Object property as integer + count: 1 + # Object property as nested object + message: + text: Default message + level: info + context: + location: DC01 + # Object property as array + services: + - web + - database + - application + # Array parameter + list: + # Array item as string + - first + # Array item as integer + - 2 + # array item as object + - name: third + value: 3 + # Array item as nested array + - + - Nested first + - Nested second + - name: Nested third +``` + +The first configuration document defines an instance of the `Microsoft.DSC.Debug/Echo` resource to show how you +can access an object's properties in a configuration document. + +```yaml +# overview.example.4.properties.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +# Minimal definition of the parameters +parameters: + data: { type: object } + list: { type: array } + +resources: + - name: Access the properties of an object + type: Microsoft.DSC.Debug/Echo + properties: + output: + # Accessing output object + data: "[parameters('data')]" + # Accessing properties + data.name: "[parameters('data').name]" # string + data.count: "[parameters('data').count]" # integer + data.message: "[parameters('data').message]" # nested object + data.services: "[parameters('data').services]" # array +``` + +```sh +$params=overview.example.4.dsc.parameters.yaml +$config=overview.example.4.properties.dsc.config.yaml +dsc config --parameters-file $params get --file $config +``` + +```yaml +results: +- metadata: + Microsoft.DSC: + duration: PT0.133791S + name: Access the properties of an object + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + data: + count: 1 + name: Example 4 + message: + text: Default message + level: info + context: + location: DC01 + services: + - web + - database + - application + data.name: Example 4 + data.count: 1 + data.message: + text: Default message + level: info + context: + location: DC01 + data.services: + - web + - database + - application +``` + +The next configuration document shows how you can access nested object properties. + +```yaml +# overview.example.4.nested.properties.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +# Minimal definition of the parameters +parameters: + data: { type: object } + list: { type: array } + +resources: + - name: Access the properties of a nested object + type: Microsoft.DSC.Debug/Echo + properties: + output: + data.message.text: "[parameters('data').message.text]" + data.message.level: "[parameters('data').message.level]" + data.message.context: "[parameters('data').message.context]" + data.message.context.location: "[parameters('data').message.context.location]" +``` + +```sh +$params=overview.example.4.dsc.parameters.yaml +$config=overview.example.4.nested.properties.dsc.config.yaml +dsc config --parameters-file $params get --file $config +``` + +```yaml +results: +- metadata: + Microsoft.DSC: + duration: PT0.0760186S + name: Access the properties of an object + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + data.message.text: Default message + data.message.level: info + data.message.context: + location: DC01 + data.message.context.location: DC01 +``` + +The following configuration document shows how you can access items in an array. + +```yaml +# overview.example.4.items.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +# Minimal definition of the parameters +parameters: + data: { type: object } + list: { type: array } + +resources: + - name: Access items in an array + type: Microsoft.DSC.Debug/Echo + properties: + output: + # Accessing output array + list: "[parameters('list')]" + # Accessing array items + list[0]: "[parameters('list')[0]]" # string + list[1]: "[parameters('list')[1]]" # integer + list[2]: "[parameters('list')[2]]" # object + list[3]: "[parameters('list')[3]]" # nested array +``` + +```sh +$params=overview.example.4.dsc.parameters.yaml +$config=overview.example.4.items.dsc.config.yaml +dsc config --parameters-file $params get --path $config +``` + +```yaml +results: +- metadata: + Microsoft.DSC: + duration: PT0.0750682S + name: Access items in an array + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + list: + - first + - 2 + - name: third + value: 3 + - - Nested first + - Nested second + - name: Nested third + list[0]: first + list[1]: 2 + list[2]: + name: third + value: 3 + list[3]: + - Nested first + - Nested second + - name: Nested third +``` + +The following configuration document shows how you can access items in a nested array. + +```yaml +# overview.example.4.nested.items.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +# Minimal definition of the parameters +parameters: + data: { type: object } + list: { type: array } + +resources: + - name: Access items in a nested array + type: Microsoft.DSC.Debug/Echo + properties: + output: + list[3][0]: "[parameters('list')[3][0]]" + list[3][1]: "[parameters('list')[3][1]]" + list[3][2]: "[parameters('list')[3][2]]" +``` + +```sh +$params=overview.example.4.dsc.parameters.yaml +$config=overview.example.4.nested.items.dsc.config.yaml +dsc config --parameters-file $params get --file $config +``` + +```yaml +results: +- metadata: + Microsoft.DSC: + duration: PT0.1349442S + name: Access items in a nested array + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: + list[3][0]: Nested first + list[3][1]: Nested second + list[3][2]: + name: Nested third +``` + +The last configuration document shows how you can use the property and item access syntaxes +together to access values in complex objects. + +```yaml +# overview.example.4.mixed.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +# Minimal definition of the parameters +parameters: + data: { type: object } + list: { type: array } + +resources: + - name: Access values in complex objects and arrays + type: Microsoft.DSC.Debug/Echo + properties: + output: + # Accessing array items of an object property + data.services[0]: "[parameters('data').services[0]]" + data.services[1]: "[parameters('data').services[1]]" + data.services[2]: "[parameters('data').services[2]]" + # Accessing properties of an object in an array + list[2].name: "[parameters('list')[2].name]" + list[2].value: "[parameters('list')[2].value]" + # Accessing the property of an object in a nested array + list[3][2].name: "[parameters('list')[3][2].name]" +``` + +```sh +$params=overview.example.4.dsc.parameters.yaml +$config=overview.example.4.mixed.dsc.config.yaml +dsc config --parameters-file $params get --file $config +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +# Minimal definition of the parameters +parameters: + data: { type: object } + list: { type: array } + +resources: + - name: Access values in complex objects and arrays + type: Microsoft.DSC.Debug/Echo + properties: + output: + # Accessing array items of an object property + data.services[0]: "[parameters('data').services[0]]" + data.services[1]: "[parameters('data').services[1]]" + data.services[2]: "[parameters('data').services[2]]" + # Accessing properties of an object in an array + list[2].name: "[parameters('list')[2].name]" + list[2].value: "[parameters('list')[2].value]" + # Accessing the property of an object in a nested array + list[3][2].name: "[parameters('list')[3][2].name]" +``` + ## Functions The following sections include the available DSC configuration functions by purpose and input type. @@ -238,6 +583,7 @@ The following list of functions operate on data outside of a resource instance: - [envvar()][envvar] - Return the value of a specified environment variable. - [parameters()][parameters] - Return the value of a specified configuration parameter. +- [variables()][variables] - Return the value of a specified configuration variable. ### Mathematics functions @@ -297,3 +643,4 @@ The following list of functions create or convert values of a given type: [reference]: ./reference.md [resourceId]: ./resourceId.md [sub]: ./sub.md +[variables]: ./variables.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/parameters.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/parameters.md index a0814d0..9dae966 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/parameters.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/parameters.md @@ -1,6 +1,6 @@ --- description: Reference for the 'parameters' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: parameters --- @@ -35,34 +35,34 @@ The configuration uses the `parameters()` function to echo the value of the `mes ```yaml # parameters.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json parameters: message: type: string defaultValue: Hello, world! resources: - name: Echo message parameter - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: - text: "[parameters('message')]" + output: "[parameters('message')]" ``` First, get the current state of the configuration without overriding the parameters with the -[--parameters][02] or [`--parameters-file`][03] options. The output shows the default value for the +[--parameters][02] or [`--parameters_file`][03] options. The output shows the default value for the `message` parameter. ```bash config_file=parameters.example.1.dsc.config.yaml -cat $config_file | dsc config get --file - +cat $config_file | dsc config get ``` ```yaml results: - name: Echo message parameter - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: - text: Hello, world! + output: Hello, world! messages: [] hadErrors: false ``` @@ -71,16 +71,16 @@ Next, override the `message` parameter with the `--parameters` option. ```bash params='{"parameters": {"message": "Hi, override."}}' -cat $config_file | dsc config --parameters $params get --file - +cat $config_file | dsc config --parameters $params get ``` ```yaml results: - name: Echo message parameter - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: - text: Hi, override. + output: Hi, override. messages: [] hadErrors: false ``` @@ -110,5 +110,5 @@ Type: [string, int, bool, object, array] [01]: ../parameter.md -[02]: ../../../cli/config/index.md#--parameters -[03]: ../../../cli/config/index.md#--parameters-file +[02]: ../../../cli/config/command.md#-p---parameters +[03]: ../../../cli/config/command.md#-f---parameters_file diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/reference.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/reference.md index 09f31de..1df9dd7 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/reference.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/reference.md @@ -1,6 +1,6 @@ --- description: Reference for the 'reference' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: reference --- @@ -37,19 +37,19 @@ earlier instances. The instances don't need to be of the same type. ### Example 1 - Referencing a top-level instance -In this example configuration, the `Test/Echo` resource instance echoes the `bitness` property of +In this example configuration, the `Microsoft.DSC.Debug/Echo` resource instance echoes the `bitness` property of the `Microsoft/OSInfo` resource. It uses the `reference()` function to retrieve the actual state of the resource and uses the dot-path notation to access the **bitness** property of that resource. ```yaml # reference.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: System type: Microsoft/OSInfo properties: {} - name: Echo bitness - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[reference(resourceId('Microsoft/OSInfo', 'System')).actualState.bitness]" dependsOn: @@ -57,7 +57,7 @@ resources: ``` ```bash -dsc config get --document reference.example.1.dsc.config.yaml config get +dsc config get --file reference.example.1.dsc.config.yaml config get ``` ```yaml @@ -72,7 +72,7 @@ results: edition: Windows 11 Enterprise bitness: '64' - name: Echo bitness - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: '64' @@ -87,8 +87,8 @@ hadErrors: false The `reference()` function expects the resource ID of the instance to resolve as a reference. Use the [resourceId][01] function to build the resource ID for the instance instead of constructing the resource ID manually. The function verifies that the resource instance exists, while specifying -only the string manually might lead to a harder to diagnose error if the referenced instance name -is incorrect. +only the string manually may lead to a harder to diagnose error if the referenced instance name is +incorrect. ```yaml Type: string diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/resourceId.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/resourceId.md index 5b562c7..659f29f 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/resourceId.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/resourceId.md @@ -1,6 +1,6 @@ --- description: Reference for the 'resourceId' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: resourceId --- @@ -37,7 +37,7 @@ The following configuration uses the `resourceId()` function to reference the in ```yaml # resourceId.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Tailspin Key type: Microsoft.Windows/Registry @@ -62,12 +62,12 @@ resource instance named 'IsWindows' as a dependency of the `Example Key` resourc ```yaml # resourceId.example.2.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: IsWindows type: DSC/AssertionGroup properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: os type: Microsoft/OSInfo diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/sub.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/sub.md index 74119ff..3553276 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/sub.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/sub.md @@ -1,6 +1,6 @@ --- description: Reference for the 'sub' DSC configuration document function -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: sub --- @@ -31,22 +31,22 @@ integers. ```yaml # sub.example.1.dsc.config.yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Subtract integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: "[sub(7, 3)]" ``` ```bash -dsc config get --document sub.example.1.dsc.config.yaml config get +dsc config get --file sub.example.1.dsc.config.yaml config get ``` ```yaml results: - name: Subtract integers - type: Test/Echo + type: Microsoft.DSC.Debug/Echo result: actualState: output: 4 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/variables.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/variables.md new file mode 100644 index 0000000..ad82687 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/functions/variables.md @@ -0,0 +1,89 @@ +--- +description: Reference for the 'variables' DSC configuration document function +ms.date: 02/28/2025 +ms.topic: reference +title: variables +--- + +# variables + +## Synopsis + +Returns the value of a configuration variable. + +## Syntax + +```Syntax +variables('') +``` + +## Description + +The `variables()` function returns the value of a specific variable. You must pass the name of +a valid variable. When using this function for a resource instance, DSC validates the instance +properties after this function runs and before calling the resource for the current operation. If +the referenced variable value is invalid for the property, DSC raises a validation error. + +For more information about defining variables in a configuration document, see +[DSC Configuration document schema reference][01]. + +## Examples + +### Example 1 - Use a variable as a resource instance property value + +example synopsis + +```yaml +# variables.example.1.dsc.config.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +variables: + message: Hello, world! +resources: + - name: Echo message variable + type: Microsoft.DSC.Debug/Echo + properties: + output: "[variables('message')]" +``` + +```bash +dsc config get --file variables.example.1.dsc.config.yaml +``` + +```yaml +results: +- metadata: + Microsoft.DSC: + duration: PT0.0883345S + name: Echo message variable + type: Microsoft.DSC.Debug/Echo + result: + actualState: + output: Hello, world! +``` + +## Parameters + +### name + +The `variables()` function expects a single string as input, representing the name of the +variable to return. If no variable with the specified name is defined in the configuration +document, DSC raises an error during validation. + +```yaml +Type: string +Required: true +MinimumCount: 1 +MaximumCount: 1 +``` + +## Output + +The `variables()` function returns the value of the specified parameter. + +```yaml +Type: [string, int, bool, object, array] +``` + + + +[01]: ../document.md#variables diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/metadata.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/metadata.md index bc23456..c26bcc5 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/metadata.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/metadata.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for metadata in a Desired State Configuration document. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Configuration document metadata schema --- @@ -15,7 +15,7 @@ Defines a set of informational key-value pairs for the configuration. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.metadata.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.metadata.json Type: object ``` @@ -29,7 +29,7 @@ For example, you could define information about the configuration used by your t tools: ```yaml -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/config/document.vscode.json +$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json metadata: owner: security.ops@contoso.com diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/parameter.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/parameter.md index d927568..f76b803 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/parameter.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/parameter.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a parameter in a Desired State Configuration document. -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Configuration document parameter schema --- @@ -15,7 +15,7 @@ Defines runtime options for a configuration. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.parameter.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.parameter.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/resource.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/resource.md index 7f0f534..86ece6b 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/resource.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/config/resource.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a resource instance in a Desired State Configuration document. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Configuration document resource instance schema --- @@ -15,7 +15,7 @@ Defines a DSC Resource instance in a configuration document. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.resource.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.resource.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/message.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/message.md index 886b5c3..6b5a3e0 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/message.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/message.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a structured message returned from a 'dsc config' command. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: Structured message schema reference --- @@ -15,7 +15,7 @@ A message emitted by a DSC Resource with associated metadata. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/definitions/message.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/definitions/message.json Type: object ``` @@ -69,7 +69,7 @@ Indicates the severity of the message. ```yaml Type: string Required: true -Valid Values: [Error, Warning, Information] +Valid Values: [error, warning, information] ``` [01]: resourceType.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/parameters/dataTypes.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/parameters/dataTypes.md index 5468be6..4d5751f 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/parameters/dataTypes.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/parameters/dataTypes.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for valid parameter data types in a configuration document. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC configuration parameter data type schema reference --- @@ -15,7 +15,7 @@ Defines valid data types for a DSC configuration parameter ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/definitions/parameters/dataTypes.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/definitions/parameters/dataTypes.json Type: string ValidValues: [array, bool, int, object, string, secureobject, securestring] ``` @@ -117,7 +117,7 @@ parameters: ## Integers -Integer values are numbers without a fractional part. Integer values can be limited by integrating +Integer values are numbers without a fractional part. Integer values may be limited by integrating tools or the DSC Resources they're used with. DSC itself supports integer values between `-9223372036854775808` and `9223372036854775807`. @@ -235,8 +235,8 @@ parameters: Secure strings use the same format as strings and secure objects use the same format as objects. The `secure*` data types indicate that DSC and integrating tools shouldn't log or record the values. If a secure data type parameter is used for a resource instance property that doesn't -expect a secure value, the resource might still log or record the value. If the resource has -independent logging or recording that isn't handled by DSC, the value might be stored insecurely. +expect a secure value, the resource may still log or record the value. If the resource has +independent logging or recording that isn't handled by DSC, the value may be stored insecurely. Use secure strings for passwords and secrets. Never define a default value for secure string or secure object parameters. diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceKind.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceKind.md index b4622e2..6c54685 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceKind.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceKind.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for resource kind -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource kind schema reference --- @@ -15,33 +15,35 @@ Identifies whether a resource is an adapter resource, a group resource, or a nor ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/definitions/resourceKind.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/definitions/resourceKind.json Type: string -ValidValues: [Resource, Adapter, Group, Import] +ValidValues: [resource, adapter, group, importer, exporter] ``` ## Description DSC supports three kinds of command-based DSC Resources: -- `Resource` - Indicates that the manifest isn't for a group or adapter resource. -- `Group` - Indicates that the manifest is for a [group resource](#group-resources). -- `Adapter` - Indicates that the manifest is for an [adapter resource](#adapter-resources). -- `Import` - Indicates that the manifest is for an [importer resource](#importer-resources). +- `resource` - Indicates that the manifest isn't for a group or adapter resource. +- `group` - Indicates that the manifest is for a [group resource](#group-resources). +- `adapter` - Indicates that the manifest is for an [adapter resource](#adapter-resources). +- `importer` - Indicates that the manifest is for an [importer resource](#importer-resources). +- `exporter` - Indicates that the manifest is for an [exporter resource](#exporter-resources). When `kind` isn't defined in the resource manifest, DSC infers the value for the property. If the `adapter` property is defined in the resource manifest, DSC infers the value of `kind` as -`Adapter`. If the `adapter` property isn't defined, DSC infers the value of `kind` as `Resource`. -DSC can't infer whether a manifest is for a group resource. +`adapter`. If the `adapter` property isn't defined, DSC infers the value of `kind` as `resource`. +DSC can't infer whether a manifest is for a group or importer resource. When defining a group resource, always explicitly define the `kind` property in the manifest as -`Group`. +`group`. When defining an importer resource, always explicitly define the `kind` property in the +manifest as `importer`. ### Adapter resources -An adapter resource makes non-command-based resources available to DSC. They always have a -`resources` property that takes an array of nested resource instances. Adapters can provide -additional control over how the adapted resources are processed. +An adapter resource makes non-command resources available to DSC. They always have a `resources` +property that takes an array of nested resource instances. Adapters may provide additional control +over how the adapted resources are processed. An adapter resource must always define the [adapter][01] and [validate][02] properties in the resource manifest. @@ -72,6 +74,18 @@ manifest. For example, the `Microsoft.DSC/Import` importer resource resolves instances from an external configuration document, enabling you to compose configurations from multiple files. +### Exporter resources + +Exporter resources implement the **Export** operation to return full resource instances for DSC to +recursively export. This allows an exporter resource to help users quickly export the current +configuration of a system without having to know every available resource. + +For example, an exporter resource might discover whether Apache is installed and then return an +instance for every supported resource to fully export the configuration for Apache. + +An exporter resource must always define the [kind][03] and [export][06] properties in the resource +manifest. + ### Nested resource instances The resource instances declared in adapter and group resources or resolved by importer resources @@ -102,7 +116,7 @@ Consider the following configuration snippet. It defines seven resource instance ```yaml resources: - name: TopLevelEcho - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: { output: 'top level instance' } - name: TopLevelOSInfo type: Microsoft/OSInfo @@ -113,7 +127,7 @@ resources: $schema: resources: - name: NestedEcho - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: { output: 'nested instance' } - name: NestedGroup type: Microsoft.DSC/Group @@ -121,7 +135,7 @@ resources: $schema: resources: - name: DeeplyNestedEcho - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: { output: 'deeply nested instance' } - name: DeeplyNestedOSInfo type: Microsoft/OSInfo @@ -143,7 +157,7 @@ The following matrix defines the relations of each instance in the configuration ### Referencing nested instances Nested resource instances have limitations for the [dependsOn][04] property and the -[reference()][06] configuration function. +[reference()][07] configuration function. 1. You can only reference adjacent instances. You can't reference a nested instance from outside of the instance that declares or resolves it. You can't use a reference to a resource outside of the @@ -160,17 +174,18 @@ The following examples show valid and invalid references and dependencies. The e This example configuration defines several valid references and dependencies. It also defines two instances of the `Microsoft.DSC/Group` resource, one nested inside the other. -The top level instance of the `Test/Echo` resource references and depends on the top-level instance -of the `Microsoft/OSInfo` resource. The top-level instances of the `Test/Echo` and +The top level instance of the `Microsoft.DSC.Debug/Echo` resource references and depends on the top-level instance +of the `Microsoft/OSInfo` resource. The top-level instances of the `Microsoft.DSC.Debug/Echo` and `Microsoft/OSInfo` resources both depend on the top-level instance of the `Microsoft.DSC/Group` resource. ```yaml +# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json resources: # The top level echo references and depends on the top-level OSInfo. # It also depends on the top-level Group. - name: Top level echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -191,7 +206,7 @@ resources: ``` The top-level instance of `Microsoft.DSC/Group` defines three nested resource instances: -`Test/Echo`, `Microsoft/OSInfo`, and `Microsoft.DSC/Group`. As at the top-level, the `Test/Echo` +`Microsoft.DSC.Debug/Echo`, `Microsoft/OSInfo`, and `Microsoft.DSC/Group`. As at the top-level, the `Microsoft.DSC.Debug/Echo` instance references and depends on the adjacent nested`Microsoft/OSInfo` instance and that instance depends on the adjacent nested `Microsoft.DSC/Group` instance. @@ -200,11 +215,11 @@ depends on the adjacent nested `Microsoft.DSC/Group` instance. - name: Top level group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: # The nested echo references and depends on the adjacent nested OSInfo. - name: Nested echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -222,25 +237,25 @@ depends on the adjacent nested `Microsoft.DSC/Group` instance. ``` Finally, the nested instance of `Microsoft.DSC/Group` defines two nested instances. The deeply -nested instance of `Test/Echo` references and depends on the deeply nested instance of +nested instance of `Microsoft.DSC.Debug/Echo` references and depends on the deeply nested instance of `Microsoft/OSInfo`. ```yaml - name: Top level group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - # Snipped the Test/Echo and Microsoft/OSInfo instances for brevity + # Snipped the Microsoft.DSC.Debug/Echo and Microsoft/OSInfo instances for brevity - name: Nested Group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: # The deeply nested echo references and depends on the adjacent # deeply nested OSInfo. - name: Deeply nested echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -262,12 +277,12 @@ nested instances in the same group. Putting the configuration together, you get this full document: ```yaml -# yaml-language-server: $schema=https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.vscode.json -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: # The top level echo references and depends on the top-level OSInfo. - name: Top level echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -284,11 +299,11 @@ resources: - name: Top level group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: # The nested echo references and depends on the adjacent nested OSInfo. - name: Nested echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -303,12 +318,12 @@ resources: - name: Nested Group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: # The deeply nested echo references and depends on the adjacent # deeply nested OSInfo. - name: Deeply nested echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -323,16 +338,16 @@ resources: #### Example 2 - Invalid reference and dependency on a nested instance -This example configuration is invalid, because the top-level instance of the `Test/Echo` resource +This example configuration is invalid, because the top-level instance of the `Microsoft.DSC.Debug/Echo` resource references and depends on the nested `Microsoft/OSInfo` instance. The nested instance is external to the top-level instance, not adjacent. ```yaml -# yaml-language-server: $schema=https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.vscode.json -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Top level echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -343,7 +358,7 @@ resources: - name: Top level group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Nested OSInfo type: Microsoft/OSInfo @@ -352,13 +367,13 @@ resources: #### Example 3 - Invalid reference and dependency on an external instance -This example configuration is invalid, because the nested instance of the `Test/Echo` resource +This example configuration is invalid, because the nested instance of the `Microsoft.DSC.Debug/Echo` resource references and depends on the top-level `Microsoft/OSInfo` instance. The top-level instance is external to the nested instance, not adjacent. ```yaml -# yaml-language-server: $schema=https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.vscode.json -$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json +# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Top level OSInfo type: Microsoft/OSInfo @@ -366,10 +381,10 @@ resources: - name: Top level group type: Microsoft.DSC/Group properties: - $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json resources: - name: Nested echo - type: Test/Echo + type: Microsoft.DSC.Debug/Echo properties: output: >- [reference( @@ -384,4 +399,5 @@ resources: [03]: ../resource/manifest/root.md#kind [04]: ../config/resource.md#dependson [05]: ../resource/manifest/resolve.md -[06]: ../config/functions/reference.md +[06]: ../resource/manifest/export.md +[07]: ../config/functions/reference.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceType.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceType.md index 2ab56d5..de466c5 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceType.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/definitions/resourceType.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a resource instance type name -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource fully qualified type name schema reference --- @@ -15,7 +15,7 @@ Identifies a DSC Resource. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/definitions/resourceType.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/definitions/resourceType.json Type: string Pattern: ^\w+(\.\w+){0,2}\/\w+$ ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/manifest/discover.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/manifest/discover.md new file mode 100644 index 0000000..13dcc14 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/manifest/discover.md @@ -0,0 +1,97 @@ +--- +description: JSON schema reference for the 'discover' property in a DSC extension manifest +ms.date: 02/28/2025 +ms.topic: reference +title: DSC extension manifest discover property schema reference +--- + +# DSC extension manifest discover property schema reference + +## Synopsis + +Defines how to retrieve DSC resources not available in `PATH` or `DSC_RESOURCE_PATH`. + +## Metadata + +```yaml +SchemaDialect: https://json-schema.org/draft/2020-12/schema +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.discover.json +Type: object +``` + +## Description + +A DSC extension that can enumerate DSC resource not discoverable in the `PATH` or +`DSC_RESOURCE_PATH` environment variables should define the `export` property in its manifest. This +property defines how DSC can get the path to otherwise undiscoverable manifests. + +When the DSC performs discovery for any operation, it calls the command defined by this property. +The extension must return the path to discovered manifests as [JSON lines][05]. Each JSON Line +should be an object representing the instance and validate against the +[DSC extension discover operation stdout schema reference][06]. + +## Required Properties + +The `discover` definition must include these properties: + +- [executable](#executable) + +## Properties + +### executable + +The `executable` property defines the name of the command to run. The value must be the name of a +command discoverable in the system's `PATH` environment variable or the full path to the command. A +file extension is only required when the command isn't recognizable by the operating system as an +executable. + +```yaml +Type: string +Required: true +``` + +### args + +The `args` property defines the list of arguments to pass to the command. The arguments can be any +number of strings. If you want to pass the JSON object representing the property bag for the +extension input to an argument, you can define a single item in the array as a +[JSON object](#json-input-argument), indicating the name of the argument with the `jsonInputArg` +string property and whether the argument is mandatory for the command with the `mandatory` boolean +property. + +```yaml +Type: array +Required: false +Default: [] +Type: [string, object(JSON Input Argument)] +``` + +#### String arguments + +Any item in the argument array can be a string representing a static argument to pass to the +command, like `discover` or `--format`. + +```yaml +Type: string +``` + +#### JSON input argument + +Defines an argument for the command that accepts the JSON input object as a string. DSC passes the +JSON input to the named argument when available. A JSON input argument is defined as a JSON object +with the following properties: + +- `jsonInputArg` (required) - the argument to pass the JSON data to for the command, like `--input`. +- `mandatory` (optional) - Indicate whether DSC should always pass the argument to the command, + even when there's no JSON input for the command. In that case, DSC passes an empty string to the + JSON input argument. + +You can only define one JSON input argument per arguments array. + +```yaml +Type: object +RequiredProperties: [jsonInputArg] +``` + +[05]: https://jsonlines.org/ +[06]: ../stdout/discover.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/manifest/root.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/manifest/root.md new file mode 100644 index 0000000..53d8278 --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/manifest/root.md @@ -0,0 +1,205 @@ +--- +description: JSON schema reference for a DSC extension manifest +ms.date: 02/28/2025 +ms.topic: reference +title: Command-based DSC extension manifest schema reference +--- + +# Command-based DSC extension manifest schema reference + +## Synopsis + +The data file that defines a command-based DSC extension. + +## Metadata + +```yaml +SchemaDialect: https://json-schema.org/draft/2020-12/schema +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.json +Type: object +``` + +## Description + +Every command-based DSC Resource must have a manifest. The manifest file must: + +1. Be discoverable in the `PATH` environment variable. +1. Be formatted as either JSON or YAML. +1. Follow the naming convention `.dsc.resource.`. Valid extensions include `json`, + `yml`, and `yaml`. +1. Be valid for the schema described in this document. + +The rest of this document describes the manifest's schema. + +## Required properties + +The manifest must include these properties: + +- [$schema](#schema) +- [type](#type) +- [version](#version) +- [discover](#discover) + +## Properties + +### $schema + +The `$schema` property indicates the canonical URI of this schema that the manifest validates +against. This property is mandatory. DSC uses this value to validate the manifest against the +correct JSON schema. + +The JSON schemas for DSC are published in multiple versions and forms. This documentation is for +the latest version of the schema. As a convenience, you can specify either the full URI for the +schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema for a specific +semantic version, the latest schema for a minor version, or the latest schema for a major version +of DSC. For more information about schema URIs and versioning, see +[DSC JSON Schema URIs](../../schema-uris.md). + +For every version of the schema, there are three valid urls: + +- `.../extension/manifest.json` + + The URL to the canonical non-bundled schema. When it's used for validation, the validating client + needs to retrieve this schema and every schema it references. + +- `.../bundled/extension/manifest.json` + + The URL to the canonically bundled schema. When it's used for validation, the validating client + only needs to retrieve this schema. + + This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can still + validate the document when it uses this schema, other tools may error or behave in unexpected + ways if they don't fully support the 2020-12 specification. + +- `.../bundled/extension/manifest.vscode.json` + + The URL to the enhanced authoring schema. This schema is much larger than the other schemas, as + it includes additional definitions that provide contextual help and snippets that the others + don't include. + + This schema uses keywords that are only recognized by VS Code. While DSC can still validate the + document when it uses this schema, other tools may error or behave in unexpected ways. + +```yaml +Type: string +Required: true +Format: URI +ValidValues: [ + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/extension/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/extension/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.vscode.json + https://aka.ms/dsc/schemas/v3/extension/manifest.json + https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.json + https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.1/extension/manifest.json + https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.json + https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.1.0/extension/manifest.json + https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.json + https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.vscode.json + ] +``` + +### type + +The `type` property represents the fully qualified type name of the extension. For more information +about extension type names, see [DSC resource fully qualified type name schema reference][01]. + +```yaml +Type: string +Required: true +Pattern: ^\w+(\.\w+){0,3}\/\w+$ +``` + +### version + +The `version` property must be the current version of the extension as a valid semantic version +(semver) string. + +```yaml +Type: string +Required: true +Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ +``` + +### description + +The `description` property defines a synopsis for the extension's purpose. The value for this +property must be a short string. + +```yaml +Type: string +Required: false +``` + +### tags + +The `tags` property defines a list of searchable terms for the extension. The value of this +property must be an array of strings. Each tag must contain only alphanumeric characters and +underscores. No other characters are permitted. Each tag must be unique. + +```yaml +Type: array +Required: false +ItemsMustBeUnique: true +ItemsType: string +ItemsPattern: ^\w+$ +``` + +### discover + +The `discover` property defines how to call the extension to discover DSC resources that aren't +available in the `PATH` or `DSC_RESOURCE_PATH` environment variables. When this property is +defined, DSC invokes the `discover` operation for the extension during the resource discovery phase +of any `dsc config` or `dsc resource` command. + +The value of this property must be an object. The object's `executable` property, defining the name +of the command to call, is mandatory. The `args` property is optional. For more +information, see [DSC extension manifest discover property schema reference][02]. + +```yaml +Type: object +Required: true +``` + +### exitCodes + +The `exitCodes` property defines a set of valid exit codes for the extension and their meaning. +Define this property as a set of key-value pairs where: + +- The key is a string containing a signed integer that maps to a known exit code for the extension. + The exit code must be a literal signed integer. You can't use alternate formats for the exit + code. For example, instead of the hexadecimal value `0x80070005` for "Access denied", specify the + exit code as `-2147024891`. +- The value is a string describing the semantic meaning of that exit code for a human reader. + +DSC interprets exit code `0` as a successful operation and any other exit code as an error. + +> [!TIP] +> If you're authoring your extension manifest in yaml, be sure to wrap the exit code in single +> quotes to ensure the YAML file can be parsed correctly. For example: +> +> ```yaml +> exitCodes: +> '0': Success +> '1': Invalid parameter +> '2': Invalid input +> '3': Registry error +> '4': JSON serialization failed +> ``` + +```yaml +Type: object +Required: false +PropertyNamePattern: ^-?[0-9]+# +PropertyValueType: string +``` + +[01]: ../../definitions/resourceType.md +[02]: discover.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/stdout/discover.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/stdout/discover.md new file mode 100644 index 0000000..7517e8e --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/extension/stdout/discover.md @@ -0,0 +1,49 @@ +--- +description: JSON schema reference for the output DSC expects for the 'discover' operation. +ms.date: 02/28/2025 +ms.topic: reference +title: DSC extension discover operation stdout schema reference +--- + +# DSC extension discover operation stdout schema reference + +## Synopsis + +Represents the path to a manifest not discoverable in the `PATH` or `DSC_RESOURCE_PATH` environment +variables. + +## Metadata + +```yaml +SchemaDialect: https://json-schema.org/draft/2020-12/schema +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/stdout/discover.json +Type: object +``` + +## Description + +Represents the actual state of a resource instance in DSCpath to a discovered DSC resource or +extension manifest on the system. DSC expects every JSON Line emitted to stdout for the +**Discover** operation to adhere to this schema. + +The output must be a JSON object. The object must define the full path to the discovered manifest. +If an extension returns JSON that is invalid against this schema, DSC raises an error. + +## Required Properties + +The output for the `discover` operation must include these properties: + +- [manifestPath](#manifestpath) + +## Properties + +### manifestPath + +The value for this property must be the absolute path to a manifest file on the system. The +manifest can be for a DSC resource or extension. If the returned path doesn't exist, DSC raises an +error. + +```yaml +Type: string +Required: true +``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/metadata/Microsoft.DSC/properties.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/metadata/Microsoft.DSC/properties.md index 300acaa..827f309 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/metadata/Microsoft.DSC/properties.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/metadata/Microsoft.DSC/properties.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the metadata field Microsoft.DSC -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: Microsoft.DSC metadata property schema reference --- @@ -26,7 +26,7 @@ For example, `PT0.611216S` represents a duration of about `0.61` seconds. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/duration.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/duration.json Type: string Format: duration ``` @@ -40,7 +40,7 @@ For example: `2024-04-14T08:49:51.395686600-07:00` ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/endDateTime.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/endDateTime.json Type: string Format: date-time ``` @@ -53,7 +53,7 @@ this value is `WhatIf` when DSC is invoked with the `--whatIf` argument. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/executionType.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/executionType.json Type: string ValidValues: [Actual, WhatIf] ``` @@ -65,7 +65,7 @@ Defines the operation that DSC applied to the configuration document: `Get`, `Se ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/operation.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/operation.json Type: string ValidValues: [Get, Set, Test, Export] ``` @@ -79,7 +79,7 @@ non-elevated session. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/securityContext.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/securityContext.json Type: string ValidValues: [Current, Elevated, Restricted] ``` @@ -93,7 +93,7 @@ For example: `2024-04-14T08:49:51.395686600-07:00` ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/startDatetime.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/startDatetime.json Type: string Format: date-time ``` @@ -105,7 +105,7 @@ DSC command, like `3.0.0-preview.7`. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/metadata/Microsoft.DSC/version.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/metadata/Microsoft.DSC/version.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/get.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/get.md index b658e90..222f889 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/get.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/get.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc config get' command. -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc config get result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc config get` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/config/get.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/get.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/set.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/set.md index 61b760b..dac2491 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/set.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/set.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc config set' command. -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc config set result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc config set` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/config/set.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/set.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/test.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/test.md index 1086875..df64e67 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/test.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/config/test.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc config test' command. -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc config test result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc config test` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/config/test.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/test.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/extension/list.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/extension/list.md new file mode 100644 index 0000000..f31dafc --- /dev/null +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/extension/list.md @@ -0,0 +1,134 @@ +--- +description: JSON schema reference for the data returned by the 'dsc extension list' command. +ms.date: 02/28/2025 +ms.topic: reference +title: dsc extension list result schema reference +--- + +# dsc extension list result schema reference + +## Synopsis + +The result output from the `dsc extension list` command. + +## Metadata + +```yaml +SchemaDialect: https://json-schema.org/draft/2020-12/schema +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/extension/list.json +Type: object +``` + +## Description + +The output from the `dsc extension list` command includes a representation of discovered DSC +extensions as a series of [JSON Lines][01]. This schema describes the JSON object returned for each +extension. + +## Required properties + +Each extension in the output always includes these properties: + +- [type](#type) +- [version](#version) +- [path](#path) +- [directory](#directory) +- [author](#author) +- [manifest](#manifest) + +## Properties + +### type + +Identifies the fully qualified type name of the extension. For more information about extension +type names, see [DSC extension fully qualified type name schema reference][02]. + +```yaml +Type: string +Required: true +Pattern: ^\w+(\.\w+){0,2}\/\w+$ +``` + +### version + +Represents the current version of the extension as a valid semantic version (semver) string. + +```yaml +Type: string +Required: true +Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ +``` + +### capabilities + +Defines the operations and behaviors the extension is implemented to support. This property is an +array of capabilities. + +The following list describes the available capabilities for an extension: + +- `discover` - The extension supports finding DSC resource + manifests that aren't in the `PATH` or `DSC_RESOURCE_PATH`, as with resources installed as Appx + packages. + +```yaml +Type: array +Required: true +ItemsMustBeUnique: true +ItemsType: string +ItemsValidValues: [ + discover + ] +``` + +### description + +Defines a synopsis for the extension's purpose as a short string. If the extension doesn't have a +description, this property is `null`. + +```yaml +Type: [string, 'null'] +Required: true +``` + +### path + +Represents the path to the extension's manifest on the machine. + +```yaml +Type: string +Required: true +``` + +### directory + +Represents the path to the folder containing the extension's manifest on the machine. + +```yaml +Type: string +Required: true +``` + +### author + +Indicates the name of the person or organization that developed and maintains the DSC extension. If +this property is `null`, the author is unknown. + +```yaml +Type: [string, 'null'] +Required: true +``` + +### manifest + +Represents the values defined in the extension's manifest. For more information on the value for +this property, see [Command-based DSC extension manifest schema reference][03]. + +```yaml +Type: [object] +Required: true +``` + + +[01]: https://jsonlines.org/ +[02]: ../../definitions/resourceType.md +[03]: ../../extension/manifest/root.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/get.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/get.md index 10f675c..093a10a 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/get.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/get.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc resource get' command. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource get result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc resource get` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/resource/get.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/get.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/list.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/list.md index c5f4bcd..30f082c 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/list.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/list.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc resource list' command. -ms.date: 06/24/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource list result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc resource list` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/resource/list.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/list.json Type: object ``` @@ -85,15 +85,15 @@ optional and depend on the resource. The following list describes the available capabilities for a resource: -- `Get` - The resource supports retrieving the current state of an +- `get` - The resource supports retrieving the current state of an instance. All DSC Resources must have this capability. A resource has this capability when it defines the mandatory [get][07] property in its resource manifest. -- `Set` - The resource supports enforcing the desired state of an +- `set` - The resource supports enforcing the desired state of an instance. A resource has this capability when it defines the [set][08] property in its resource manifest. Resources without this capability can't be used with the [dsc resource set][09] or [dsc config set][10] commands unless they're in a Microsoft.DSC/Assertion group as a nested instance. -- `SetHandlesExist` - The resource supports the +- `setHandlesExist` - The resource supports the [_exist property][11] directly. A resource has this capability when it defines the [handlesExist][12] property as `true` in the definition of the [set][08] command property in its resource manifest. @@ -104,12 +104,12 @@ The following list describes the available capabilities for a resource: When a resource doesn't have this capability, when DSC finds an instance of the resource with `_exist` set to `false`, it handles calling the [delete][13] operation for the resource. - If the resource doesn't have this capability or the `Delete` capability, DSC raises an error when + If the resource doesn't have this capability or the `delete` capability, DSC raises an error when an instance defines `_exist` as `false`. -- `WhatIf` - The resource supports returning explicit information +- `whatIf` - The resource supports returning explicit information about how it will modify state when a user calls [dsc config set][10] with the [--what-if][14] - option. A resource has this capability when it defines the [What-if method][15] in its resource - manifest. + option. A resource has this capability when it defines the [What-if operation][15] in its + resource manifest. When a resource has this capability, DSC calls the defined command with its arguments when a user executes the `dsc config set` command with the `--what-if` option. @@ -121,25 +121,25 @@ The following list describes the available capabilities for a resource: used to test a resource might be valid for that operation, but not have permissions to actually modify the system state. Only a resource with this capability can fully report whether and how the resource will change system state. -- `Test` - The resource supports validating the desired state of an +- `test` - The resource supports validating the desired state of an instance against the current state of the instance. A resource has this capability when it defines the [test][16] property in its resource manifest. - If a resource doesn't have the `Test` capability, DSC uses a synthetic test for instances of the + If a resource doesn't have the `test` capability, DSC uses a synthetic test for instances of the resource. The synthetic test compares each property for the desired state of an instance against the actual state. The synthetic test uses strict, case-sensitive equivalence. If the desired state for a property and the actual state aren't the same, DSC marks the property as out of the desired state. -- `Delete` - The resource supports removing an instance. A resource +- `delete` - The resource supports removing an instance. A resource has this capability when it defines the [delete][13] property in its resource manifest. This - capability isn't mutually exclusive with the `SetHandlesExist` property. A resource can handle + capability isn't mutually exclusive with the `setHandlesExist` property. A resource can handle the `_exist` property in set operations and be called directly with [dsc resource delete][17] to remove an instance. -- `Export` - The resource supports enumerating every instance of +- `export` - The resource supports enumerating every instance of the resource. A resource has this capability when it defines the [export][18] property in its resource manifest. Only resources with this capability are usable with the [dsc resource export][19] and [dsc config export][20] commands. -- `Resolve` - The resource supports resolving nested resource +- `resolve` - The resource supports resolving nested resource instances from an external source. A resource has this capability when it defines the [resolve][21] property in its resource manifest. This functionality is primarily used by [importer resources][22]. @@ -149,7 +149,16 @@ Type: array Required: true ItemsMustBeUnique: true ItemsType: string -ItemsValidValues: [Get, Set, SetHandlesExist, Test, Delete, Export] +ItemsValidValues: [ + get, + set, + setHandlesExist, + whatIf, + test, + delete, + export, + resolve + ] ``` ### description diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/set.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/set.md index e2d077e..b72ca7a 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/set.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/set.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc resource set' command. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource set result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc resource set` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/resource/set.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/set.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/test.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/test.md index bf16923..8f3622f 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/test.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/outputs/resource/test.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the data returned by the 'dsc resource test' command. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: dsc resource test result schema reference --- @@ -15,7 +15,7 @@ The result output from the `dsc resource test` command. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/resource/test.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/test.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/overview.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/overview.md index 076f667..05941d6 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/overview.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/overview.md @@ -2,7 +2,7 @@ description: >- Overview of the reference documentation for the JSON schemas describing data types for Microsoft's Desired State Configuration platform. -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: DSC JSON Schema reference overview --- @@ -31,12 +31,17 @@ configuration documents. The article [DSC Configuration document functions reference][04] describes DSC configuration functions generally and links to the reference documentation for the available functions. +## Extension schemas + +The article [DSC command extension manifest schema reference][05] describes the root JSON schema for +extension manifests. + ## Resource schemas -The article [DSC command resource manifest schema reference][05] describes the root JSON schema for +The article [DSC command resource manifest schema reference][06] describes the root JSON schema for resource manifests. -The article [# DSC canonical properties reference][06] describes DSC canonical resource properties +The article [# DSC canonical properties reference][07] describes DSC canonical resource properties generally and links to the reference documentation for the available canonical properties. ## Output schemas @@ -44,15 +49,16 @@ generally and links to the reference documentation for the available canonical p The following table links to the reference documentation for the JSON schemas describing the output DSC returns for its commands: -| Command | Article link | -|:--------------------|:------------------------------------------------------------------------| -| `dsc config get` | [dsc config get result schema reference][07] | -| `dsc config set` | [dsc config set result schema reference][08] | -| `dsc config test` | [dsc config test result schema reference][09] | -| `dsc resource get` | [dsc resource get result schema reference][10] | -| `dsc resource list` | [dsc resource list result schema reference][11] | -| `dsc resource set` | [dsc resource set result schema reference][12] | -| `dsc resource test` | [dsc resource test result schema reference][13] | +| Command | Article link | +|:---------------------|:-------------------------------------------------| +| `dsc config get` | [dsc config get result schema reference][08] | +| `dsc config set` | [dsc config set result schema reference][09] | +| `dsc config test` | [dsc config test result schema reference][10] | +| `dsc extension list` | [dsc extension list result schema reference][11] | +| `dsc resource get` | [dsc resource get result schema reference][12] | +| `dsc resource list` | [dsc resource list result schema reference][13] | +| `dsc resource set` | [dsc resource set result schema reference][14] | +| `dsc resource test` | [dsc resource test result schema reference][15] | ## Definition schemas @@ -60,28 +66,30 @@ The following list defines the reference documentation for JSON schemas included throughout DSC. - For more information about the `Microsoft.DSC` metadata property, see - [Microsoft.DSC metadata property schema reference][14] -- For more information about the messages DSC emits, see [Structured message schema reference][15] + [Microsoft.DSC metadata property schema reference][16] +- For more information about the messages DSC emits, see [Structured message schema reference][17] - For more information about the kinds of DSC resources and how they affect schema validation, see - [DSC Resource kind schema reference][16]. + [DSC Resource kind schema reference][18]. - For more information about the naming of DSC resources and how they're validated, see - [DSC Resource fully qualified type name schema reference][17] + [DSC Resource fully qualified type name schema reference][19] [01]: https://json-schema.org/overview/what-is-jsonschema [02]: ./schema-uris.md [03]: ./config/document.md [04]: ./config/functions/overview.md -[05]: ./resource/manifest/root.md -[06]: ./resource/properties/overview.md -[07]: ./outputs/config/get.md -[08]: ./outputs/config/set.md -[09]: ./outputs/config/test.md -[10]: ./outputs/resource/get.md -[11]: ./outputs/resource/list.md -[12]: ./outputs/resource/set.md -[13]: ./outputs/resource/test.md -[14]: ./metadata/Microsoft.DSC/properties.md -[15]: ./definitions/message.md -[16]: ./definitions/resourceKind.md -[17]: ./definitions/resourceType.md +[05]: ./extension/manifest/root.md +[06]: ./resource/manifest/root.md +[07]: ./resource/properties/overview.md +[08]: ./outputs/config/get.md +[09]: ./outputs/config/set.md +[10]: ./outputs/config/test.md +[11]: ./outputs/extension/list.md +[12]: ./outputs/resource/get.md +[13]: ./outputs/resource/list.md +[14]: ./outputs/resource/set.md +[15]: ./outputs/resource/test.md +[16]: ./metadata/Microsoft.DSC/properties.md +[17]: ./definitions/message.md +[18]: ./definitions/resourceKind.md +[19]: ./definitions/resourceType.md diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/adapter.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/adapter.md index 8228c41..64926a3 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/adapter.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/adapter.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'adapter' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest adapter property schema reference --- @@ -15,7 +15,7 @@ Defines a DSC Resource as a DSC Resource Adapter. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.adapter.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.adapter.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/delete.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/delete.md index a333e5f..938c4a5 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/delete.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/delete.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'delete' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest delete property schema reference --- @@ -15,7 +15,7 @@ Indicates how to call the resource to delete a specific instance. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.delete.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.delete.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/export.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/export.md index 98b0327..0a98fda 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/export.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/export.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'export' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest export property schema reference --- @@ -15,7 +15,7 @@ Defines how to retrieve the current state of every instance for a DSC Resource. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.export.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.export.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/get.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/get.md index 0f33fd5..7ffae51 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/get.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/get.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'get' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest get property schema reference --- @@ -15,7 +15,7 @@ Defines how to retrieve a DSC Resource instance. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.get.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.get.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/resolve.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/resolve.md index 99b2c61..b53f40a 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/resolve.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/resolve.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'resolve' property in a DSC Resource manifest -ms.date: 01/17/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest resolve property schema reference --- @@ -16,7 +16,7 @@ source. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.resolve.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.resolve.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/root.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/root.md index aab2477..502aebb 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/root.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/root.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: Command-based DSC Resource manifest schema reference --- @@ -15,7 +15,7 @@ The data file that defines a command-based DSC Resource. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.json Type: object ``` @@ -47,6 +47,13 @@ The `$schema` property indicates the canonical URI of this schema that the manif against. This property is mandatory. DSC uses this value to validate the manifest against the correct JSON schema. +The JSON schemas for DSC are published in multiple versions and forms. This documentation is for +the latest version of the schema. As a convenience, you can specify either the full URI for the +schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema for a specific +semantic version, the latest schema for a minor version, or the latest schema for a major version +of DSC. For more information about schema URIs and versioning, see +[DSC JSON Schema URIs](../../schema-uris.md). + For every version of the schema, there are three valid urls: - `.../resource/manifest.json` @@ -56,12 +63,12 @@ For every version of the schema, there are three valid urls: - `.../bundled/resource/manifest.json` - The URL to the bundled schema. When it's used for validation, the validating client only needs to - retrieve this schema. + The URL to the canonically bundled schema. When it's used for validation, the validating client + only needs to retrieve this schema. This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can still - validate the document when it uses this schema, other tools might error or behave in unexpected - ways. + validate the document when it uses this schema, other tools may error or behave in unexpected + ways if they don't fully support the 2020-12 specification. - `.../bundled/resource/manifest.vscode.json` @@ -70,22 +77,55 @@ For every version of the schema, there are three valid urls: don't include. This schema uses keywords that are only recognized by VS Code. While DSC can still validate the - document when it uses this schema, other tools might error or behave in unexpected ways. + document when it uses this schema, other tools may error or behave in unexpected ways. ```yaml Type: string Required: true Format: URI ValidValues: [ - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/bundled/resource/manifest.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/bundled/resource/manifest.vscode.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json - https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json + https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3/resource/manifest.json + https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.1/resource/manifest.json + https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.1.0/resource/manifest.json + https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.0/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json + https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json + https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json ] ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/embedded.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/embedded.md index e5c30a3..f49617b 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/embedded.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/embedded.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the embedded instance schema in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest embedded schema reference --- @@ -15,7 +15,7 @@ Defines a JSON Schema that validates a DSC Resource instance. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.schema.json#/properties/embedded +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.schema.json#/properties/embedded Type: object ``` @@ -88,7 +88,7 @@ property's name. The value is a subschema that validates the property. Resources can define any properties they need for managing instances. DSC defines shared schemas for well-known properties. Some well-known properties enable a DSC Resource to use built-in processing. The well-known properties always start with an underscore (`_`) and DSC Resources that -use these properties can't override or extend them. If a resource specifies a well-known property +use these properties may not override or extend them. If a resource specifies a well-known property in the embedded schema, the schema _must_ define the property as a reference. - [_exist](#_exist) @@ -103,11 +103,11 @@ whether an instance should be added, updated, or removed during a set operation. provides shared semantics for DSC Resources and integrating tools, but doesn't enable any additional built-in processing with DSC. -If defined, this property must be a reference to the schema for the well-known property: +If defined, this property must be a reference to the schema for the canonical property: ```json "_exist": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/exist.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/exist.json" } ``` @@ -119,11 +119,11 @@ The read-only `_inDesiredState` property indicates whether a resource instance i state. This property is mandatory for command-based DSC Resources that define the [test][02] property. -If defined, this property must be a reference to the schema for the well-known property: +If defined, this property must be a reference to the schema for the canonical property: ```json "_inDesiredState": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/inDesiredState.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/inDesiredState.json" } ``` @@ -135,11 +135,11 @@ Resources that need to distinguish between whether unmanaged entries in a list a removed can define the write-only `_purge` property. This property provides shared semantics for DSC Resources and integrating tools, but doesn't enable any built-in processing with DSC. -If defined, this property must be a reference to the schema for the well-known property: +If defined, this property must be a reference to the schema for the canonical property: ```json "_purge": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/purge.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/purge.json" } ``` @@ -151,11 +151,11 @@ The read-only `_rebootRequested` property indicates whether a resource instance after a set operation. To use DSC's built-in reboot notification processing, resources must define this property in their manifest. -If defined, this property must be a reference to the schema for the well-known property: +If defined, this property must be a reference to the schema for the canonical property: ```json "_rebootRequested": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/rebootRequested.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/rebootRequested.json" } ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/property.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/property.md index 58273e3..8a0bb87 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/property.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/schema/property.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'schema' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest schema property schema reference --- @@ -15,7 +15,7 @@ Defines how to retrieve the JSON Schema that validates a DSC Resource instance. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.schema.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.schema.json Type: object ``` @@ -103,9 +103,9 @@ The `command` property defines how DSC must call the resource to get the JSON sc its instances. The value of this property must be an object and define the `executable` property. When publishing a manifest with the `command` property, Microsoft recommends publishing the JSON -schema to a publicly available URI and setting the `url` property to that URI. This enables -authoring tools and other integrating applications to validate instances without running the -command locally. +schema to a publicly available URI that matches the `$id` property of the instance schema. This +enables authoring tools and other integrating applications to validate instances without running +the command locally. ```yaml Type: object @@ -145,16 +145,3 @@ Resource. The value for this property must be a valid JSON schema that defines t Type: object MinimumPropertyCount: 1 ``` - -### url - -The `url` property defines the URL to the resource's published JSON schema. It's used by -integrating tools for resources that define the `command` property instead of the `embedded` -property. - - - -```yaml -Type: string -Format: uri -``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/set.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/set.md index 4ba157b..7a0f9e4 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/set.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/set.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'set' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest set property schema reference --- @@ -15,7 +15,7 @@ Defines how to enforce state for a DSC Resource instance. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.set.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.set.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/test.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/test.md index 1f04aea..7305b34 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/test.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/test.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'test' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest test property schema reference --- @@ -15,7 +15,7 @@ Defines how to test whether a DSC Resource instance is in the desired state. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.test.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.test.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/validate.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/validate.md index a9e6dfa..449305c 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/validate.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/validate.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'validate' property in a DSC Resource manifest -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest validate property schema reference --- @@ -15,7 +15,7 @@ Indicates how to call a group resource to test whether nested instances are vali ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.validate.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.validate.json Type: object ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/whatif.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/whatif.md index 3d9b4a8..404806d 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/whatif.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/manifest/whatif.md @@ -1,6 +1,6 @@ --- description: JSON schema reference for the 'whatIf' property in a DSC Resource manifest -ms.date: 01/17/2024 +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource manifest whatIf property schema reference --- @@ -15,7 +15,7 @@ Defines how to indicate whether and how the set command will modify an instance. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/manifest.whatIf.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.whatIf.json Type: object ``` @@ -274,7 +274,7 @@ ValidValues: [state, stateAndDiff] [01]: ../../../cli/config/set.md -[02]: ../../../cli/config/set.md#--what-if +[02]: ../../../cli/config/set.md#-w---what-if [03]: ./set.md [04]: ../properties/exist.md [05]: ./root.md#schema-1 diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/exist.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/exist.md index bad7816..dab3086 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/exist.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/exist.md @@ -1,6 +1,6 @@ --- -description: JSON schema reference for the '_exist' well-known DSC Resource property. -ms.date: 05/09/2024 +description: JSON schema reference for the '_exist' canonical DSC Resource property. +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource _exist property schema --- @@ -15,17 +15,17 @@ Indicates whether an instance should exist. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/exist.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/exist.json Type: boolean DefaultValue: true ``` ## Description -The `_exist` property indicates that the resource can enforce whether instances exist, handling -whether an instance should be added, updated, or removed during a set operation. This property -provides shared semantics for DSC Resources and integrating tools, but doesn't enable any -additional built-in processing with DSC. +The `_exist` canonical property indicates that the resource can enforce whether instances exist, +handling whether an instance should be added, updated, or removed during a set operation. This +property provides shared semantics for DSC Resources and integrating tools. Resources that define +this property indicate to DSC that they adhere to the contract for the canonical property. Resources should only define this property when their implementation adheres to the following behavior contract: @@ -37,13 +37,13 @@ behavior contract: 1. When the get operation queries for an instance that doesn't exist, the returned JSON always defines the `_exist` property as `false`. - The resource _can_ omit the `_exist` property from the result JSON when the instance exists. + The resource _may_ omit the `_exist` property from the result JSON when the instance exists. To add this property to a resource's instance schema, define the property with the following snippet: ```json "_exist": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/exist.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/exist.json" } ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/inDesiredState.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/inDesiredState.md index 0d5921e..a0c04d6 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/inDesiredState.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/inDesiredState.md @@ -1,6 +1,6 @@ --- -description: JSON schema reference for the '_inDesiredState' well-known DSC Resource property. -ms.date: 05/09/2024 +description: JSON schema reference for the '_inDesiredState' canonical DSC Resource property. +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource _inDesiredState property schema --- @@ -15,16 +15,16 @@ Indicates whether an instance is in the desired state. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/inDesiredState.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/inDesiredState.json Type: [boolean, 'null'] ReadOnly: true ``` ## Description -The `_inDesiredState` property indicates whether a resource instance is in the desired state. -Whether a resource's instance schema should include this property depends on whether the resource's -[manifest][01] defines the [test][02] property. +The `_inDesiredState` canonical property indicates whether a resource instance is in the desired +state. Whether a resource's instance schema should include this property depends on whether the +resource's [manifest][01] defines the [test][02] property. If the resource's manifest doesn't define `test`, the resource relies on DSC's synthetic test. The resource's instance schema must not include the `_inDesiredState` property. @@ -43,7 +43,7 @@ snippet: ```json "_inDesiredState": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/inDesiredState.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/inDesiredState.json" } ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/overview.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/overview.md index 3d2ad1b..02797a4 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/overview.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/overview.md @@ -1,24 +1,23 @@ --- description: >- - Information about the list of well-known DSC Resource properties, including their purpose and how + Information about the list of canonical DSC Resource properties, including their purpose and how to add them to a resource's manifest. -ms.date: 05/09/2024 +ms.date: 07/03/2025 ms.topic: reference -title: DSC well-known properties +title: DSC canonical properties --- -# DSC well-known properties +# DSC canonical properties -DSC has support for several well-known properties. Some well-known properties enable a DSC Resource -to use built-in processing. The well-known properties always start with an underscore (`_`) and DSC -Resources that use these properties can't override or extend them. +DSC has support for several canonical properties. Some canonical properties enable a DSC Resource +to use built-in processing. The canonical properties always start with an underscore (`_`) and DSC +Resources that use these properties may not override or extend them. ## _exist The `_exist` property indicates that the resource can enforce whether instances exist, handling whether an instance should be added, updated, or removed during a set operation. This property -provides shared semantics for DSC Resources and integrating tools, but doesn't enable any -additional built-in processing with DSC. +provides shared semantics for DSC Resources and integrating tools. For more information, see [DSC Resource _exist property schema][01]. diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/purge.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/purge.md index 49c0fe2..54d4feb 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/purge.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/purge.md @@ -1,6 +1,6 @@ --- -description: JSON schema reference for the '_purge' well-known DSC Resource property. -ms.date: 05/09/2024 +description: JSON schema reference for the '_purge' canonical DSC Resource property. +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource _purge property schema --- @@ -15,7 +15,7 @@ Indicates that the resource should treat non-defined entries in a list as invali ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/purge.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/purge.json Type: [boolean, 'null'] WriteOnly: true ``` @@ -33,7 +33,7 @@ behavior based on the property's value in an instance's desired state: - When `_purge` is `false` or not specified, the resource ignores unmanaged entries. When a resource defines this property, it should always document which property or properties -`_purge` affects. A resource can define `_purge` as a subproperty for a complex property. +`_purge` affects. A resource may define `_purge` as a subproperty for a complex property. This property is write-only. A resource that uses the `_purge` property should never return `_purge` in the instance's output state. A resource must not define `_purge` as a mandatory @@ -44,6 +44,6 @@ snippet: ```json "_inDesiredState": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/purge.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/purge.json" } ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/rebootRequested.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/rebootRequested.md index 56d7066..f31bdc7 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/rebootRequested.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/resource/properties/rebootRequested.md @@ -1,6 +1,6 @@ --- -description: JSON schema reference for the '_rebootRequested' well-known DSC Resource property. -ms.date: 05/09/2024 +description: JSON schema reference for the '_rebootRequested' canonical DSC Resource property. +ms.date: 07/03/2025 ms.topic: reference title: DSC Resource _rebootRequested property schema --- @@ -15,15 +15,15 @@ Indicates whether an instance is in the desired state. ```yaml SchemaDialect: https://json-schema.org/draft/2020-12/schema -SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/rebootRequested.json +SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/rebootRequested.json Type: [boolean, 'null'] ReadOnly: true ``` ## Description -The `_rebootRequested` property indicates whether a resource instance requires a reboot after a set -operation. +The `_rebootRequested` canonical property indicates whether a resource instance requires a reboot +after a set operation. If the resource determines during a set operation that the node needs to reboot before the state change takes full effect, it should return the instance's data with the `_rebootRequested` property @@ -43,6 +43,6 @@ snippet: ```json "_rebootRequested": { - "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/rebootRequested.json" + "$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/rebootRequested.json" } ``` diff --git a/dsc/docs-conceptual/dsc-3.0/reference/schemas/schema-uris.md b/dsc/docs-conceptual/dsc-3.0/reference/schemas/schema-uris.md index f0fae11..431c117 100644 --- a/dsc/docs-conceptual/dsc-3.0/reference/schemas/schema-uris.md +++ b/dsc/docs-conceptual/dsc-3.0/reference/schemas/schema-uris.md @@ -1,6 +1,6 @@ --- description: Reference for how DSC schemas are versioned and published and the URIs used to retrieve them. -ms.date: 03/25/2025 +ms.date: 07/03/2025 ms.topic: reference title: DSC JSON Schema URIs --- @@ -120,11 +120,11 @@ authoring schema describing a resource manifest is The following table illustrates these differences between schema forms: -| Schema form | Prefix folder | File extension | -|:------------------------|:-------------:|:--------------:| +| Schema form | Prefix folder | File extension | +|:-----------------------|:-------------:|:--------------:| | Canonical (nonbundled) | _None_ | `.json` | -| Canonically bundled | `bundled` | `.json` | -| Enhanced autoring | `bundled` | `.vscode.json` | +| Canonically bundled | `bundled` | `.json` | +| Enhanced autoring | `bundled` | `.vscode.json` | ### Canonical (nonbundled) schemas @@ -193,37 +193,65 @@ of the prefix URI used to retrieve the schema. |:---------------|:--------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.json` | +| `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json` | +| `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json` | The following list of tables defines the recognized URIs for the configuration document schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/config/document.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/config/document.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/config/document.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/config/document.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/config/document.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/config/document.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/config/document.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/config/document.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/config/document.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/config/document.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-----------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-----------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json` | ### Resource manifest schema @@ -234,38 +262,136 @@ the prefix URI used to retrieve the schema. | Version folder | ID | |:---------------|:----------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/manifest.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json` | +| `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json` | +| `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json` | The following list of tables defines the recognized URIs for the resource manifest schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:--------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/resource/manifest.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/resource/manifest.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/resource/manifest.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/resource/manifest.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/resource/manifest.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/resource/manifest.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/resource/manifest.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/resource/manifest.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/manifest.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/manifest.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/manifest.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/manifest.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/manifest.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/manifest.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/manifest.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/resource/manifest.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/resource/manifest.vscode.json` | + +### Extension manifest schema + +The following table defines the value of the `$id` keyword for each published version of the +extension manifest schema. The `$id` is the same across all forms of the schema and regardless of +the prefix URI used to retrieve the schema. + +| Version folder | ID | +|:---------------|:-----------------------------------------------------------------------------------------------| +| `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/extension/manifest.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/extension/manifest.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.json` | +| `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/extension/manifest.json` | +| `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/extension/manifest.json` | +| `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/extension/manifest.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/extension/manifest.json` | + +The following list of tables defines the recognized URIs for the resource manifest schema: + +- Short URIs by version and form: + + | Form | Version | Recognized URI | + |:-----------------------|:---------|:---------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/extension/manifest.json` | + | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/extension/manifest.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/extension/manifest.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/extension/manifest.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/extension/manifest.vscode.json` | + +- GitHub URIs by version and form: + + | Form | Version | Recognized URI | + |:-----------------------|:---------|:--------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/extension/manifest.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/extension/manifest.json` | + | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/extension/manifest.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/extension/manifest.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/extension/manifest.json` | + | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/extension/manifest.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/extension/manifest.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/extension/manifest.vscode.json` | ### Output schema for dsc config get command @@ -273,41 +399,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc config get` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:-----------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/config/get.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/config/get.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/get.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/config/get.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/get.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/get.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/get.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:---------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/get.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/config/get.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/config/get.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/config/get.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/get.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/get.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/get.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/get.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/get.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/get.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:--------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/config/get.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/get.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/get.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/get.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/get.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/get.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/get.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/get.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/get.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/get.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/get.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/config/get.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/get.vscode.json` | ### Output schema for dsc config set command @@ -315,41 +469,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc config set` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:-----------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/config/set.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/config/set.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/set.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/config/set.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/set.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/set.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/set.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:---------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/set.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/config/set.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/config/set.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/config/set.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/set.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/set.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/set.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/set.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/set.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/set.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:--------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/config/set.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/set.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/set.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/set.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/set.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/set.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/set.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/set.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/set.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/set.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/set.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/config/set.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/set.vscode.json` | ### Output schema for dsc config test command @@ -357,41 +539,139 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc config test` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:------------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/config/test.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/config/test.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/test.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/config/test.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/test.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/test.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/test.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:----------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/test.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/config/test.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/config/test.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/config/test.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/test.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/test.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/test.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/test.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/test.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/config/test.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:---------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/config/test.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/test.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/config/test.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/config/test.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/config/test.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/config/test.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/test.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/test.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/test.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/test.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/test.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/config/test.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/config/test.vscode.json` | + +### Output schema for dsc extension list command + +The following table defines the value of the `$id` keyword for each published version of the output +schema for the `dsc extension list` command. The `$id` is the same across all forms of the schema +and regardless of the prefix URI used to retrieve the schema. + +| Version folder | ID | +|:---------------|:---------------------------------------------------------------------------------------------------| +| `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/extension/list.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/extension/list.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/extension/list.json` | +| `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/extension/list.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/extension/list.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/extension/list.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/extension/list.json` | + +The following list of tables defines the recognized URIs for the output schema: + +- Short URIs by version and form: + + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/extension/list.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/extension/list.vscode.json` | + +- GitHub URIs by version and form: + + | Form | Version | Recognized URI | + |:-----------------------|:---------|:------------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/extension/list.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/extension/list.json` | + | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/extension/list.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/extension/list.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/extension/list.vscode.json` | ### Output schema for dsc resource get command @@ -399,41 +679,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc resource get` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:-------------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/get.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/get.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/get.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/get.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-----------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/get.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/resource/get.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/resource/get.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/resource/get.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/get.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/get.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/get.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/get.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/get.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/get.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:----------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/get.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/get.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/get.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/get.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/get.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/get.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/get.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/get.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/get.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/get.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/get.vscode.json` | ### Output schema for dsc resource list command @@ -441,41 +749,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc resource list` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:--------------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/list.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/list.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/list.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/list.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/list.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/list.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/list.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/list.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/resource/list.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/resource/list.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/resource/list.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/list.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/list.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/list.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/list.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/list.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/list.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-----------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/list.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/list.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/list.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/list.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/list.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/list.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/list.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/list.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/list.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/list.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/list.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/list.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/list.vscode.json` | ### Output schema for dsc resource schema command @@ -483,41 +819,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc resource schema` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:----------------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/schema.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/schema.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/schema.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/schema.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/schema.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/schema.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/schema.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:--------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/schema.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/resource/schema.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/resource/schema.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/resource/schema.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/schema.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/schema.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/schema.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/schema.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/schema.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/schema.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-------------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/schema.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/schema.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/schema.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/schema.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/schema.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/schema.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/schema.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/schema.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/schema.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/schema.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/schema.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/schema.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/schema.vscode.json` | ### Output schema for dsc resource set command @@ -525,41 +889,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc resource set` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:-------------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/set.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/set.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/set.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/set.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/set.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/set.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/set.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-----------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/set.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/resource/set.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/resource/set.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/resource/set.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/set.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/set.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/set.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/set.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/set.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/set.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:----------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/set.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/set.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/set.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/set.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/set.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/set.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/set.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/set.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/set.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/set.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/set.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/set.vscode.json` | ### Output schema for dsc resource test command @@ -567,41 +959,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc resource test` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:--------------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/test.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/test.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/test.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/test.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/test.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/test.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/test.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/test.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/resource/test.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/resource/test.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/resource/test.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/test.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/test.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/test.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/test.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/test.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/resource/test.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-----------------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/test.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/test.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/resource/test.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/resource/test.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/test.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/test.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/test.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/test.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/test.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/test.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/resource/test.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/resource/test.vscode.json` | ### Output schema for dsc schema command @@ -609,41 +1029,69 @@ The following table defines the value of the `$id` keyword for each published ve schema for the `dsc schema` command. The `$id` is the same across all forms of the schema and regardless of the prefix URI used to retrieve the schema. -| Version folder | ID | -|:---------------|:----------------------------------------------------------------------------------------------| +| Version folder | ID | +|:---------------|:-------------------------------------------------------------------------------------------| | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/schema.json` | +| `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/schema.json` | +| `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/schema.json` | | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/schema.json` | | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/schema.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/schema.json` | +| `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/schema.json` | The following list of tables defines the recognized URIs for the output schema: - Short URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:--------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:-----------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/schema.json` | + | Canonically bundled | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/schema.json` | + | Canonically bundled | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/schema.json` | | Canonical (nonbundled) | `v3` | `https://aka.ms/dsc/schemas/v3/outputs/schema.json` | + | Canonical (nonbundled) | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/outputs/schema.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/outputs/schema.json` | | Canonical (nonbundled) | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/outputs/schema.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/outputs/schema.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/outputs/schema.json` | | Canonical (nonbundled) | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/outputs/schema.json` | - | Canonically bundled | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/schema.json` | - | Canonically bundled | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/schema.json` | - | Canonically bundled | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/schema.json` | - | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/schema.vscode.json` | - | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/schema.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3` | `https://aka.ms/dsc/schemas/v3/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.1` | `https://aka.ms/dsc/schemas/v3.1/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://aka.ms/dsc/schemas/v3.1.0/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0` | `https://aka.ms/dsc/schemas/v3.0/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://aka.ms/dsc/schemas/v3.0.2/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://aka.ms/dsc/schemas/v3.0.1/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://aka.ms/dsc/schemas/v3.0.0/bundled/outputs/schema.vscode.json` | - GitHub URIs by version and form: - | Form | Version | Recognized URI | - |:------------------------|:---------|:-------------------------------------------------------------------------------------------------------------| + | Form | Version | Recognized URI | + |:-----------------------|:---------|:----------------------------------------------------------------------------------------------------------| + | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/schema.json` | + | Canonically bundled | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/schema.json` | + | Canonically bundled | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/schema.json` | + | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/schema.json` | | Canonical (nonbundled) | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/outputs/schema.json` | + | Canonical (nonbundled) | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/outputs/schema.json` | + | Canonical (nonbundled) | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/outputs/schema.json` | | Canonical (nonbundled) | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/outputs/schema.json` | + | Canonical (nonbundled) | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/outputs/schema.json` | + | Canonical (nonbundled) | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/schema.json` | | Canonical (nonbundled) | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/schema.json` | - | Canonically bundled | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/schema.json` | - | Canonically bundled | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/schema.json` | - | Canonically bundled | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/schema.json` | - | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/schema.vscode.json` | - | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/schema.vscode.json` | - | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.1.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0.2` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0.1` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/outputs/schema.vscode.json` | + | Enhanced authoring | `v3.0.0` | `https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/outputs/schema.vscode.json` | [01]: https://semver.org