|
| 1 | +--- |
| 2 | +description:Microsoft.DSC.Debug/Echo resource reference documentation |
| 3 | +ms.date:06/22/2025 |
| 4 | +ms.topic:reference |
| 5 | +title:Microsoft.DSC.Debug/Echo |
| 6 | +--- |
| 7 | + |
| 8 | +#Microsoft.DSC.Debug/Echo |
| 9 | + |
| 10 | +##Synopsis |
| 11 | + |
| 12 | +A debug resource for testing and troubleshooting Microsoft DSC (Desired State Configuration) behavior. |
| 13 | + |
| 14 | +##Metadata |
| 15 | + |
| 16 | +```yaml |
| 17 | +Version:1.0.0 |
| 18 | +Kind:resource |
| 19 | +Tags:[Windows, MacOS, Linux] |
| 20 | +Author:Microsoft |
| 21 | +``` |
| 22 | +
|
| 23 | +## Instance definition syntax |
| 24 | +
|
| 25 | +```yaml |
| 26 | +resources: |
| 27 | + -name:<instance name> |
| 28 | +type:Microsoft.DSC.Debug/Echo |
| 29 | +properties: |
| 30 | +# Required properties |
| 31 | +output:anyOf# array, boolean, integer, object, string |
| 32 | +``` |
| 33 | +
|
| 34 | +## Description |
| 35 | +
|
| 36 | +The`Microsoft.DSC.Debug/Echo` resource is a debugging utility that echoes back the configuration |
| 37 | +data passed to it. This resource is particularly useful for: |
| 38 | + |
| 39 | +-Testing DSC configuration syntax and structure. |
| 40 | +-Debugging parameter passing between resources. |
| 41 | +-Verifying that DSC is processing configurations as expected. |
| 42 | +-Understanding how DSC transforms and handles configuration data. |
| 43 | + |
| 44 | +> [!NOTE] |
| 45 | +> This resource is installed with DSC itself on any systems. |
| 46 | +> |
| 47 | +> You can update this resource by updating DSC. When you update DSC, the updated version of this |
| 48 | +> resource is automatically available. |
| 49 | + |
| 50 | +## Capabilities |
| 51 | + |
| 52 | +The resource has the following capabilities: |
| 53 | + |
| 54 | +-`get`- You can use the resource to retrieve the actual state of an instance. |
| 55 | +-`set`- You can use the resource to enforce the desired state for an instance. |
| 56 | +-`test`- You can use the resource to check if the actual state matches the desired state |
| 57 | +for an instance. |
| 58 | + |
| 59 | +For more information about resource capabilities, see |
| 60 | +[DSC resource capabilities][01]. |
| 61 | + |
| 62 | +> [!NOTE] |
| 63 | +> Invoking any operation on this resource doesn't affect the system. |
| 64 | +> This resource only echoes the value in the output. |
| 65 | + |
| 66 | +## Examples |
| 67 | + |
| 68 | +1. [Basic echo example](./examples/basic-echo-example.md) - Shows how to use the Echo resource |
| 69 | +for basic string and complex data output. |
| 70 | + |
| 71 | +## Properties |
| 72 | + |
| 73 | +The following list describes the properties for the resource. |
| 74 | + |
| 75 | +- **Required properties:** <a id="required-properties"></a> The following property is always |
| 76 | +required when defining an instance of the resource. An instance that doesn't define this |
| 77 | +property is invalid. For more information, see the "Required resource properties" section in |
| 78 | +[DSC resource properties][02] |
| 79 | + |
| 80 | + -[output](#output) - The value to be echoed back by the resource. |
| 81 | + |
| 82 | +- **Key properties:** <a id="key-properties"></a> The following property uniquely identifies an |
| 83 | +instance. If two instances of a resource have the same value for this property, the instances are |
| 84 | +conflicting. For more information about key properties, see the "Key resource properties" section in [DSC resource properties][03]. |
| 85 | + |
| 86 | + -[output](#output) (required) - The value to be echoed back by the resource. |
| 87 | + |
| 88 | +### output |
| 89 | + |
| 90 | +<details><summary>Expand for <code>output</code> property metadata</summary> |
| 91 | + |
| 92 | +```yaml |
| 93 | +Type : anyOf (array, boolean, integer, object, string) |
| 94 | +IsRequired : true |
| 95 | +IsKey : true |
| 96 | +IsReadOnly : false |
| 97 | +IsWriteOnly : false |
| 98 | +``` |
| 99 | + |
| 100 | +</details> |
| 101 | + |
| 102 | +Defines the value to be echoed back by the resource. The `output` property can be any of the following types: |
| 103 | + |
| 104 | +| Type | Description | |
| 105 | +|:-------:|:---------------------------------------------| |
| 106 | +| array | An array of values. | |
| 107 | +| boolean | A boolean value (`true` or `false`). | |
| 108 | +| integer | An integer value. | |
| 109 | +| object | A JSON object of key-value pairs. | |
| 110 | +| string | A string value. | |
| 111 | + |
| 112 | +## Instance validating schema |
| 113 | + |
| 114 | +The following snippet contains the JSON Schema that validates an instance of the resource. The |
| 115 | +validating schema only includes schema keywords that affect how the instance is validated. All |
| 116 | +non validating keywords are omitted. |
| 117 | + |
| 118 | +```json |
| 119 | +{ |
| 120 | + "type": "object", |
| 121 | + "required": [ |
| 122 | + "output" |
| 123 | + ], |
| 124 | + "properties": { |
| 125 | + "output": { |
| 126 | + "$ref": "#/definitions/Output" |
| 127 | + } |
| 128 | + }, |
| 129 | + "additionalProperties": false, |
| 130 | + "definitions": { |
| 131 | + "Output": { |
| 132 | + "anyOf": [ |
| 133 | + { |
| 134 | + "type": "array", |
| 135 | + "items": true |
| 136 | + }, |
| 137 | + { |
| 138 | + "type": "boolean" |
| 139 | + }, |
| 140 | + { |
| 141 | + "type": "integer", |
| 142 | + "format": "int64" |
| 143 | + }, |
| 144 | + true, |
| 145 | + true, |
| 146 | + { |
| 147 | + "type": "object" |
| 148 | + }, |
| 149 | + { |
| 150 | + "type": "string" |
| 151 | + } |
| 152 | + ] |
| 153 | + } |
| 154 | + } |
| 155 | +} |
| 156 | +``` |
| 157 | + |
| 158 | +## See also |
| 159 | + |
| 160 | +-[Microsoft/OSInfo resource][04] |
| 161 | +-[DSC resource capabilities][01] |
| 162 | + |
| 163 | +<!-- Link definitions --> |
| 164 | +[01]:../../../../../concepts/resources/capabilities.md |
| 165 | +[02]:../../../../../concepts/resources/properties.md#required-resource-properties |
| 166 | +[03]:../../../../../concepts/resources/properties.md#key-resource-properties |
| 167 | +[04]:../../osinfo/index.md |