@@ -27,10 +27,10 @@ resources:
27
27
- name : <instance name>
28
28
type : Microsoft.OpenSSH.SSHD/Windows
29
29
properties :
30
- # Required properties
31
30
# Instance properties
32
- _exist :
33
- # Add other properties as needed
31
+ shell :
32
+ escapeArguments :
33
+ cmdOption :
34
34
` ` `
35
35
36
36
## Description
@@ -60,7 +60,6 @@ The resource has the following capabilities:
60
60
61
61
- ` get` - You can use the resource to retrieve the actual state of an instance.
62
62
- ` set` - You can use the resource to enforce the desired state for an instance.
63
- - ` export ` - You can use the resource to export the SSHD configuration of existing instances.
64
63
65
64
This resource uses the synthetic test functionality of DSC to determine whether an instance is in
66
65
the desired state. For more information about resource capabilities, see
@@ -70,41 +69,27 @@ the desired state. For more information about resource capabilities, see
70
69
71
70
<!-- Example definitions would need to be created as separate files -->
72
71
73
- 1 . [ Configure default shell PowerShell] [ 03 ] - Shows how to set the default shell to PowerShell.exe
72
+ 1. [Configure default shell PowerShell][01 ] - Shows how to set the default shell to PowerShell.exe
74
73
75
74
# # Properties
76
75
77
76
The following list describes the properties for the resource.
78
77
79
- - ** Required properties:** <a id =" required-properties " ></a > The following properties are always
80
- required when defining an instance of the resource. An instance that doesn't define each of these
81
- properties is invalid. For more information, see the "Required resource properties" section in
82
- [ DSC resource properties] [ 01 ]
83
-
84
- - [ shell] ( #shell ) - The path to the default shell for SSH.
85
-
86
- - ** Key properties:** <a id =" key-properties " > The following properties uniquely identify an
87
- instance. If two instances of a resource have the same values for their key properties, the
88
- instances are conflicting. For more information about key properties, see the "Key resource
89
- properties" section in [ DSC resource properties] [ 02 ] .
90
-
91
- - [ shell] ( #shell ) (required) - The path to the default shell for SSH.
92
-
93
78
- **Instance properties:** <a id="instance-properties"></a> The following properties are optional.
94
79
They define the desired state for an instance of the resource.
95
80
96
- - [ cmd_option ] ( #cmd_option ) - Specifies command-line options for the shell.
97
- - [ escape_arguments ] ( #escape_arguments ) - Specifies whether shell arguments should be escaped .
98
- - [ shell_arguments ] ( #shell_arguments ) - Specifies the arguments to pass to the shell .
81
+ - [shell ](#shell ) - The path to the default shell for SSH .
82
+ - [cmdOption ](#cmdOption ) - Specifies command-line options for the shell .
83
+ - [escapeArguments ](#escapeArguments ) - Specifies whether shell arguments should be escaped .
99
84
100
85
# ## shell
101
86
102
87
<details><summary>Expand for <code>shell</code> property metadata</summary>
103
88
104
89
` ` ` yaml
105
- Type : string
106
- IsRequired : true
107
- IsKey : true
90
+ Type : string, null
91
+ IsRequired : false
92
+ IsKey : false
108
93
IsReadOnly : false
109
94
IsWriteOnly : false
110
95
` ` `
@@ -114,12 +99,12 @@ IsWriteOnly : false
114
99
Defines the path to the default shell executable to use for SSH sessions.
115
100
This property is required and must specify a valid path to an executable on the system.
116
101
117
- ### cmd_option
102
+ # ## cmdOption
118
103
119
- <details><summary>Expand for <code>cmd_option </code> property metadata</summary>
104
+ <details><summary>Expand for <code>cmdOption </code> property metadata</summary>
120
105
121
106
` ` ` yaml
122
- Type : string
107
+ Type : string, null
123
108
IsRequired : false
124
109
IsKey : false
125
110
IsReadOnly : false
@@ -130,12 +115,12 @@ IsWriteOnly : false
130
115
131
116
Specifies optional command-line options to pass to the shell when it's launched.
132
117
133
- ### escape_arguments
118
+ # ## escapeArguments
134
119
135
- <details><summary>Expand for <code>escape_arguments </code> property metadata</summary>
120
+ <details><summary>Expand for <code>escapeArguments </code> property metadata</summary>
136
121
137
122
` ` ` yaml
138
- Type : boolean
123
+ Type : boolean, null
139
124
IsRequired : false
140
125
IsKey : false
141
126
IsReadOnly : false
@@ -147,26 +132,6 @@ IsWriteOnly : false
147
132
Determines whether shell arguments should be escaped. When set to `true`, the arguments provided
148
133
in `shell_arguments` will be properly escaped before being passed to the shell.
149
134
150
- # ## shell_arguments
151
-
152
- <details><summary>Expand for <code>shell_arguments</code> property metadata</summary>
153
-
154
- ` ` ` yaml
155
- Type : array
156
- ItemsType : string
157
- ItemsMustBeUnique : false
158
- ItemsMinimumCount : 0
159
- IsRequired : false
160
- IsKey : false
161
- IsReadOnly : false
162
- IsWriteOnly : false
163
- ` ` `
164
-
165
- </details>
166
-
167
- Specifies an array of arguments to pass to the shell when it's launched.
168
- Each element in the array represents a separate argument.
169
-
170
135
# # Instance validating schema
171
136
172
137
The following snippet contains the JSON Schema that validates an instance of the resource. The
@@ -176,23 +141,24 @@ non validating keywords are omitted.
176
141
` ` ` json
177
142
{
178
143
"type": "object",
179
- "required": ["shell"],
180
- "additionalProperties": false,
181
144
"properties": {
182
145
"shell": {
183
- "type": "string"
184
- } ,
185
- "cmd_option": {
186
- "type": "string"
146
+ "type": [
147
+ "string" ,
148
+ "null"
149
+ ]
187
150
},
188
- "escape_arguments": {
189
- "type": "boolean"
151
+ "cmdOption": {
152
+ "type": [
153
+ "string",
154
+ "null"
155
+ ]
190
156
},
191
- "shell_arguments ": {
192
- "type": "array",
193
- "items": {
194
- "type": "string "
195
- }
157
+ "escapeArguments ": {
158
+ "type": [
159
+ "boolean",
160
+ "null "
161
+ ]
196
162
}
197
163
}
198
164
}
@@ -204,9 +170,6 @@ The resource returns the following exit codes from operations:
204
170
205
171
- [0](#exit-code-0) - Success
206
172
- [1](#exit-code-1) - Invalid parameter
207
- - [2](#exit-code-2) - Invalid input
208
- - [3](#exit-code-3) - SSH configuration error
209
- - [4](#exit-code-4) - Json serialization failed
210
173
211
174
# ## Exit code 0
212
175
@@ -217,31 +180,13 @@ Indicates the resource operation completed without errors.
217
180
Indicates the resource operation failed due to an invalid parameter. When the resource returns this
218
181
exit code, it also emits an error message with details about the invalid parameter.
219
182
220
- # ## Exit code 2
221
-
222
- Indicates the resource operation failed because the input instance was invalid. When the resource
223
- returns this exit code, it also emits one or more error messages with details describing how the
224
- input instance was invalid.
225
-
226
- # ## Exit code 3
227
-
228
- Indicates the resource operation failed due to an error in the SSH server configuration. When the
229
- resource returns this exit code, it also emits the error message related to the SSH configuration issue.
230
-
231
- # ## Exit code 4
232
-
233
- Indicates the resource operation failed because the result couldn't be serialized to JSON.
234
-
235
183
# # See also
236
184
237
- - [Microsoft.DSC/PowerShell resource][03 ]
238
- - For more information about OpenSSH, see [OpenSSH Documentation][04 ]
185
+ - [Microsoft.DSC/PowerShell resource][02 ]
186
+ - For more information about OpenSSH, see [OpenSSH Documentation][03 ]
239
187
240
188
<!-- Link definitions -->
241
189
[00] : ../../../../../concepts/resources/capabilities.md
242
- [01] : ../../../../../concepts/resources/properties.md#required-resource-properties
243
- [02] : ../../../../../concepts/resources/properties.md#key-resource-properties
244
- [03] : ../../../DSC/PowerShell/index.md
245
- [04] : /windowsserverdocs/WindowsServerDocs/administration/OpenSSH/openssh-overview
246
- [05] : ./examples/configure-default-shell-powershell.md
247
-
190
+ [01] : ./examples/configure-default-shell-powershell.md
191
+ [02] : ../../../DSC/PowerShell/index.md
192
+ [03] : /windowsserverdocs/WindowsServerDocs/administration/OpenSSH/openssh-overview
0 commit comments