dsc config set result schema reference

Synopsis

The result output from the dsc config set command.

Metadata

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

Description

The output from the dsc config set command includes the state of every resource instance in the configuration before and after the set operation, and the list of properties the operation changed for each instance.

Required properties

The output always includes these properties:

Properties

metadata

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

Type:     object
Required: true

Microsoft.DSC

The metadata under this property describes the context of the overall operation:

  • version 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.
  • operation defines the operation that DSC applied to the configuration document: Get, Set, Test, or Export.
  • executionType 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 --what-if argument.
  • startDatetime defines the start date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 (see date-time), like 2024-04-14T08:49:51.395686600-07:00.
  • endDatetime defines the end date and time for the DSC operation as a timestamp following the format defined in RFC3339, section 5.6 (see date-time), like 2024-04-14T08:49:51.395686600-07:00.
  • 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.
  • securityContext 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.

results

Defines the list of results for the set operation invoked against every instance in the configuration document. Every entry in the list includes the resource's type name, instance name, and the result data for an instance.

Type:      array
Required:  true
ItemsType: object

type

An item's 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

An item's name property identifies the instance by its short, unique, human-readable name.

Type:     string
Required: true

result

An item's result property includes the enforced state for the resource instance. The value for this property adheres to the same schema as the output for the dsc resource set command. For more information, see dsc resource set result schema reference.

messages

Defines the list of structured messages emitted by resources during the set operation. For more information, see Structured message schema reference.

Type:     array
Required: true

hadErrors

Indicates whether the operation encountered any errors. This value is true if the configuration document failed validation or any resource exited with an exit code other than 0.

Type:     boolean
Required: true