Skip to content

Commit eb35393

Browse files
committed
Acrolinx and rebase
1 parent 1ce6d48 commit eb35393

File tree

7 files changed

+202
-180
lines changed

7 files changed

+202
-180
lines changed

dsc/docs-conceptual/dsc-3.0/concepts/configurations.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: >-
33
DSC configuration documents are YAML or JSON data files that define the desired state of a system
4-
declaratively. They are used to retrieve, validate, and enforce the state of multiple resource
4+
declaratively. They're used to retrieve, validate, and enforce the state of multiple resource
55
instances.
66
ms.date: 03/04/2025
77
title: DSC configuration documents
@@ -28,7 +28,7 @@ Configuration documents are YAML or JSON files that contain a single object. The
2828
properties define how DSC processes the document. The top-level properties for a document are:
2929

3030
- `$schema` (required) - Defines the URI for the JSON Schema the document adheres to. DSC
31-
uses this to know how to validate and interpret the document.
31+
uses the schema to validate and interpret the document.
3232
- `resources` (required) - Defines the collection of resource instances the document manages.
3333
- `metadata` (optional) - Defines an arbitrary set of annotations for the document. The annotations
3434
can include notes like who authored the document, the last time someone updated it, or any other
@@ -37,11 +37,11 @@ properties define how DSC processes the document. The top-level properties for a
3737

3838
DSC applies validation to the `Microsoft.DSC` property. For more information, see the
3939
[DSC Configuration document metadata schema][02] reference.
40-
- `parameters` (optional) - Defines a set of runtime options for the configuration. Parameters can
41-
be referenced by resource instances to reduce duplicate definitions or enable dynamic values.
40+
- `parameters` (optional) - Defines a set of runtime options for the configuration. Resource
41+
instances can reference parameters to reduce duplicate definitions or enable dynamic values.
4242
Parameters can have default values and can be set on any configuration operation.
43-
- `variables` (optional) - Defines a set of reusable values for the configuration. Variables can be
44-
referenced by resource instances to reduce duplicate definitions.
43+
- `variables` (optional) - Defines a set of reusable values for the configuration. Resource
44+
instances can reference variables to reduce duplicate definitions.
4545

4646
## Defining a configuration document
4747

@@ -100,9 +100,9 @@ incompatible state for the instance on every run.
100100
## Getting the current state of a configuration
101101

102102
The `dsc config get` command retrieves the current state of the resource instances defined in a
103-
configuration document. DSC also collects any message emitted by the resources during the
104-
operation, indicates whether any of the resources raised an error, and provides metadata about the
105-
operation as a whole and for each resource instance.
103+
configuration document. For each resource instance, DSC collects messages emitted by the resources
104+
during the operation, indicates whether any of the resources raised an error, and provides metadata
105+
about the operation as a whole.
106106

107107
```sh
108108
dsc config get --file ./example.config.dsc.yaml
@@ -137,14 +137,14 @@ hadErrors: false
137137
The `dsc config test` command compares the current state of the resource instances to their desired
138138
state. The result for each instance includes:
139139

140-
- The desired state for the instance.
141-
- The actual state of the instance.
142-
- Whether the instance is in the desired state.
143-
- The list of properties that are out of the desired state, if any.
140+
- The desired state for the instance
141+
- The actual state of the instance
142+
- Whether the instance is in the desired state
143+
- The list of properties that are out of the desired state, if any
144144

145-
DSC also collects any message emitted by the resources during the operation, indicates whether any
146-
of the resources raised an error, and provides metadata about the operation as a whole and for each
147-
resource instance.
145+
For each resource instance, DSC also collects messages emitted by the resources during the
146+
operation, indicates whether any of the resources raised an error, and provides metadata about the
147+
operation as a whole.
148148

149149
```sh
150150
dsc config test --file /example.config.dsc.yaml
@@ -193,9 +193,9 @@ their desired state. The result for each instance includes:
193193
- The state of the instance after the operation.
194194
- Which properties the operation changed, if any.
195195

196-
DSC also collects any message emitted by the resources during the operation, indicates whether any
197-
of the resources raised an error, and provides metadata about the operation as a whole and for each
198-
resource instance.
196+
For each resource instance, DSC also collects messages emitted by the resources during the
197+
operation, indicates whether any of the resources raised an error, and provides metadata about the
198+
operation as a whole.
199199

200200
```sh
201201
dsc config set --file ./example.config.dsc.yaml
@@ -240,6 +240,7 @@ hadErrors: false
240240
- [DSC Configuration document schema reference][05]
241241
- [Command line reference for the 'dsc config' command][06]
242242

243+
<!-- link references -->
243244
[01]: ./resources.md
244245
[02]: ../reference/schemas/config/metadata.md#microsoftdsc
245246
[03]: ../reference/schemas/config/document.md

dsc/docs-conceptual/dsc-3.0/concepts/enhanced-authoring.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ title: Authoring with enhanced schemas
1010
# Authoring with enhanced schemas
1111

1212
Working with Microsoft's Desired State Configuration (DSC) platform involves writing DSC
13-
[configuration documents][01] and [resource manifests][02]. Configuration documents are YAML or
14-
JSON data files that declare the desired state of a system. Resource manifests are JSON or YAML
15-
data files that define a DSC command resource.
13+
[configuration documents][01] and [resource manifests][02]. Configuration documents are YAML or JSON
14+
data files that declare the desired state of a system. Resource manifests are JSON or YAML data
15+
files that define a DSC command resource.
1616

1717
DSC validates these data files with a JSON schema. While the schemas DSC uses for validation are
18-
useful for authoring configuration documents and resource manifests, Microsoft also defines a set
19-
of enhanced schemas for authoring the files in VS Code. These schemas define extra keywords
20-
specific to VS Code that:
18+
useful for authoring configuration documents and resource manifests, Microsoft also defines a set of
19+
enhanced schemas for authoring the files in VS Code. These schemas define extra keywords specific to
20+
VS Code that:
2121

2222
- Improve the contextual help when hovering on or selecting a property in the data file.
2323
- Add contextual help for enum values.
@@ -30,14 +30,14 @@ specific to VS Code that:
3030
>
3131
> These schemas are only for improving the authoring experience. If you try to validate the
3232
> configuration document or resource manifest with a tool that doesn't support the extended
33-
> vocabulary, the tool may raise an error.
33+
> vocabulary, the tool might raise an error.
3434
>
3535
> The enhanced schemas share the same source definition as the canonical schemas and validate the
3636
> data in the same way. However, they include non-canonical keywords. For maximum compatibility
3737
> with other tools, the canonical schemas only use the core JSON schema vocabularies.
3838
39-
For the full list of recognized and supported schema URIs, including the enhanced authoring
40-
schemas, see the `$schema` sections in [DSC Configuration document schema reference][03] and
39+
For the full list of recognized and supported schema URIs, including the enhanced authoring schemas,
40+
see the `$schema` sections in [DSC Configuration document schema reference][03] and
4141
[DSC resource manifest schema reference][04].
4242

4343
## Enhanced schema examples
@@ -61,7 +61,7 @@ When possible, the hover help includes a link to the online documentation.
6161
:::image-end:::
6262
<!-- markdownlint-enable MD013 -->
6363

64-
When using IntelliSense while authoring with an enhanced schema, the quick info shown for the
64+
When you use IntelliSense while authoring with an enhanced schema, the quick info shown for the
6565
completion options displays as rendered Markdown. When possible, the quick info includes a link to
6666
the online documentation.
6767

@@ -97,19 +97,19 @@ snippets in VS Code.
9797

9898
<!-- markdownlint-disable MD013 -->
9999
:::image type="complex" source="media/enhanced-authoring/error-messages.png" alt-text="This screenshot shows an enhanced error message for failed validation.":::
100-
This screenshot shows a contextual error message when the name property for a resource instance doesn't match the validating regular expression. The value is the string 'invalid?' and the error message says "Invalid value for instance name. An instance name must be a non-empty string containing only letters, numbers, and spaces."
100+
This screenshot shows a contextual error message when the name property for a resource instance doesn't match the validating regular expression. The value is the string 'invalid?' and the error message says "Invalid value for instance name. An instance name must be a nonempty string containing only letters, numbers, and spaces."
101101
:::image-end:::
102102
<!-- markdownlint-enable MD013 -->
103103

104-
When defining values, the enhanced schemas have contextual error messages instead of the default
105-
error messages that JSON schema validation raises. This is particularly helpful for properties that
106-
must match a regular expression, where the default message just indicates that the value is invalid
107-
and lists the regular expression pattern.
104+
When you define values, the enhanced schemas have contextual error messages instead of the default
105+
error messages that JSON schema validation raises. These values are helpful for properties that must
106+
match a regular expression, where the default message just indicates that the value is invalid and
107+
lists the regular expression pattern.
108108

109109
## Using the enhanced configuration document schema
110110

111111
To associate every configuration document with the enhanced schema, add the following snippet to
112-
your [settings.json] file in VS Code. You can define these options in your user settings or for a
112+
your `settings.json` file in VS Code. You can define these options in your user settings or for a
113113
specific workspace.
114114

115115
<!-- markdownlint-disable MD013 -->
@@ -154,9 +154,9 @@ when authoring configuration documents in JSON, you must define the schema assoc
154154

155155
## Using the enhanced resource manifest schema
156156

157-
To use the enhanced schema when authoring resource manifests, add the following snippet to
158-
your [settings.json] file in VS Code. You can define this option in your user settings or for a
159-
specific workspace.
157+
To use the enhanced schema when authoring resource manifests, add the following snippet to your
158+
`settings.json` file in VS Code. You can define this option in your user settings or for a specific
159+
workspace.
160160

161161
<!-- markdownlint-disable MD013 -->
162162
```json

dsc/docs-conceptual/dsc-3.0/concepts/resources.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DSC supports several kinds of resources:
2626
- A resource defined with a resource manifest is a _command_ resource. DSC uses the manifest
2727
to determine how to invoke the resource and how to validate the resource instance properties.
2828
- A _group resource_ is a command resource with a `resources` property that takes an array of
29-
resource instances and processes them. Group resources may apply special handling to their nested
29+
resource instances and processes them. Group resources can apply special handling to their nested
3030
resource instances, like changing the user the resources run as.
3131
- An _adapter resource_ is a group resource that enables the use of non-command resources with DSC.
3232
For example, the `Microsoft.DSC/PowerShell` and `Microsoft.Windows/WIndowsPowerShell` adapter
@@ -35,7 +35,7 @@ DSC supports several kinds of resources:
3535

3636
## Resource type names
3737

38-
Resources are identified by their fully qualified type name. The type name is used to specify a
38+
You identify resources by their fully qualified type name. The type name is used to specify a
3939
resource in configuration documents and as the value of the `--resource` flag when using the
4040
`dsc resource *` commands.
4141

@@ -50,7 +50,7 @@ organizing resources into related namespaces, like `Microsoft.SqlServer/Database
5050
`Microsoft.SqlServer.Database/Role`.
5151

5252
For more information about type names and how DSC validates them, see
53-
[DSC Resource fully qualified type name schema reference][01].
53+
[DSC Resource fully qualified type name schema reference][03].
5454

5555
## Resource properties
5656

@@ -60,7 +60,7 @@ instance schema.
6060

6161
Properties are optional by default. Resources can be invoked directly or declared in a
6262
configuration with only the properties that are relevant to the current task or purpose. You don't
63-
need to declare every property for an instance. Properties may have default values for their
63+
need to declare every property for an instance. Properties can have default values for their
6464
desired state.
6565

6666
Most properties are one of the basic types:
@@ -77,10 +77,10 @@ subproperties can be basic or complex, but they're usually a basic type.
7777

7878
Resources can define their properties as read-only or write-only:
7979

80-
- A _read-only resource property_ defines metadata about an instance that the resource can retrieve
81-
but that a user can't directly set. You can't specify read-only properties in the desired state
82-
for an instance. Examples of read-only properties include the last time a file was modified or
83-
the author of an installed software package.
80+
- A _read-only resource property_ contains metadata that the resource can retrieve but that a user
81+
can't directly set. You can't specify read-only properties in the desired state for an instance.
82+
Examples of read-only properties include the last time a file was modified or the author of an
83+
installed software package.
8484
- A _write-only resource property_ defines a value that the resource uses during a resource
8585
operation that can't be returned for the current state of an instance. Examples of
8686
write-only properties include credentials used to authenticate during a resource operation and
@@ -92,7 +92,7 @@ canonical property in its instance schema indicates that the resource manages in
9292
created and deleted. If a resource has the `_exist` canonical property and the `delete` capability,
9393
DSC can invoke the **Delete** operation instead of **Set** when the desired state
9494
indicates the instance shouldn't exist. For more information about the available canonical
95-
properties, see [DSC canonical properties](../reference/schemas/resource/properties/overview.md).
95+
properties, see [DSC canonical properties][04].
9696

9797
## Listing resources
9898

@@ -163,12 +163,12 @@ strict case-insensitive comparison of the desired and actual values for the inst
163163
Only resources that have advanced or complex validation requirements need to implement the **Test**
164164
operation themselves.
165165
166-
Use the `dsc resource test` command to invoke the operation. DSC returns data that includes:
166+
Use the `dsc resource test` command to invoke the operation. DSC returns the following data:
167167

168-
- The desired state for the instance.
169-
- The actual state of the instance.
170-
- Whether the instance is in the desired state.
171-
- The list of properties that aren't in the desired state.
168+
- The desired state for the instance
169+
- The actual state of the instance
170+
- Whether the instance is in the desired state
171+
- The list of properties that aren't in the desired state
172172

173173
For example, you can test whether a specific registry key exists:
174174

@@ -241,8 +241,8 @@ changedProperties:
241241

242242
### Delete operations
243243

244-
Some resources implement the **Delete** operation for convenience. This enables you to invoke the
245-
resource to remove an instance from the system.
244+
Some resources implement the **Delete** operation for convenience. This operation enables you to
245+
invoke the resource to remove an instance from the system.
246246

247247
Use the `dsc resource delete` command to invoke the operation. When you invoke the **Delete**
248248
operation, DSC returns no output unless there's an error.
@@ -258,7 +258,7 @@ dsc resource delete --resource Microsoft.Windows/Registry --input '{
258258
### Export operations
259259

260260
Some resources implement the **Export** operation, which returns every instance of the resource on
261-
the system. This can help you discover how a machine is currently configured.
261+
the system. This operation can help you discover how a machine is currently configured.
262262

263263
Use the `dsc resource export` command to invoke the operation. When you invoke the **Export**
264264
operation, DSC returns an array of resources instance definitions you can copy into a configuration
@@ -273,9 +273,9 @@ dsc resource export --resource Microsoft.DSC/Process
273273
## Declaring resource instances
274274

275275
DSC configuration documents enable managing more than one resource or resource instance at a time.
276-
Configuration documents declare a collection of resource instances and their desired state. This
277-
makes it possible to model complex desired states by composing different resources and instances
278-
together, like defining a security baseline for compliance or the settings for a web farm.
276+
Configuration documents declare a collection of resource instances and their desired state.
277+
Collections make it possible to model complex desired states by composing different resources and
278+
instances together, like defining a security baseline for compliance or the settings for a web farm.
279279

280280
A resource instance declaration always includes:
281281

@@ -303,13 +303,15 @@ resources:
303303

304304
## See also
305305

306-
- [Anatomy of a DSC command resource][03] to learn about authoring resources in your language
306+
- [Anatomy of a DSC command resource][05] to learn about authoring resources in your language
307307
of choice.
308-
- [Configuration Documents][04] to learn about using resources in a configuration document.
309-
- [Command line reference for the 'dsc resource' command][05]
308+
- [Configuration Documents][06] to learn about using resources in a configuration document.
309+
- [Command line reference for the 'dsc resource' command][01]
310310

311-
[01]: ../reference/schemas/definitions/resourceType.md
311+
<!-- link references -->
312+
[01]: ../reference/cli/resource/command.md
312313
[02]: ../reference/cli/resource/list.md
313-
[03]: ../resources/concepts/anatomy.md
314-
[04]: configurations.md
315-
[05]: ../reference/cli/resource/command.md
314+
[03]: ../reference/schemas/definitions/resourceType.md
315+
[04]: ../reference/schemas/resource/properties/overview.md
316+
[05]: ../resources/concepts/anatomy.md
317+
[06]: configurations.md

0 commit comments

Comments
 (0)