Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
1 change: 1 addition & 0 deletions schemas/build.ps1
Original file line number Diff line number Diff line change
@@ -675,6 +675,7 @@ process {
"$OutputDirectory/config"
"$OutputDirectory/metadata"
"$OutputDirectory/definitions"
"$OutputDirectory/extension"
"$OutputDirectory/outputs"
"$OutputDirectory/resource"
)
69 changes: 68 additions & 1 deletion schemas/schemas.config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
host: https://raw.githubusercontent.com
prefix: PowerShell/DSC/main/schemas
version: v3.0
version: v3.1.0
docs_base_url: https://learn.microsoft.com/powershell/dsc
docs_version_pin: view=dsc-3.0&preserve-view=true
bundle_schemas:
# Resource manifest bundle
- ConfigFilePath: extension/manifest.json
Name: manifest
OutputDirectory: bundled/extension
OutputFormat: ['Json', 'JsonVSCode']

# Resource manifest bundle
- ConfigFilePath: resource/manifest.json
Name: manifest
@@ -37,6 +43,11 @@ bundle_schemas:
OutputDirectory: bundled/outputs/config
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: outputs/extension/list.json
Name: list
OutputDirectory: bundled/outputs/extension
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: outputs/resource/get.json
Name: get
OutputDirectory: bundled/outputs/resource
@@ -61,3 +72,59 @@ bundle_schemas:
Name: test
OutputDirectory: bundled/outputs/resource
OutputFormat: ['Json', 'JsonVSCode']

# stdout schema bundles
- ConfigFilePath: extension/stdout/discover.json
Name: discover
OutputDirectory: bundled/extension/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/delete.json
Name: delete
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/export.json
Name: export
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/get.json
Name: get
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/list.json
Name: list
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/resolve.json
Name: resolve
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/schema.json
Name: schema
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/set.json
Name: set
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/test.json
Name: test
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/validate.json
Name: validate
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']

- ConfigFilePath: resource/stdout/whatIf.json
Name: whatIf
OutputDirectory: bundled/resource/stdout
OutputFormat: ['Json', 'JsonVSCode']
414 changes: 414 additions & 0 deletions schemas/src/config/document.yaml

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions schemas/src/definitions/extensionCapabilities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: https://json-schema.org/draft/2020-12/schema
$id: <HOST>/<PREFIX>/<VERSION>/definitions/extensionCapabilities.yaml

title: Resource capabilities
description: >-
Define the operations DSC can invoke for an extension and how the extension behaves when invoked.

markdownDescription: |-
***
[_Online Documentation_][00]
***

DSC extensions always have at least one capability. Extension capabilities define the operations
DSC can invoke for an extension and how the extension behaves when invoked.

<!-- Link reference definitions -->
[00]: <DOCS_BASE_URL>/reference/schemas/definitions/extensionCapabilities?<DOCS_VERSION_PIN>

type: array
items:
type: string
enum:
- discover
markdownEnumDescriptions:
- |- # discover
***
[_Online Documentation_][00]
***

An extension with the `discover` capability supports retrieving the path to DSC resource
manifests that aren't included in the `PATH` or `DSC_RESOURCE_PATH`, like manifests for
software installed as AppX packages.

An extension has this capability when its manifest defines the [discover][02]
property.

<!-- Link reference definitions -->
[00]: <DOCS_BASE_URL>/reference/schemas/definitions/extensionCapabilities?<DOCS_VERSION_PIN>#discover
[02]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>
42 changes: 42 additions & 0 deletions schemas/src/definitions/extensionType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: https://json-schema.org/draft/2020-12/schema
$id: <HOST>/<PREFIX>/<VERSION>/definitions/extensionType.yaml

title: DSC extension fully qualified type name
description: |
The namespaced name of the DSC extension, using the syntax:

<owner>[.<group>][.<area>][.<subarea>]/<name>

For example:

- Microsoft/Example
- Microsoft.DSC/Docs
- Microsoft.Windows.Appx/Discover

type: string
pattern: ^\w+(\.\w+){0,3}\/\w+$

# VS Code only
markdownDescription: |
***
[_Online Documentation_][01]
***

The namespaced name of the DSC extension, using the syntax:

```yaml
owner[{.namespace}]/name
```

For example:

- `Microsoft/Example`
- `Microsoft.DSC/Docs`
- `Microsoft.Windows.Appx/Discover`

[01]: <DOCS_BASE_URL>/reference/schemas/definitions/extensiontype?<DOCS_VERSION_PIN>
patternErrorMessage: |
Invalid type name. Valid extension type names always define an owner and a name separated by a
slash, like `Microsoft/Example`. Type names may optionally include the group, area, and subarea
segments to namespace the resource under the owner, like `Microsoft.Windows.Appx/Discover`.
10 changes: 10 additions & 0 deletions schemas/src/definitions/resourceKind.yaml
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ enum:
- adapter
- group
- importer
- exporter

# VS Code only

@@ -56,3 +57,12 @@ markdownEnumDescriptions:
Indicates that the manifest is for a resource that resolves an external source to DSC
resource instances. DSC processes the resolved instances as nested instances for the importer
resource.
- | # exporter
<!-- force a line break -->

Indicates that the manifest is for a resource that only implements the **Export** operation
to use for inventory and fact-gathering scenarios. For exporter resources, DSC expects the
resource to return one or more resource definitions to recursively export, rather than the
actual state of instances.

For more information about the expected output, see [Export resource operation stdout][02].
16 changes: 9 additions & 7 deletions schemas/src/definitions/resourceType.yaml
Original file line number Diff line number Diff line change
@@ -6,15 +6,16 @@ title: DSC resource fully qualified type name
description: |
The namespaced name of the DSC resource, using the syntax:

owner[.group][.area]/name
<owner>[.<group>][.<area>][.<subarea>]/<name>

For example:

- Microsoft.SqlServer/Database
- Microsoft.SqlServer.Database/User
- Microsoft/OSInfo
- Microsoft.SqlServer/Database
- Microsoft.SqlServer.Database/User

type: string
pattern: ^\w+(\.\w+){0,2}\/\w+$
pattern: ^\w+(\.\w+){0,3}\/\w+$

# VS Code only
markdownDescription: |
@@ -25,16 +26,17 @@ markdownDescription: |
The namespaced name of the DSC resource, using the syntax:

```yaml
owner[.group][.area]/name
<owner>[.<group>][.<area>][.<subarea>]/<name>
```

For example:

- `Microsoft/OSInfo`
- `Microsoft.SqlServer/Database`
- `Microsoft.SqlServer.Database/User`

[01]: <DOCS_BASE_URL>/reference/schemas/definitions/resourcetype?<DOCS_VERSION_PIN>
patternErrorMessage: |
Invalid type name. Valid resource type names always define an owner and a name separated by a
slash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace
the resource under the owner, like `Microsoft.Windows/Registry`.
slash, like `Microsoft/OSInfo`. Type names may optionally include the group, area, and subarea
segments to namespace the resource under the owner, like `Microsoft.Windows/Registry`.
85 changes: 85 additions & 0 deletions schemas/src/extension/manifest.discover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: https://json-schema.org/draft/2020-12/schema
$id: <HOST>/<PREFIX>/<VERSION>/extension/manifest.discover.yaml

title: Discover operation command
description: >-
Defines how DSC must call the DSC extension to discover the paths to resource manifests.
markdownDescription: | # VS Code only
***
[_Online Documentation_][00]
***

Defines how DSC must call the DSC extension to discover the paths to resource manifests. An
extension that defines this field in its manifest has the `discover` capability.

By default, DSC only discovers resource manifests in the `PATH` environment variable. If the
`DSC_RESOURCE_PATH` environment variable is defined, DSC searches those paths for resource
manifests instead.

If initial discovery finds any extension manifests that have the `discover` capability, DSC uses
those extensions to discover resources that aren't available in `PATH` or `DSC_RESOURCE_PATH`.

For more information about the output DSC expects the extension to emit for this command, see
[Discover extension operation stdout][01].

[00]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>
[00]: <DOCS_BASE_URL>/reference/schemas/extension/stdout/discover?<DOCS_VERSION_PIN>

type: object
required:
- executable
properties:
executable:
$ref: /<PREFIX>/<VERSION>/definitions/commandExecutable.yaml
markdownDescription: |
***
[_Online Documentation_][01]
***

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.

[01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>#executable
args:
$ref: /<PREFIX>/<VERSION>/definitions/commandArgs.yaml
markdownDescription: |
***
[_Online Documentation_][01]
***

Defines an array of strings to pass as arguments to the command. DSC passes the arguments to
the command in the order they're specified.

For example, the given the following definition:

```json
{
"executable": "myextension",
"args": ["discover", "--all"],
}
```

DSC invokes the command for the resource as:

```bash
myextension discover --all
```

[01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>#args

defaultSnippets: # VS Code only
- label: ' Define without arguments'
markdownDescription: |
Define the `discover` command for the extension when no arguments are required.
body:
executable: ${2:executable_name}
- label: ' Define with arguments'
markdownDescription: |-
Define the `discover` command for the extension when at least one argument is required.
body:
executable: ${2:executable_name}
args:
- ${3:--first-argument}
514 changes: 514 additions & 0 deletions schemas/src/extension/manifest.yaml

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions schemas/src/extension/stdout/discover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: https://json-schema.org/draft/2020-12/schema
$id: <HOST>/<PREFIX>/<VERSION>/extension/stdout/discover.yaml

title: Discover extension operation stdout
description: >-
Represents the full path a DSC resource manifest.
markdownDescription: | # VS Code only
***
[_Online Documentation_][00]
***
Represents the full path a DSC resource manifest. DSC expects every JSON Line emitted to stdout
for the **Discover** operation to adhere to this schema. An extension indicates that it supports
the **Discover** operation by defining the [discover][01] field in its manifest.
The output must be a JSON object that defines the `manifestPath` property.
If the extension doesn't discover any resources, it shouldn't emit any data to stdout.
Unless the extension raises an error, it should exit with code `0`, even when no resources are
discovered.
[00]: <DOCS_BASE_URL>/reference/schemas/extension/stdout/discover?<DOCS_VERSION_PIN>
[01]: <DOCS_BASE_URL>/reference/schemas/extension/manifest/discover?<DOCS_VERSION_PIN>
type: object
additionalProperties: false
required:
- manifestPath
properties:
manifestPath:
title: DSC manifest path
description: >-
Defines the absolute path to a DSC resource manifest on the system.
markdownDescription: |-
***
[_Online Documentation_][00]
***
Defines the absolute path to a DSC resource manifest on the system. DSC expects this value to
be the absolute path to a manifest file that exists. If this value is a relative path, or if
the manifest doesn't exist, DSC raises an error.
[00]: <DOCS_BASE_URL>/reference/schemas/extension/stdout/discover?<DOCS_VERSION_PIN>#manifestPath
type: string
44 changes: 44 additions & 0 deletions schemas/src/outputs/extension/list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: https://json-schema.org/draft/2020-12/schema
$id: <HOST>/<PREFIX>/<VERSION>/outputs/extension/list.yaml

title: dsc extension list result
description: >-
Describes the return data for a DSC extension instance from the
`dsc extension list` command.
type: object
properties:
type:
$ref: /<PREFIX>/<VERSION>/definitions/extensionType.yaml
version:
$ref: /<PREFIX>/<VERSION>/definitions/semver.yaml
capabilities:
$ref: /<PREFIX>/<VERSION>/definitions/extensionCapabilities.yaml
description:
title: Extension description
description: >-
A short synopsis of the DSC extension's purpose.
# Should this include a maximum length or a pattern that forbids newlines?
type: string
path:
title: Path
description: >-
Indicates the path to the DSC extension on the file system.
type: string
directory:
title: Directory
description: >-
Indicates the path to the folder containing the DSC extension on the file
system.
type: string
author:
title: Author
description: >-
Indicates the name of the person or organization that developed and
maintains the DSC extension.
type:
- string
- 'null'
manifest:
$ref: /<PREFIX>/<VERSION>/extension/manifest.yaml
68 changes: 60 additions & 8 deletions schemas/src/resource/manifest.schema.yaml
Original file line number Diff line number Diff line change
@@ -345,8 +345,21 @@ properties:
description: >-
Indicates that the DSC resource uses the standard `_exist` property to specify
whether an instance should exist as a boolean value that defaults to `true`.
const:
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/exist.yaml
enum:
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/exist.json
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/exist.json
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/exist.json
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/exist.json
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/exist.json
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/exist.json
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/exist.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/exist.json
# VS Code only
markdownDescription: |
***
@@ -374,8 +387,21 @@ properties:
Indicates that the DSC resource returns this value for it's own `test` method. This
read-only property is mandatory when the manifest defines the `test` property. It
shouldn't be included if the DSC resource relies on DSC's synthetic testing.
const:
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/inDesiredState.yaml
enum:
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/inDesiredState.json
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/inDesiredState.json
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/inDesiredState.json
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/inDesiredState.json
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/inDesiredState.json
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/inDesiredState.json
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/inDesiredState.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/inDesiredState.json
# VS Code only
markdownDescription: |
***
@@ -393,8 +419,21 @@ properties:
Indicates that the DSC resource uses the standard `_purge` property to specify
whether the DSC resource should remove all non-specified members when it manages
an array of members or values.
const:
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/purge.yaml
enum:
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/purge.json
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/purge.json
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/purge.json
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/purge.json
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/purge.json
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/purge.json
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/purge.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/purge.json
# VS Code only
markdownDescription: |
***
@@ -412,8 +451,21 @@ properties:
Indicates whether a resource instance requires a reboot after a set operation. To use
DSC's built-in reboot notification processing, resources must define this property in
their manifest.
const:
$ref: <HOST>/<PREFIX>/<VERSION>/resource/properties/rebootRequested.yaml
enum:
- $ref: https://aka.ms/dsc/schemas/v3/resource/properties/rebootRequested.json
- $ref: https://aka.ms/dsc/schemas/v3.1/resource/properties/rebootRequested.json
- $ref: https://aka.ms/dsc/schemas/v3.1.0/resource/properties/rebootRequested.json
- $ref: https://aka.ms/dsc/schemas/v3.0/resource/properties/rebootRequested.json
- $ref: https://aka.ms/dsc/schemas/v3.0.0/resource/properties/rebootRequested.json
- $ref: https://aka.ms/dsc/schemas/v3.0.1/resource/properties/rebootRequested.json
- $ref: https://aka.ms/dsc/schemas/v3.0.2/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/resource/properties/rebootRequested.json
- $ref: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/resource/properties/rebootRequested.json
# VS Code only
markdownDescription: |
***
455 changes: 449 additions & 6 deletions schemas/src/resource/manifest.yaml

Large diffs are not rendered by default.

73 changes: 63 additions & 10 deletions schemas/src/resource/stdout/export.yaml
Original file line number Diff line number Diff line change
@@ -11,20 +11,73 @@ markdownDescription: | # VS Code only
[_Online Documentation_][00]
***
Represents the actual state of a resource instance in DSC. DSC expects every JSON Line emitted to
stdout for the **Export** operation to adhere to this schema.
DSC expects a resource implementing the **Export** operation to return a series of JSON Lines.
The output must be a JSON object. The object must be a valid representation of an instance of the
resource.
The data that DSC expects depends on whether the resource kind is defined as `exporter`:
Command resources define their instance schema with the [schema.command][01] or
[schema.embedded][02] fields in their resource manifest. If a command resource returns JSON that
is invalid against the resource instance schema, DSC raises an error.
Adapted resource instances are validated by their adapter when the adapter invokes them.
- When the resource kind is `exporter`, DSC expects the resource to return JSON Lines
representing DSC resource instance definitions to recursively export.
- When the resource kind isn't `exporter`, DSC expects the resource to return JSON Lines
representing the actual state of every instance of the resource on the system.
[00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/command?<DOCS_VERSION_PIN>
[02]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/embedded?<DOCS_VERSION_PIN>
type: object
anyOf:
- title: Typical resource expected output
description: >-
Defines the expected output for a resource whose `kind` isn't `exporter` as the actual state
of every existing instance of that resource on the system.
type: object
markdownDescription: | # VS Code only
***
[_Online Documentation_][00]
***
DSC expects a typical resource implementing the **Export** operation to return a series of
JSON Lines.
Each JSON Line represents the actual state of a resource instance in DSC. DSC expects every
JSON Line emitted to stdout for the **Export** operation to adhere to this schema.
The output must be a JSON object. The object must be a valid representation of an instance of
the resource.
Command resources define their instance schema with the [schema.command][01] or
[schema.embedded][02] fields in their resource manifest. If a command resource returns JSON that
is invalid against the resource instance schema, DSC raises an error.
Adapted resource instances are validated by their adapter when the adapter invokes them.
[00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>#typical-resource-expected-output
[01]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/command?<DOCS_VERSION_PIN>
[02]: <DOCS_BASE_URL>/reference/schemas/resource/manifest/schema/embedded?<DOCS_VERSION_PIN>
- title: Exporter resource expected output
description: >-
Defines the expected output for an `exporter` resource as a resource instance definition to
recursively invoke the **Export** operation for.
$ref: /<PREFIX>/<VERSION>/config/document.resource.yaml
markdownDescription: | # VS Code only
***
[_Online Documentation_][00]
***
DSC expects an exporter resource (one with the `kind` field in its manifest set to
`exporter`) to return a series of JSON Lines.
Each JSON Line represents a DSC resource instance definition to recursively invoke the
**Export** operation for. DSC expects every JSON Line emitted to stdout for the **Export**
operation to adhere to this schema.
The output must be a JSON object adhering to [DSC resource instance][01] schema, rather than
the instance schema for a specific resource. DSC expects the object to define at least the
[name][02] and [type][03] fields. If the object defines the [properties][04] field, DSC
passes those properties to the resource when recursively exporting it so that the resource
may filter the exported instance results.
[00]: <DOCS_BASE_URL>/reference/schemas/resource/stdout/export?<DOCS_VERSION_PIN>#typical-resource-expected-output
[01]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>
[02]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>#name
[02]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>#type
[02]: <DOCS_BASE_URL>/reference/schemas/config/resource?<DOCS_VERSION_PIN>#properties-1
413 changes: 413 additions & 0 deletions schemas/v3.0.1/bundled/config/document.json

Large diffs are not rendered by default.

647 changes: 647 additions & 0 deletions schemas/v3.0.1/bundled/config/document.vscode.json

Large diffs are not rendered by default.

318 changes: 318 additions & 0 deletions schemas/v3.0.1/bundled/outputs/config/get.json

Large diffs are not rendered by default.

352 changes: 352 additions & 0 deletions schemas/v3.0.1/bundled/outputs/config/get.vscode.json

Large diffs are not rendered by default.

334 changes: 334 additions & 0 deletions schemas/v3.0.1/bundled/outputs/config/set.json

Large diffs are not rendered by default.

368 changes: 368 additions & 0 deletions schemas/v3.0.1/bundled/outputs/config/set.vscode.json

Large diffs are not rendered by default.

340 changes: 340 additions & 0 deletions schemas/v3.0.1/bundled/outputs/config/test.json

Large diffs are not rendered by default.

374 changes: 374 additions & 0 deletions schemas/v3.0.1/bundled/outputs/config/test.vscode.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json",
"title": "dsc resource get result",
"description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.",
"anyOf": [
{
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json"
},
{
"type": "array",
"items": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json"
}
}
],
"$defs": {
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json",
"title": "dsc resource get result (simple)",
"description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.",
"type": "object",
"required": [
"actualState"
],
"properties": {
"actualState": {
"title": "Actual state",
"description": "This property always represents the current state of the DSC resource instance as returned by its `get` method. DSC validates this return value against the DSC resource's schema.",
"type": "object"
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json",
"title": "dsc resource get result (full)",
"description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.",
"type": "object",
"required": [
"metadata",
"name",
"result",
"type"
],
"properties": {
"metadata": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json"
},
"name": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"type": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"result": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json"
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json",
"title": "Resource instance result metadata",
"description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.",
"type": "object",
"required": [
"duration"
],
"properties": {
"duration": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
}
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
}
}
139 changes: 139 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/get.vscode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json",
"title": "dsc resource get result",
"description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.",
"anyOf": [
{
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json"
}
}
],
"$defs": {
"PowerShell": {
"DSC": {
"main": {
"schemas": {
"v3.0.1": {
"outputs": {
"resource": {
"get.simple.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.simple.json",
"title": "dsc resource get result (simple)",
"description": "Describes the return data for a single DSC resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.",
"type": "object",
"required": [
"actualState"
],
"properties": {
"actualState": {
"title": "Actual state",
"description": "This property always represents the current state of the DSC resource instance as returned by its `get` method. DSC validates this return value against the DSC resource's schema.",
"type": "object"
}
}
},
"get.full.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.full.json",
"title": "dsc resource get result (full)",
"description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.",
"type": "object",
"required": [
"metadata",
"name",
"result",
"type"
],
"properties": {
"metadata": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json"
},
"name": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"type": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"result": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/get.json"
}
}
}
}
},
"metadata": {
"resourceInstanceResult.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json",
"title": "Resource instance result metadata",
"description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.",
"type": "object",
"required": [
"duration"
],
"properties": {
"duration": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
}
}
}
}
},
"Microsoft.DSC": {
"duration.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
}
},
"definitions": {
"instanceName.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1,
"patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n"
},
"resourceType.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n",
"patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n"
}
}
}
}
}
}
}
}
}
1,259 changes: 1,259 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/list.json

Large diffs are not rendered by default.

2,115 changes: 2,115 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/list.vscode.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/schema.json",
"title": "DSC resource schema result",
"description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.",
"type": "object",
"$defs": {}
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/schema.vscode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/schema.json",
"title": "DSC resource schema result",
"description": "Describes the return data for a DSC resource from the `dsc resource schema` command. This command always returns the DSC resource's JSON schema document.",
"type": "object",
"$defs": {}
}
129 changes: 129 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/set.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json",
"title": "dsc resource set result",
"description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.",
"anyOf": [
{
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json"
},
{
"type": "array",
"items": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json"
}
}
],
"$defs": {
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json",
"title": "dsc resource set result (simple)",
"description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.",
"type": "object",
"required": [
"beforeState",
"afterState",
"changedProperties"
],
"properties": {
"beforeState": {
"title": "State before enforcing",
"description": "This property always represents the desired state of the DSC resource instance before the `set` method runs. DSC validates this return value against the DSC resource's schema.",
"type": "object"
},
"afterState": {
"title": "State after enforcing",
"description": "This property always represents the current state of the DSC resource instance as returned by its `set` method after enforcing the desired state. DSC validates this return value against the DSC resource's schema.",
"type": "object"
},
"changedProperties": {
"title": "Changed properties",
"description": "This property always represents the list of property names for the DSC resource instance that the `set` method modified. When this value is an empty array, the `set` method didn't enforce any properties for the instance.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json",
"title": "dsc resource set result (full)",
"description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.",
"type": "object",
"required": [
"metadata",
"name",
"result",
"type"
],
"properties": {
"metadata": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json"
},
"name": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"type": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"result": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json"
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json",
"title": "Resource instance result metadata",
"description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.",
"type": "object",
"required": [
"duration"
],
"properties": {
"duration": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
}
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
}
}
155 changes: 155 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/set.vscode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json",
"title": "dsc resource set result",
"description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. The return data is either a single object that describes the enforced state of a non-nested instance or an array of objects that describe the enforced state of the nested instances for a group or adapter resource.",
"anyOf": [
{
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json"
}
}
],
"$defs": {
"PowerShell": {
"DSC": {
"main": {
"schemas": {
"v3.0.1": {
"outputs": {
"resource": {
"set.simple.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.simple.json",
"title": "dsc resource set result (simple)",
"description": "Describes the return data for a DSC resource instance from the `dsc resource set` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource set` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.",
"type": "object",
"required": [
"beforeState",
"afterState",
"changedProperties"
],
"properties": {
"beforeState": {
"title": "State before enforcing",
"description": "This property always represents the desired state of the DSC resource instance before the `set` method runs. DSC validates this return value against the DSC resource's schema.",
"type": "object"
},
"afterState": {
"title": "State after enforcing",
"description": "This property always represents the current state of the DSC resource instance as returned by its `set` method after enforcing the desired state. DSC validates this return value against the DSC resource's schema.",
"type": "object"
},
"changedProperties": {
"title": "Changed properties",
"description": "This property always represents the list of property names for the DSC resource instance that the `set` method modified. When this value is an empty array, the `set` method didn't enforce any properties for the instance.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"set.full.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.full.json",
"title": "dsc resource set result (full)",
"description": "Describes the return data for the full result of the `set` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config set` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource set` command.",
"type": "object",
"required": [
"metadata",
"name",
"result",
"type"
],
"properties": {
"metadata": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json"
},
"name": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"type": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"result": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/set.json"
}
}
}
}
},
"metadata": {
"resourceInstanceResult.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json",
"title": "Resource instance result metadata",
"description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.",
"type": "object",
"required": [
"duration"
],
"properties": {
"duration": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
}
}
}
}
},
"Microsoft.DSC": {
"duration.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
}
},
"definitions": {
"instanceName.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1,
"patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n"
},
"resourceType.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n",
"patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n"
}
}
}
}
}
}
}
}
}
135 changes: 135 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json",
"title": "dsc resource test result",
"description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.",
"anyOf": [
{
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json"
},
{
"type": "array",
"items": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json"
}
}
],
"$defs": {
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json",
"title": "dsc resource test result (simple)",
"description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.",
"type": "object",
"required": [
"desiredState",
"actualState",
"inDesiredState",
"differingProperties"
],
"properties": {
"desiredState": {
"title": "Desired state",
"description": "This property always represents the desired state of the DSC resource instance as specified to DSC.",
"type": "object"
},
"actualState": {
"title": "Actual state",
"description": "This property always represents the current state of the DSC resource instance as returned by its `test` method or, if the DSC resource doesn't define the `test` method, by its `get` method. DSC validates this return value against the DSC resource's schema.",
"type": "object"
},
"inDesiredState": {
"title": "Instance is in the desired state",
"description": "This property indicates whether the instance is in the desired state.",
"type": "boolean"
},
"differingProperties": {
"title": "Differing properties",
"description": "This property always represents the list of property names for the DSC resource instance that aren't in the desired state. When this property is an empty array, the instance is in the desired state.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json",
"title": "dsc resource test result (full)",
"description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.",
"type": "object",
"required": [
"metadata",
"name",
"result",
"type"
],
"properties": {
"metadata": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json"
},
"name": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"type": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"result": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json"
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json",
"title": "Resource instance result metadata",
"description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.",
"type": "object",
"required": [
"duration"
],
"properties": {
"duration": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
}
}
}
}
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
},
"https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
}
}
161 changes: 161 additions & 0 deletions schemas/v3.0.1/bundled/outputs/resource/test.vscode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json",
"title": "dsc resource test result",
"description": "Describes the return data for a DSC resource instance from the `dsc resource get` command. The return data is either a single object that describes the tested state of a non-nested instance or an array of objects that describe the tested state of the nested instances for a group or adapter resource.",
"anyOf": [
{
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json"
}
}
],
"$defs": {
"PowerShell": {
"DSC": {
"main": {
"schemas": {
"v3.0.1": {
"outputs": {
"resource": {
"test.simple.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.simple.json",
"title": "dsc resource test result (simple)",
"description": "Describes the return data for a single DSC resource instance from the `dsc resource test` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource test` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.",
"type": "object",
"required": [
"desiredState",
"actualState",
"inDesiredState",
"differingProperties"
],
"properties": {
"desiredState": {
"title": "Desired state",
"description": "This property always represents the desired state of the DSC resource instance as specified to DSC.",
"type": "object"
},
"actualState": {
"title": "Actual state",
"description": "This property always represents the current state of the DSC resource instance as returned by its `test` method or, if the DSC resource doesn't define the `test` method, by its `get` method. DSC validates this return value against the DSC resource's schema.",
"type": "object"
},
"inDesiredState": {
"title": "Instance is in the desired state",
"description": "This property indicates whether the instance is in the desired state.",
"type": "boolean"
},
"differingProperties": {
"title": "Differing properties",
"description": "This property always represents the list of property names for the DSC resource instance that aren't in the desired state. When this property is an empty array, the instance is in the desired state.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"test.full.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.full.json",
"title": "dsc resource test result (full)",
"description": "Describes the return data for the full result of the `test` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config test` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource test` command.",
"type": "object",
"required": [
"metadata",
"name",
"result",
"type"
],
"properties": {
"metadata": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json"
},
"name": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"type": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"result": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/outputs/resource/test.json"
}
}
}
}
},
"metadata": {
"resourceInstanceResult.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/resourceInstanceResult.json",
"title": "Resource instance result metadata",
"description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.",
"type": "object",
"required": [
"duration"
],
"properties": {
"duration": {
"$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
}
}
}
}
},
"Microsoft.DSC": {
"duration.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
}
},
"definitions": {
"instanceName.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1,
"patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n"
},
"resourceType.json": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$",
"markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n",
"patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n"
}
}
}
}
}
}
}
}
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/bundled/outputs/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/schema.json",
"title": "DSC resource schema result",
"description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.",
"type": "object",
"$defs": {}
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/bundled/outputs/schema.vscode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/outputs/schema.json",
"title": "DSC resource schema result",
"description": "Describes the return data for a DSC resource from the `dsc schema` command. This command always returns a JSON schema document.",
"type": "object",
"$defs": {}
}
1,142 changes: 1,142 additions & 0 deletions schemas/v3.0.1/bundled/resource/manifest.json

Large diffs are not rendered by default.

1,987 changes: 1,987 additions & 0 deletions schemas/v3.0.1/bundled/resource/manifest.vscode.json

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions schemas/v3.0.1/config/document.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json",
"title": "DSC configuration document schema",
"description": "Describes a valid DSC configuration document.",
"type": "object",
"required": [
"$schema",
"resources"
],
"properties": {
"$schema": {
"title": "Schema",
"description": "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.",
"type": "string",
"format": "uri",
"enum": [
"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.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.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://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://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.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.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",
"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"
]
},
"parameters": {
"title": "DSC configuration document parameters",
"description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.",
"type": "object",
"additionalProperties": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json"
}
},
"variables": {
"title": "Configuration variables",
"description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.",
"type": "object"
},
"resources": {
"title": "DSC configuration document resources",
"description": "Defines a list of DSC resource instances for the configuration to manage.",
"type": "array",
"minItems": 0,
"items": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json"
}
},
"metadata": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json"
}
}
}
22 changes: 22 additions & 0 deletions schemas/v3.0.1/config/document.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.metadata.json",
"title": "Configuration metadata",
"description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.",
"type": "object",
"properties": {
"Microsoft.DSC": {
"type": "object",
"title": "DSC metadata",
"description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.",
"unevaluatedProperties": false,
"properties": {
"securityContext": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json",
"default": "Current",
"description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `Current`."
}
}
}
}
}
228 changes: 228 additions & 0 deletions schemas/v3.0.1/config/document.parameter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.parameter.json",
"title": "Parameter",
"description": "Defines a runtime option for a DSC configuration document.",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json"
},
"defaultValue": {
"title": "Default value",
"description": "Defines the default value for the parameter.",
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json"
},
"allowedValues": {
"title": "Allowed values",
"description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.",
"type": "array",
"items": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json"
}
},
"description": {
"title": "Parameter description",
"description": "Defines a synopsis for the parameter explaining its purpose.",
"type": "string"
},
"metadata": {
"title": "Parameter metadata",
"description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.",
"type": "object"
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "int"
}
}
},
"then": {
"properties": {
"minValue": {
"title": "Minimum value",
"description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.",
"type": "integer"
},
"maxValue": {
"title": "Maximum value",
"description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.",
"type": "integer"
}
}
}
},
{
"if": {
"oneOf": [
{
"properties": {
"type": {
"const": "string"
}
}
},
{
"properties": {
"type": {
"const": "secureString"
}
}
},
{
"properties": {
"type": {
"const": "array"
}
}
}
]
},
"then": {
"properties": {
"minLength": {
"title": "Minimum length",
"description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.",
"type": "integer",
"minimum": 0
},
"maxLength": {
"title": "Maximum length",
"description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.",
"type": "integer",
"minimum": 0
}
}
}
},
{
"if": {
"oneOf": [
{
"properties": {
"type": {
"const": "string"
}
}
},
{
"properties": {
"type": {
"const": "secureString"
}
}
}
]
},
"then": {
"properties": {
"defaultValue": {
"type": "string"
},
"allowedValues": {
"items": {
"type": "string"
}
}
}
}
},
{
"if": {
"oneOf": [
{
"properties": {
"type": {
"const": "object"
}
}
},
{
"properties": {
"type": {
"const": "secureObject"
}
}
}
]
},
"then": {
"properties": {
"defaultValue": {
"type": "object"
},
"allowedValues": {
"items": {
"type": "object"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "int"
}
}
},
"then": {
"properties": {
"defaultValue": {
"type": "integer"
},
"allowedValues": {
"items": {
"type": "integer"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "array"
}
}
},
"then": {
"properties": {
"defaultValue": {
"type": "array"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "bool"
}
}
},
"then": {
"properties": {
"defaultValue": {
"type": "boolean"
},
"allowedValues": {
"items": {
"type": "boolean"
}
}
}
}
}
]
}
34 changes: 34 additions & 0 deletions schemas/v3.0.1/config/document.resource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.resource.json",
"title": "DSC resource instance",
"description": "Defines an instance of a DSC resource in a configuration.",
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"type": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"name": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json"
},
"dependsOn": {
"title": "Instance depends on",
"description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.",
"type": "array",
"items": {
"type": "string",
"uniqueItems": true,
"pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$"
}
},
"properties": {
"title": "Managed instance properties",
"description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.",
"type": "object"
}
}
}
38 changes: 38 additions & 0 deletions schemas/v3.0.1/definitions/commandArgs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandArgs.json",
"title": "Executable Command Arguments",
"description": "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 resource to an argument, you can define a single item in the array as a JSON object, 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.",
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"title": "String argument",
"description": "Any item in the argument array can be a string representing a static argument to pass to the command."
},
{
"type": "object",
"title": "JSON input argument",
"description": "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. You can define the `mandatory` property to 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.",
"required": [
"jsonInputArg"
],
"unevaluatedProperties": false,
"properties": {
"jsonInputArg": {
"title": "JSON input argument name",
"description": "Defines the argument that accepts the JSON property bag for the resource as input.",
"type": "string"
},
"mandatory": {
"title": "Mandatory argument",
"description": "Defines whether the argument is mandatory. If this property is set to `true`, DSC passes an empty string when no JSON input is provided. The default value is `false`.",
"type": "boolean",
"default": false
}
}
}
]
}
}
7 changes: 7 additions & 0 deletions schemas/v3.0.1/definitions/commandExecutable.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/commandExecutable.json",
"title": "Executable Command Name",
"description": "The name of the command to run.",
"type": "string"
}
7 changes: 7 additions & 0 deletions schemas/v3.0.1/definitions/hadErrors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/hadErrors.json",
"title": "Had Errors",
"description": "Indicates whether any of the DSC resources returned a non-zero exit code.",
"type": "boolean"
}
11 changes: 11 additions & 0 deletions schemas/v3.0.1/definitions/inputKind.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/inputKind.json",
"title": "Executable Command Input Type",
"description": "Defines how DSC should pass input to the command, either as environment variables or JSON over stdin. When this value isn't defined, DSC doesn't send the resource any input.",
"type": "string",
"enum": [
"env",
"stdin"
]
}
9 changes: 9 additions & 0 deletions schemas/v3.0.1/definitions/instanceName.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/instanceName.json",
"title": "Instance name",
"description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.",
"type": "string",
"pattern": "^[a-zA-Z0-9 ]+$",
"minLength": 1
}
39 changes: 39 additions & 0 deletions schemas/v3.0.1/definitions/message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json",
"title": "Message",
"description": "A message emitted by a DSC resource with associated metadata.",
"type": "object",
"required": [
"name",
"type",
"message",
"level"
],
"properties": {
"name": {
"title": "Message source instance name",
"description": "The short, human-readable name for the instance that emitted the message, as defined in the DSC configuration document.",
"type": "string"
},
"type": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json"
},
"message": {
"title": "Message content",
"description": "The actual content of the message as emitted by the DSC resource.",
"type": "string",
"minLength": 1
},
"level": {
"title": "Message level",
"description": "Indicates the severity of the message.",
"type": "string",
"enum": [
"error",
"warning",
"information"
]
}
}
}
10 changes: 10 additions & 0 deletions schemas/v3.0.1/definitions/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/messages.json",
"title": "Messages",
"description": "A list of structured messages emitted by the DSC resources during an operation.",
"type": "array",
"items": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/message.json"
}
}
16 changes: 16 additions & 0 deletions schemas/v3.0.1/definitions/parameters/dataTypes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/dataTypes.json",
"title": "Data Types",
"description": "Defines the data type for the parameter value.",
"type": "string",
"enum": [
"string",
"secureString",
"int",
"bool",
"object",
"secureObject",
"array"
]
}
12 changes: 12 additions & 0 deletions schemas/v3.0.1/definitions/parameters/validValueTypes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/parameters/validValueTypes.json",
"$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n",
"type": [
"string",
"integer",
"object",
"array",
"boolean"
]
}
20 changes: 20 additions & 0 deletions schemas/v3.0.1/definitions/resourceCapabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceCapabilities.json",
"title": "Resource capabilities",
"description": "Define the operations you can invoke for a resource and how the resource behaves when invoked.",
"type": "array",
"items": {
"type": "string",
"enum": [
"get",
"set",
"setHandlesExist",
"whatIf",
"test",
"delete",
"export",
"resolve"
]
}
}
13 changes: 13 additions & 0 deletions schemas/v3.0.1/definitions/resourceKind.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceKind.json",
"title": "Resource kind",
"description": "Defines whether the resource is a normal DSC resource, a group resource, or an adapter resource. This property is only required for group resources.",
"type": "string",
"enum": [
"resource",
"adapter",
"group",
"importer"
]
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/definitions/resourceType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/resourceType.json",
"title": "DSC resource fully qualified type name",
"description": "The namespaced name of the DSC resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n",
"type": "string",
"pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$"
}
11 changes: 11 additions & 0 deletions schemas/v3.0.1/definitions/returnKind.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/returnKind.json",
"title": "Return Kind",
"type": "string",
"enum": [
"state",
"stateAndDiff"
],
"$comment": "While the enumeration for return kind is the same for the `set` and `test`\nmethod, the way it changes the behavior of the command isn't. The description\nkeyword isn't included here because the respective schemas for those methods\ndocument the behavior themselves."
}
9 changes: 9 additions & 0 deletions schemas/v3.0.1/definitions/semver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json",
"type": "string",
"title": "Semantic Version",
"description": "A valid semantic version (semver) string.\n\nFor reference, see https://semver.org/\n",
"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-]+)*))?$",
"$comment": "A valid semantic version ([semver][01]) string.\n\nThis value uses the [suggested regular expression][02] to validate whether the string is valid\nsemver. This is the same pattern, made multi-line for easier readability:\n\n```regex\n^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\n(?:-(\n (?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)\n (?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))\n*))?\n(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$\n```\n\nThe first line matches the `major.minor.patch` components of the version. The middle lines match\nthe pre-release components. The last line matches the build metadata component.\n\n[01]: https://semver.org/\n[02]: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n"
}
11 changes: 11 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/context.json",
"title": "Operation context",
"description": "Defines whether the operation was for a configuration or a resource. If the value for this metadata property is `configuration`, DSC was run through the `dsc config` command. If the value is `resource`, DSC was run with the `dsc resource` command.",
"type": "string",
"enum": [
"resource",
"configuration"
]
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/duration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json",
"title": "Duration",
"description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A",
"type": "string",
"format": "duration"
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json",
"title": "Start date and time",
"description": "Defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.",
"type": "string",
"format": "date-time"
}
11 changes: 11 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json",
"title": "Execution type",
"description": "Defines whether DSC actually applied an operation to the configuration or was run in `WhatIf` mode. This property is always `Actual` for `Get`, `Test`, and `Export` operations. For `Set` operations, this value is `WhatIf` when DSC is invoked with the `--whatIf` argument.",
"type": "string",
"enum": [
"actual",
"whatIf"
]
}
13 changes: 13 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/operation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json",
"title": "Operation",
"description": "Defines the operation that DSC applied to the configuration document: `Get`, `Set`, `Test`, or `Export`.",
"type": "string",
"enum": [
"get",
"set",
"test",
"export"
]
}
12 changes: 12 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json",
"title": "Security context",
"description": "Defines the security context that DSC was run under. If the value for this metadata property is `elevated`, DSC was run as root (non-Windows) or an elevated session with Administrator privileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in a non-elevated session.",
"type": "string",
"enum": [
"current",
"elevated",
"restricted"
]
}
8 changes: 8 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json",
"title": "Start date and time",
"description": "Defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 as `date-time`, like `2024-04-14T08:49:51.395686600-07:00`.",
"type": "string",
"format": "date-time"
}
7 changes: 7 additions & 0 deletions schemas/v3.0.1/metadata/Microsoft.DSC/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json",
"title": "DSC Version",
"description": "Defines the version of DSC that ran the command. This value is always the semantic version of the DSC command, like `3.0.0-preview.7`.",
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/definitions/semver.json"
}
49 changes: 49 additions & 0 deletions schemas/v3.0.1/metadata/configurationDocumentResult.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/metadata/configurationDocumentResult.json",
"title": "Configuration result metadata",
"description": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.",
"type": "object",
"required": [
"Microsoft.DSC"
],
"properties": {
"Microsoft.DSC": {
"title": "DSC context metadata",
"description": "The child properties for this metadata describe the context of a DSC operation, including the version of DSC used, when the operation started and ended, and the security context the operation was invoked under.",
"type": "object",
"required": [
"version",
"operation",
"executionType",
"startDatetime",
"endDatetime",
"duration",
"securityContext"
],
"properties": {
"version": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/version.json"
},
"operation": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/operation.json"
},
"executionType": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/executionType.json"
},
"startDatetime": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/startDatetime.json"
},
"endDatetime": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/endDatetime.json"
},
"duration": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/duration.json"
},
"securityContext": {
"$ref": "/PowerShell/DSC/main/schemas/v3.0.1/metadata/Microsoft.DSC/securityContext.json"
}
}
}
}
}
Loading