dsc resource set result schema reference

Synopsis

The result output from the dsc resource set command.

Metadata

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

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.

DSC returns a simple set response when the instance isn't a group resource, adapter resource, or nested inside a group or adapter resource.

When the retrieved instance is for group resource, adapter resource, or nested inside a group or adapter resource, DSC returns a full set result, which also includes the resource type and instance name.

Simple set response

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.

Required properties

The output always includes these properties:

Properties

beforeState

Represents the state of the instance returned before the set operation. DSC validates this property's value against the resource's instance schema.

Type:     object
Required: true

afterState

Represents the state of the instance returned after the set operation. DSC validates this property's value against the resource's instance schema.

Type:     object
Required: true

changedProperties

Defines the names of the properties the set operation enforced. If this value is an empty array, the resource made no changes during the set operation.

Type:      array
Required:  true
ItemsType: string

Full set result

Describes the return data for the full result of the set operation for a resource instance. This data is returned:

  • For every instance in a configuration document when you use the dsc config set command.
  • For nested instances of a group or adapter resource when you use the dsc resource set command.

Required properties

Properties

metadata

Defines metadata DSC returns for a configuration operation. The properties under the Microsoft.DSC property describe the context of the operation.

  • duration 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.
Type:     object
Required: true

type

The type property identifies the instance's DSC Resource by its fully qualified type name. For more information about type names, see DSC Resource fully qualified type name schema reference.

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

name

The name property identifies the instance by its short, unique, human-readable name.

Type:     string
Required: true

result

The result property includes the enforced state for the resource. This value is either:

  • The simple set response for the instance
  • An array of full set result objects for each nested instance, if the resource is a group or adapter resource.
Type: [object, array]
Required: true