|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json", |
| 4 | + "title": "dsc resource get result", |
| 5 | + "description": "Describes the return data for a DSC Resource instance from the `dsc resource get` command. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", |
| 6 | + "anyOf": [ |
| 7 | + { |
| 8 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.simple.json" |
| 9 | + }, |
| 10 | + { |
| 11 | + "type": "array", |
| 12 | + "items": { |
| 13 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.full.json" |
| 14 | + } |
| 15 | + } |
| 16 | + ], |
| 17 | + "$defs": { |
| 18 | + "PowerShell": { |
| 19 | + "DSC": { |
| 20 | + "main": { |
| 21 | + "schemas": { |
| 22 | + "v3.0.0": { |
| 23 | + "outputs": { |
| 24 | + "resource": { |
| 25 | + "get.simple.json": { |
| 26 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 27 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.simple.json", |
| 28 | + "title": "dsc resource get result (simple)", |
| 29 | + "description": "Describes the return data for a single DSC Resource instance from the `dsc resource get` command. This data is returned for instances that aren't group resources, adapter resources, or nested inside a group or adapter resource.\nWhen you use `dsc resource get` for a group or adapter resource, the command returns an array of full test result objects that include the name and type for the nested instances.", |
| 30 | + "type": "object", |
| 31 | + "required": [ |
| 32 | + "actualState" |
| 33 | + ], |
| 34 | + "properties": { |
| 35 | + "actualState": { |
| 36 | + "title": "Actual state", |
| 37 | + "description": "This property always represents the current state of the DSC Resource instance as returned by its `get` method. DSC validates this return value against the DSC Resource's schema.", |
| 38 | + "type": "object" |
| 39 | + } |
| 40 | + } |
| 41 | + }, |
| 42 | + "get.full.json": { |
| 43 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 44 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.full.json", |
| 45 | + "title": "dsc resource get result (full)", |
| 46 | + "description": "Describes the return data for the full result of the `get` operation for a\nresource instance. This data is returned:\n\n- For every instance in a configuration document when you use the\n `dsc config get` command.\n\n- For nested instances of a group or adapter resource when you use the\n `dsc resource get` command.", |
| 47 | + "type": "object", |
| 48 | + "required": [ |
| 49 | + "metadata", |
| 50 | + "name", |
| 51 | + "result", |
| 52 | + "type" |
| 53 | + ], |
| 54 | + "properties": { |
| 55 | + "metadata": { |
| 56 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/metadata/resourceInstanceResult.json" |
| 57 | + }, |
| 58 | + "name": { |
| 59 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/definitions/instanceName.json" |
| 60 | + }, |
| 61 | + "type": { |
| 62 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/definitions/resourceType.json" |
| 63 | + }, |
| 64 | + "result": { |
| 65 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json" |
| 66 | + } |
| 67 | + } |
| 68 | + }, |
| 69 | + "get.json": { |
| 70 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 71 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.json", |
| 72 | + "title": "dsc resource get result", |
| 73 | + "description": "Describes the return data for a DSC Resource instance from the `dsc resource get` command. The return data is either a single object that describes the actual state of a non-nested instance or an array of objects that describe the actual state of the nested instances for a group or adapter resource.", |
| 74 | + "anyOf": [ |
| 75 | + { |
| 76 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.simple.json" |
| 77 | + }, |
| 78 | + { |
| 79 | + "type": "array", |
| 80 | + "items": { |
| 81 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/outputs/resource/get.full.json" |
| 82 | + } |
| 83 | + } |
| 84 | + ] |
| 85 | + } |
| 86 | + } |
| 87 | + }, |
| 88 | + "metadata": { |
| 89 | + "resourceInstanceResult.json": { |
| 90 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 91 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/metadata/resourceInstanceResult.json", |
| 92 | + "title": "Resource instance result metadata", |
| 93 | + "description": "Defines metadata DSC returns for a DSC configuration operation against a resource instance in a configuration document, as from the `dsc config get` or `dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe the context of the operation.", |
| 94 | + "markdownDescription": "Defines metadata DSC returns for a configuration operation, as from the `dsc config get` or\n`dsc config set` commands. The metadata properties under the `Microsoft.DSC` property describe\nthe context of the operation.", |
| 95 | + "type": "object", |
| 96 | + "required": [ |
| 97 | + "Microsoft.DSC" |
| 98 | + ], |
| 99 | + "properties": { |
| 100 | + "Microsoft.DSC": { |
| 101 | + "title": "DSC context metadata", |
| 102 | + "description": "The child properties for this metadata describe the context of the DSC operation against a resource instance, including the duration of the operation.", |
| 103 | + "type": "object", |
| 104 | + "required": [ |
| 105 | + "duration" |
| 106 | + ], |
| 107 | + "properties": { |
| 108 | + "duration": { |
| 109 | + "$ref": "#/$defs/PowerShell/DSC/main/schemas/v3.0.0/metadata/Microsoft.DSC/duration.json" |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | + } |
| 114 | + }, |
| 115 | + "Microsoft.DSC": { |
| 116 | + "duration.json": { |
| 117 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 118 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/metadata/Microsoft.DSC/duration.json", |
| 119 | + "title": "Duration", |
| 120 | + "description": "Defines the duration of a DSC operation against a configuration document or resource instance as a string following the format defined in ISO8601 ABNF for `duration`. For example, `PT0.611216S` represents a duration of about `0.61` seconds. For more information, see: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", |
| 121 | + "markdownDescription": "Defines the duration of a DSC operation against a configuration document or resource instance as\na string following the format defined in [ISO8601 ABNF for `duration`][01]. For example,\n`PT0.611216S` represents a duration of about `0.61` seconds.\n\n[01]: https://datatracker.ietf.org/doc/html/rfc3339#appendix-A", |
| 122 | + "type": "string", |
| 123 | + "format": "duration" |
| 124 | + } |
| 125 | + } |
| 126 | + }, |
| 127 | + "definitions": { |
| 128 | + "instanceName.json": { |
| 129 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 130 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/definitions/instanceName.json", |
| 131 | + "title": "Instance name", |
| 132 | + "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.", |
| 133 | + "type": "string", |
| 134 | + "pattern": "^[a-zA-Z0-9 ]+$", |
| 135 | + "minLength": 1, |
| 136 | + "patternErrorMessage": "Invalid value for instance name. An instance name must be a non-empty string containing only\nletters, numbers, and spaces.\n", |
| 137 | + "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" |
| 138 | + }, |
| 139 | + "resourceType.json": { |
| 140 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 141 | + "$id": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.0.0/definitions/resourceType.json", |
| 142 | + "title": "DSC Resource fully qualified type name", |
| 143 | + "description": "The namespaced name of the DSC Resource, using the syntax:\n\nowner[.group][.area]/name\n\nFor example:\n\n - Microsoft.SqlServer/Database\n - Microsoft.SqlServer.Database/User\n", |
| 144 | + "type": "string", |
| 145 | + "pattern": "^\\w+(\\.\\w+){0,2}\\/\\w+$", |
| 146 | + "markdownDescription": "***\n[_Online Documentation_][01]\n***\n\nThe namespaced name of the DSC Resource, using the syntax:\n\n```yaml\nowner[.group][.area]/name\n```\n\nFor example:\n\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", |
| 147 | + "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 a group and area to namespace\nthe resource under the owner, like `Microsoft.Windows/Registry`.\n" |
| 148 | + } |
| 149 | + } |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | + } |
| 154 | + } |
| 155 | + } |
| 156 | +} |
0 commit comments