{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", "title": "DSC configuration document schema", "description": "Describes a valid DSC configuration document.", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDescribes a valid DSC configuration document.\n\nDSC configurations enable users to define state by combining different DSC resources. A\nconfiguration document uses parameters and variables to pass to a set of one or more resources\nthat define a desired state.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true\n", "type": "object", "required": [ "$schema", "resources" ], "properties": { "$schema": { "title": "Schema", "description": "Indicates the URI that resolves to the version of this schema that the document adheres to. DSC uses this property when validating and processing the configuration document.", "type": "string", "format": "uri", "enum": [ "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/bundled/config/document.vscode.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1/bundled/config/document.vscode.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/bundled/config/document.vscode.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0/bundled/config/document.vscode.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/bundled/config/document.vscode.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.1/bundled/config/document.vscode.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.json", "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.2/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.1/config/document.json", "https://aka.ms/dsc/schemas/v3.1/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3.1/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.1.0/config/document.json", "https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3.1.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.0/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3.0.0/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.1/config/document.json", "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3.0.1/bundled/config/document.vscode.json", "https://aka.ms/dsc/schemas/v3.0.2/config/document.json", "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.json", "https://aka.ms/dsc/schemas/v3.0.2/bundled/config/document.vscode.json" ], "markdownDescription": "***\n[_Online Documentation_][00]\n***\n\nThe `$schema` property indicates the URI that resolves to the version of this schema that the\ndocument adheres to. DSC uses this property when validating and processing the configuration\ndocument.\n\nThe JSON schemas for DSC are published in multiple versions and forms. This documentation is\nfor the latest version of the schema. As a convenience, you can specify either the full URI\nfor the schema hosted in GitHub or use the shorter `aka.ms` URI. You can specify the schema\nfor a specific semantic version, the latest schema for a minor version, or the latest schema\nfor a major version of DSC. For more information about schema URIs and versioning, see\n[DSC JSON Schema URIs][01].\n\nFor every version of the schema, there are three valid urls:\n\n```yaml\n.../config/document.json\n```\n\n> The URL to the canonical non-bundled schema. When it's used for validation, the validating\n> client needs to retrieve this schema and every schema it references.\n \n```yaml\n.../bundled/config/document.json\n```\n\n> The URL to the bundled schema. When it's used for validation, the validating client only\n> needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n\n```yaml\n.../bundled/config/document.vscode.json\n```\n\n> The URL to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and snippets\n> that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n\n[00]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#schema\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/schema-uris?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ "\n\n> #### `v3` non-bundled\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3.1` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.1`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.1` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.1`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.1` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.1` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.1`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.1.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.1.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.1.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.1.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.1.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.1.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.1` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.1` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.1` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.2` non-bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.2` bundled, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.2` enhanced authoring, canonical URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a major version folder. If you pin to a major version\n> folder, like `v3`, the schemas you use will update with every nonbreaking release. You\n> can use those schemas until you want or need to migrate to a new major version of DSC.\n", "\n\n> #### `v3.1` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.1`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.1` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.1`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.1` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.1` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.1`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.1.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.1.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.1.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.1.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.1.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.1.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.1.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0` schema. This URL points\n> to the enhanced authoring schema. This schema is much larger than the other schemas, as\n> it includes additional definitions that provide contextual help and snippets that the\n> others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a minor version folder. If you pin to a minor version\n> folder, like `v3.0`, the schemas you use will update with every patch release. Pinning\n> to a minor version folder enables you to take advantage of fixes to the schemas without\n> continually updating your schema URIs. However, to take advantage of any improvements\n> or new features, you need to update the URI whenever a new minor version is released.\n", "\n\n> #### `v3.0.0` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.0` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.0` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.0`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.1` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.1` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.1` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.1` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.1`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.2` non-bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the canonical non-bundled schema. When it's used for validation, the\n> validating client needs to retrieve this schema and every schema it references.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.2` bundled, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the bundled schema. When it's used for validation, the validating client\n> only needs to retrieve this schema.\n>\n> This schema uses the bundling model introduced for JSON Schema 2020-12. While DSC can\n> still validate the document when it uses this schema, other tools may error or behave\n> in unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n", "\n\n> #### `v3.0.2` enhanced authoring, short URI\n>\n> Indicates that the configuration document adheres to the `v3.0.2` schema. This URL\n> points to the enhanced authoring schema. This schema is much larger than the other\n> schemas, as it includes additional definitions that provide contextual help and\n> snippets that the others don't include.\n>\n> This schema uses keywords that are only recognized by VS Code. While DSC can still\n> validate the document when it uses this schema, other tools may error or behave in\n> unexpected ways.\n>\n> This URI is for the schemas in a full semantic version folder. If you pin to a full\n> semantic version folder, like `v3.0.2`, you're pinning to schemas that won't change.\n> However, to take advantage of any improvements or fixes to the schemas, you need to\n> update the URI with each release.\n" ] }, "parameters": { "title": "DSC configuration document parameters", "description": "Defines runtime options for the configuration. Users and integrating tools can override use the defined parameters to pass alternate values to the configuration.", "type": "object", "additionalProperties": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/config/document.parameter.json" }, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines runtime options for the configuration. Users and integrating tools can override use\nthe defined parameters to pass alternate values to the configuration.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#parameters\n", "defaultSnippets": [ { "label": " New Parameter", "markdownDescription": "Defines a new runtime option for the configuration.\n\n```yaml\nparameterId:\n type: \n description: \n defaultValue: \n allowedValues:\n - \n```", "body": { "${1:parameterId}": { "type": "$2", "description": "$3", "defaultValue": "$4", "allowedValues": [ "$5" ] } } }, { "label": " New Integer Parameter", "markdownDescription": "Defines a new runtime option for the configuration as an integer value.\n\n```yaml\nparameterId:\n type: int\n description: \n defaultValue: \n minValue: \n minValue: \n```", "body": { "${1:parameterId}": { "type": "int", "description": "$2", "defaultValue": "$3", "minValue": "$4", "maxValue": "$5" } } } ] }, "variables": { "title": "Configuration variables", "description": "Defines a set of reusable values for the configuration document. The names of this value's properties are the strings used to reference a variable's value.", "type": "object", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of reusable values for the configuration document. The names of this value's\nproperties are the strings used to reference a variable's value.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#variables\n", "defaultSnippets": [ { "label": " New variable property", "markdownDescription": "Defines a new variable as a key-value pair.\n\n```yaml\nvariableName: variableValue\n```", "body": { "${1:variableName}": "${2:variableValue}" } }, { "label": " New variable property (object)", "markdownDescription": "Defines a new key-value pair for the variables where the value is an object.\n\n```yaml\nvariableName:\n key: value\n```", "body": { "${1:variableName}": { "${2:key}": "${3:value}" } } }, { "label": " New variable property (array)", "markdownDescription": "Defines a new key-value pair for the variables where the value is an array.\n\n```yaml\nvariableName:\n - firstValue\n - secondValue\n```", "body": { "${1:variableName}": [ "${2:firstValue}", "${3:secondValue}" ] } } ] }, "resources": { "title": "DSC configuration document resources", "description": "Defines a list of DSC resource instances for the configuration to manage.", "type": "array", "minItems": 0, "items": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/config/document.resource.json" }, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of DSC resource instances for the configuration to manage.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/document?view=dsc-3.0&preserve-view=true#resources\n" }, "metadata": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/config/document.metadata.json" } }, "$defs": { "PowerShell": { "DSC": { "main": { "schemas": { "v3": { "config": { "document.parameter.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.parameter.json", "title": "Parameter", "description": "Defines a runtime option for a DSC configuration document.", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a runtime option for a DSC configuration document.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true\n", "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/definitions/parameters/dataTypes.json" }, "defaultValue": { "title": "Default value", "description": "Defines the default value for the parameter.", "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/definitions/parameters/validValueTypes.json", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the default value for the parameter.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#allowedvalues\n" }, "allowedValues": { "title": "Allowed values", "description": "Defines a list of valid values for the parameter. If the parameter is defined with any other values, it's invalid.", "type": "array", "items": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/definitions/parameters/validValueTypes.json" }, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of valid values for the parameter. If the parameter is defined with any other\nvalues, it's invalid.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#allowedvalues\n" }, "description": { "title": "Parameter description", "description": "Defines a synopsis for the parameter explaining its purpose.", "type": "string", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a synopsis for the parameter explaining its purpose.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#description-1\n" }, "metadata": { "title": "Parameter metadata", "description": "Defines a set of key-value pairs for the parameter. This metadata isn't validated.", "type": "object", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of key-value pairs for the parameter. This metadata isn't validated.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#metadata-1\n", "defaultSnippets": [ { "label": " New metadata property", "markdownDescription": "Defines a key-value pair for the metadata:\n\n```yaml\nmetadataName: value\n```", "body": { "${1:metadataName}": "${2:value}" } }, { "label": " New metadata property (object)", "markdownDescription": "Defines a new key-value pair for the metadata where the value is an object.\n\n```yaml\nmetadataName:\n key: value\n```", "body": { "${1:metadataName}": { "${2:key}": "${3:value}" } } }, { "label": " New metadata property (array)", "markdownDescription": "Defines a new key-value pair for the metadata where the value is an array.\n\n```yaml\nmetadataName:\n - firstValue\n - secondValue\n```", "body": { "${1:metadataName}": [ "${2:firstValue}", "${3:secondValue}" ] } } ] } }, "allOf": [ { "if": { "properties": { "type": { "const": "int" } } }, "then": { "properties": { "minValue": { "title": "Minimum value", "description": "The minimum valid value for an integer type. If defined with the `maxValue` property, this value must be less than the value of `maxValue`.", "type": "integer", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid value for an integer type. If defined with the `maxValue` property,\nthis value must be less than the value of `maxValue`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minvalue\n" }, "maxValue": { "title": "Maximum value", "description": "The maximum valid value for an integer type. If defined with the `minValue` property, this value must be greater than the value of `minValue`.", "type": "integer", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid value for an integer type. If defined with the `minValue` property,\nthis value must be greater than the value of `minValue`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxvalue\n" } } } }, { "if": { "oneOf": [ { "properties": { "type": { "const": "string" } } }, { "properties": { "type": { "const": "secureString" } } }, { "properties": { "type": { "const": "array" } } } ] }, "then": { "properties": { "minLength": { "title": "Minimum length", "description": "The minimum valid length for a `string`, `secureString`, or `array`. If defined with the `maxLength` property, this value must be less than the value of `maxLength`.", "type": "integer", "minimum": 0, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe minimum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `maxLength` property, this value must be less than the value of `maxLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#minLength\n" }, "maxLength": { "title": "Maximum length", "description": "The maximum valid length for a `string`, `secureString`, or `array`. If defined with the `minLength` property, this value must be less than the value of `minLength`.", "type": "integer", "minimum": 0, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe maximum valid length for a `string`, `secureString`, or `array`. If defined with\nthe `minLength` property, this value must be less than the value of `minLength`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/parameter?view=dsc-3.0&preserve-view=true#maxLength\n" } } } }, { "if": { "oneOf": [ { "properties": { "type": { "const": "string" } } }, { "properties": { "type": { "const": "secureString" } } } ] }, "then": { "properties": { "defaultValue": { "type": "string" }, "allowedValues": { "items": { "type": "string" } } } } }, { "if": { "oneOf": [ { "properties": { "type": { "const": "object" } } }, { "properties": { "type": { "const": "secureObject" } } } ] }, "then": { "properties": { "defaultValue": { "type": "object" }, "allowedValues": { "items": { "type": "object" } } } } }, { "if": { "properties": { "type": { "const": "int" } } }, "then": { "properties": { "defaultValue": { "type": "integer" }, "allowedValues": { "items": { "type": "integer" } } } } }, { "if": { "properties": { "type": { "const": "array" } } }, "then": { "properties": { "defaultValue": { "type": "array" } } } }, { "if": { "properties": { "type": { "const": "bool" } } }, "then": { "properties": { "defaultValue": { "type": "boolean" }, "allowedValues": { "items": { "type": "boolean" } } } } } ] }, "document.resource.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.resource.json", "title": "DSC resource instance", "description": "Defines an instance of a DSC resource in a configuration.", "type": "object", "required": [ "type", "name" ], "properties": { "type": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/definitions/resourceType.json" }, "name": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/definitions/instanceName.json" }, "dependsOn": { "title": "Instance depends on", "description": "Defines a list of DSC resource instances that DSC must successfully process before processing this instance. Each value for this property must be the `resourceID()` lookup for another instance in the configuration. Multiple instances can depend on the same instance, but every dependency for an instance must be unique in that instance's `dependsOn` property.", "type": "array", "items": { "type": "string", "uniqueItems": true, "pattern": "^\\[resourceId\\(\\s*'\\w+(\\.\\w+){0,2}\\/\\w+'\\s*,\\s*'[a-zA-Z0-9 ]+'\\s*\\)\\]$", "patternErrorMessage": "Invalid value, must be a value like `[resourceId('', '`)], such as\n`[resourceId('Microsoft/OSInfo', 'Foo')]`.\n\nThe `` and `` should be the fully qualified type of the resource and its\nfriendly name in the configuration.\n", "defaultSnippets": [ { "label": " New dependency", "markdownDescription": "Defines a new dependency for the resource instance.\n\n```yaml\n\"[resourceId('dependencyInstance/Type', 'dependencyInstanceName')]\"\n```", "bodyText": "\"[resourceId('${3:dependencyInstance/Type}', '${4:dependencyInstanceName}')]\"" } ] }, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a list of DSC resource instances that DSC must successfully process before processing\nthis instance. Each value for this property must be the `resourceID()` lookup for another\ninstance in the configuration. Multiple instances can depend on the same instance, but every\ndependency for an instance must be unique in that instance's `dependsOn` property.\n\nThe `resourceID()` function uses this syntax:\n\n```yaml\n\"[resourceId('', '']\"\n```\n\nThe `` value is the `type` property of the dependent resource and\n`` is the dependency's `name` property. When adding a dependency in a\nYAML-format configuration document, always wrap the `resourceID()` lookup in double quotes\n(`\"`).\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#properties-1\n" }, "properties": { "title": "Managed instance properties", "description": "Defines the properties of the DSC resource this instance manages. This property's value must be an object. DSC validates the property's value against the DSC resource's schema.", "type": "object", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the properties of the DSC resource this instance manages. This property's value must\nbe an object. DSC validates the property's value against the DSC resource's schema.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#properties-1\n" } }, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines an instance of a DSC resource in a configuration.\n\nThe `resources` property of a DSC configuration document always includes at least one DSC resource\ninstance. Together, the instances in a configuration define the desired state that DSC can get,\ntest, and set on a machine.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true\n", "defaultSnippets": [ { "label": " New resource instance", "markdownDescription": "Defines a new instance of a DSC resource for the configuration.\n\n```yaml\ntype: owner[.group][.area]/name\nname: instance_name\nproperties:\n propertyName: propertyValue\n```", "body": { "type": "${1:owner[.group][.area]/name}", "name": "${2:instance_name}", "properties": { "${3:propertyName}": "${4:propertyValue}" } } }, { "label": " New dependent resource instance", "markdownDescription": "Defines a new instance of a DSC resource for the configuration that depends on another\ninstance.\n\n```yaml\ntype: owner[.group][.area]/name\nname: instance_name\ndependsOn:\n - \"[resourceId('dependencyInstance/Type', 'dependencyInstanceName')]\"\nproperties:\n propertyName: propertyValue\n```", "body": { "type": "${1:owner[.group][.area]/name}", "name": "${2:instance_name}", "dependsOn": [ "\"[resourceId('${3:dependencyInstance/Type}', '${4:dependencyInstanceName}')]\"" ], "properties": { "${5:propertyName}": "${6:propertyValue}" } } } ] }, "document.metadata.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/config/document.metadata.json", "title": "Configuration metadata", "description": "Defines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC` property, this metadata isn't validated. You can pass any data into this property of a configuration document.", "type": "object", "properties": { "Microsoft.DSC": { "type": "object", "title": "DSC metadata", "description": "The `Microsoft.DSC` metadata property contains directives and information that DSC itself uses when processing a configuration document. Unlike other metadata key-value pairs, DSC validates these properties.", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe `Microsoft.DSC` metadata property contains directives and information that DSC itself\nuses when processing a configuration document. Unlike other metadata key-value pairs, DSC\nvalidates these properties.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", "unevaluatedProperties": false, "properties": { "securityContext": { "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3/metadata/Microsoft.DSC/securityContext.json", "default": "current", "description": "This property defines the security context a configuration requires. If you invoke a DSC operation against the configuration document in a security context that conflicts with this metadata, DSC raises an error when it validates the configuration document.\nThe default security context is `current`.", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThis property defines the security context a configuration requires. If you invoke a DSC\noperation against the configuration document in a security context that conflicts with\nthis metadata, DSC raises an error when it validates the configuration document.\n\nThe default security context is `current`.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", "markdownEnumDescriptions": [ "\n\n> ### Current security context\n>\n> Indicates that the configuration document is usable under any security context. You\n> can invoke DSC operations against the document when elevated as root or an\n> administrator and as a normal user or account.\n", "\n\n> ### Elevated security context\n>\n> Indicates that the configuration document is usable only in an elevated security\n> context. You can invoke DSC operations against the document when elevated as root or\n> an administrator. When you invoke DSC operations against the document as a\n> non-elevated user or account, DSC raises an error when it validates the configuration\n> document.\n", "\n\n> ### Restricted security context\n>\n> Indicates that the configuration document is usable only in a non-elevated security\n> context. You can invoke DSC operations against the document as a non-elevated user or\n> account. When you invoke DSC operations against the document as root or an\n> administrator, DSC raises an error when it validates the configuration document.\n" ] } } } }, "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines a set of key-value pairs for the configuration. Except for the `Microsoft.DSC`\nproperty, this metadata isn't validated. You can pass any data into this property of a\nconfiguration document.\n\nThe `Microsoft.DSC` metadata property contains metadata directives and information that DSC\nitself uses when processing the configuration document. For more information, see\n[Microsoft.DSC][02]\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true\n[02]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/metadata?view=dsc-3.0&preserve-view=true#microsoft.dsc\n", "defaultSnippets": [ { "label": " New metadata property", "markdownDescription": "Defines a key-value pair for the metadata:\n\n```yaml\nmetadataName: value\n```", "body": { "${1:metadataName}": "${2:value}" } }, { "label": " New metadata property (object)", "markdownDescription": "Defines a new key-value pair for the metadata where the value is an object.\n\n```yaml\nmetadataName:\n key: value\n```", "body": { "${1:metadataName}": { "${2:key}": "${3:value}" } } }, { "label": " New metadata property (array)", "markdownDescription": "Defines a new key-value pair for the metadata where the value is an array.\n\n```yaml\nmetadataName:\n - firstValue\n - secondValue\n```", "body": { "${1:metadataName}": [ "${2:firstValue}", "${3:secondValue}" ] } } ] } }, "definitions": { "parameters": { "dataTypes.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/definitions/parameters/dataTypes.json", "title": "Data Types", "description": "Defines the data type for the parameter value.", "type": "string", "enum": [ "string", "secureString", "int", "bool", "object", "secureObject", "array" ], "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the data type for the parameter value.\n\nThe valid data types for a parameter are:\n\n- `array` for arrays\n- `bool` for booleans\n- `int` for integers\n- `object` for objects\n- `string` for strings\n- `secureObject` for secure objects\n- `secureString` for secure strings\n\nAccess parameters in a configuration using this syntax:\n\n```yaml\n\"[parameter('')]\"\n```\n\nIn YAML, the parameter syntax needs to be enclosed in double-quotes when used as an inline value.\nIf the syntax isn't quoted, YAML interprets the syntax as an array.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true\n", "markdownEnumDescriptions": [ "_Strings are an arbitrary set of text._\n\n> To define a long strings in YAML, use the folded block syntax or literal block syntax by\n> adding a `>` or `|` and a line break after the key. Then, indent the next line. Every line\n> in the string must start at the same level of indentation. You can trim the trailing\n> whitespace by using `>-` or `|-` instead.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#strings\n", "_Secure strings are text that needs to be handled securely._\n\n> Secure strings are an arbitrary set of text that DSC and integrating tools shouldn't log or\n> record. If a secure data type parameter is used for a resource instance property that doesn't\n> expect a secure value, the resource may still log or record the value. If the resource has\n> independent logging or recording that isn't handled by DSC, the value may be stored\n> insecurely.\n>\n> Use secure strings for passwords and secrets. Never define a default value for secure string\n> parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n", "_Integer values are numbers without a fractional part._\n\n> Integer values may be limited by integrating tools or the DSC resources they're used with.\n> DSC itself supports integer values between `-9223372036854775808` and `9223372036854775807`.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#integers\n", "_Boolean values are either `true` or `false`._\n\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#booleans\n", "_Objects define a set of key-value pairs._\n\n> The value for each key can be any valid data type. The values can be the same type or\n> different types.\n>\n> Access keys in the object using dot-notation. Dot-notation uses this syntax:\n>\n> ```yaml\n> \"[parameters('').]\n> ```\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#objects\n", "_Secure objects are key-value pairs that need to be handled securely._\n\n> Secure objects define a set of key-value pairs that DSC and integrating tools shouldn't log\n> or record. If a secure data type parameter is used for a resource instance property that\n> doesn't expect a secure value, the resource may still log or record the value. If the\n> resource has independent logging or recording that isn't handled by DSC, the value may be\n> stored insecurely.\n>\n> Never define a default value for secure object parameters.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#secure-strings-and-objects\n", "_Arrays are a list of one or more values._\n\n> The values in the array can be any valid data type. Values in the array can be the same type\n> or different types.\n>\n> For more information, see the [_Online Documentation_][01].\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/parameters/datatypes?view=dsc-3.0&preserve-view=true#arrays\n" ] }, "validValueTypes.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/definitions/parameters/validValueTypes.json", "$comment": "This schema fragment makes it a little easier to compose the valid properties\nfor DSC configuration document parameters. As-written, values must be one of\nthose on this list - the schema definition for dataType excludes `null` and\nnumbers with fractional parts, like `3.5`.\n", "type": [ "string", "integer", "object", "array", "boolean" ] } }, "resourceType.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/definitions/resourceType.json", "title": "DSC resource fully qualified type name", "description": "The namespaced name of the DSC resource, using the syntax:\n\n[.][.][.]/\n\nFor example:\n\n- Microsoft/OSInfo\n- Microsoft.SqlServer/Database\n- Microsoft.SqlServer.Database/User\n", "type": "string", "pattern": "^\\w+(\\.\\w+){0,3}\\/\\w+$", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC resource, using the syntax:\n\n```yaml\n[.][.][.]/\n```\n\nFor example:\n\n- `Microsoft/OSInfo`\n- `Microsoft.SqlServer/Database`\n- `Microsoft.SqlServer.Database/User`\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/definitions/resourcetype?view=dsc-3.0&preserve-view=true\n", "patternErrorMessage": "Invalid type name. Valid resource type names always define an owner and a name separated by a\nslash, like `Microsoft/OSInfo`. Type names may optionally include the group, area, and subarea\nsegments to namespace the resource under the owner, like `Microsoft.Windows/Registry`.\n" }, "instanceName.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/definitions/instanceName.json", "title": "Instance name", "description": "The short, human-readable name for a DSC resource instance. Must be unique within a DSC Configuration document. Must be a non-empty string containing only letters, numbers, and spaces.", "type": "string", "pattern": "^[a-zA-Z0-9 ]+$", "minLength": 1, "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nDefines the short, human-readable name for a DSC resource instance. This property must be unique\nwithin a DSC configuration document. If any resource instances share the same name, DSC raises an\nerror.\n\nThe instance name must be a non-empty string containing only letters, numbers, and spaces.\n\n[01]: https://learn.microsoft.com/powershell/dsc/reference/schemas/config/resource?view=dsc-3.0&preserve-view=true#name\n" } }, "metadata": { "Microsoft.DSC": { "securityContext.json": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/metadata/Microsoft.DSC/securityContext.json", "title": "Security context", "description": "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.", "markdownDescription": "Defines the security context that DSC was run under. If the value for this metadata property is\n`elevated`, DSC was run as `root` (non-Windows) or an elevated session with Administrator\nprivileges (on Windows). If the value is `restricted`, DSC was run as a normal user or account in\na non-elevated session.", "type": "string", "enum": [ "current", "elevated", "restricted" ] } } } } } } } } } }