dsc resource list result schema reference

Synopsis

The result output from the dsc resource list command.

Metadata

SchemaDialect: https://json-schema.org/draft/2020-12/schema
SchemaID:      https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/outputs/resource/list.json
Type:          object

Description

The output from the dsc resource list command includes a representation of discovered DSC Resources as a series of JSON Lines. This schema describes the JSON object returned for each resource.

Required properties

Each resource in the output always includes these properties:

Properties

type

Identifies the fully qualified type name of the resource. It's used to specify the resource in configuration documents and as the value of the --resource flag when using the dsc resource * commands. For more information about resource type names, see DSC Resource fully qualified type name schema reference.

Type:     string
Required: true
Pattern:  ^\w+(\.\w+){0,2}\/\w+$

kind

Identifies whether a resource is an adapter resource, a group resource, or neither. This value is either defined in the resource manifest or inferred by DSC. For more information about resource kinds, see DSC Resource kind schema reference.

Type:          string
Required:      true
ValidValues:  [Resource, Adapter, Group]

version

Represents the current version of the resource as a valid semantic version (semver) string. The version applies to the resource, not the software it manages.

Type:     string
Required: true
Pattern:  ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$

capabilities

Defines the operations and behaviors the resource is implemented to support. This property is an array of capabilities. Resources always have the Get capability, but the other capabilities are optional and depend on the resource.

The following list describes the available capabilities for a resource:

Type:              array
Required:          true
ItemsMustBeUnique: true
ItemsType:         string
ItemsValidValues: [Get, Set, SetHandlesExist, Test, Delete, Export]

description

Defines a synopsis for the resource's purpose as a short string. If the resource doesn't have a description, this property is null.

Type:     [string, 'null']
Required: true

path

Represents the path to the resource's manifest on the machine. For adapted resources, this property identifies the path to the file that defines the resource instead.

Type:     string
Required: true

directory

Represents the path to the folder containing the resource's manifest on the machine. For adapted resources, this property identifies the path to the folder containing the file that defines the resource instead.

Type:     string
Required: true

implementedAs

Indicates how the DSC Resource was implemented. For command-based resources, this value is always Command.

author

Indicates the name of the person or organization that developed and maintains the DSC Resource. If this property is null, the author is unknown.

Type:     [string, 'null']
Required: true

properties

Defines the property names for adapted resources. For non-adapted resources, this property is an empty array.

Type:         array
Required:     true
ItemsType:    string
ItemsPattern: ^\w+$

requireAdapter

Defines the fully qualified type name of the DSC Resource Adapter that this resource is made available through. This value is only defined for adapted resources. For non-adapted resources, this value is always null.

Type:     [string, 'null']
Required: true

manifest

Represents the values defined in the resource's manifest. This value is null for resources that aren't command-based. For more information on the value for this property, see Command-based DSC Resource manifest schema reference.

Type:     [object, 'null']
Required: true