-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
_help.py
495 lines (409 loc) · 16.1 KB
/
_help.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from knack.help_files import helps # pylint: disable=unused-import
# pylint: disable=line-too-long, too-many-lines
OUTPUT_WITH_SECRET = (
'The output includes secrets that you must protect. Be sure that you do not include these secrets in your '
'source control. Also verify that no secrets are present in the logs of your command or script. '
'For additional information, see http://aka.ms/clisecrets.')
OUTPUT_WITH_SECRET_HELP = f'[WARNING] {OUTPUT_WITH_SECRET}'
helps['batch'] = """
type: group
short-summary: Manage Azure Batch.
"""
helps['batch account'] = """
type: group
short-summary: Manage Azure Batch accounts.
"""
helps['batch account autostorage-keys'] = """
type: group
short-summary: Manage the access keys for the auto storage account configured for a Batch account.
"""
helps['batch account create'] = """
type: command
short-summary: Create a Batch account with the specified parameters.
"""
helps['batch account keys'] = """
type: group
short-summary: Manage Batch account keys.
"""
helps['batch account list'] = """
type: command
short-summary: List the Batch accounts associated with a subscription or resource group.
"""
helps['batch account login'] = """
type: command
short-summary: Log in to a Batch account through Azure Active Directory or Shared Key authentication.
"""
helps['batch account set'] = """
type: command
short-summary: Update properties for a Batch account.
examples:
- name: Update properties for a Batch account. (autogenerated)
text: az batch account set --name MyBatchAccount --resource-group MyResourceGroup
crafted: true
"""
helps['batch account keys renew'] = f"""
type: command
short-summary: Renew keys for a Batch account.
long-summary: >
{OUTPUT_WITH_SECRET_HELP}
examples:
- name: Renew keys for a Batch account.
text: az batch account keys renew --name MyBatchAccount --resource-group MyResourceGroup --key-name primary
"""
helps['batch account keys list'] = f"""
type: command
short-summary: Gets the account keys for the specified Batch account.
This operation applies only to Batch accounts with allowedAuthenticationModes containing
'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its
allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use
another allowedAuthenticationModes instead. In this case, getting the keys will fail.
long-summary: >
{OUTPUT_WITH_SECRET_HELP}
"""
helps['batch account show'] = """
type: command
short-summary: Get a specified Batch account or the currently set account.
examples:
- name: Get a specified Batch account or the currently set account. (autogenerated)
text: az batch account show --name MyBatchAccount --resource-group MyResourceGroup
crafted: true
"""
helps['batch account outbound-endpoints'] = """
type: command
short-summary: List an account's outbound network dependencies.
long-summary: List the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see https://docs.microsoft.com/azure/batch/batch-virtual-network."
"""
helps['batch account identity'] = """
type: group
short-summary: Manage identities of a batch account.
"""
helps['batch account identity assign'] = """
type: command
short-summary: Add managed identities to an existing batch account.
examples:
- name: Add a system assigned managed identity to an existing batch account.
text: >
az batch account identity assign --name MyBatchAccount --resource-group MyResourceGroup --system-assigned
- name: Add a user assigned managed identity to an existing batch account.
text: >
az batch account identity assign --name MyBatchAccount --resource-group MyResourceGroup --user-assigned MyAssignedId
"""
helps['batch account identity remove'] = """
type: command
short-summary: Remove managed identities from an existing batch account.
examples:
- name: Remove a system assigned managed identity from an existing batch account.
text: >
az batch account identity remove --name MyBatchAccount --resource-group MyResourceGroup --system-assigned
- name: Remove a user assigned managed identity from an existing batch account.
text: >
az batch account identity remove --name MyBatchAccount --resource-group MyResourceGroup --user-assigned MyAssignedId
- name: Remove all user assigned managed identities from an existing batch account.
text: >
az batch account identity remove --name MyBatchAccount --resource-group MyResourceGroup --user-assigned
"""
helps['batch account identity show'] = f"""
type: command
short-summary: Display managed identities of a batch account.
long-summary: >
{OUTPUT_WITH_SECRET_HELP}
examples:
- name: Display managed identities of a batch account.
text: |
az batch account identity show --name MyBatchAccount --resource-group MyResourceGroup
"""
helps['batch account network-profile'] = """
type: group
short-summary: Manage Batch account Network profiles.
"""
helps['batch account network-profile show'] = """
type: command
short-summary: Get information about the Network profile for Batch account.
examples:
- name: Show the network-profile for both BatchAccount and NodeManagement
text: >
az batch account network-profile show -g MyResourceGroup -n MyBatchAccount
"""
helps['batch account network-profile set'] = """
type: command
short-summary: Set the Network profile for Batch account.
examples:
- name: Set the BatchAccount network-profile to the Allow
text: >
az batch account network-profile set -g MyResourceGroup -n MyBatchAccount --profile BatchAccount --default-action Allow
"""
helps['batch account network-profile network-rule'] = """
type: group
short-summary: Manage Batch account Network rules in Network Profile.
"""
helps['batch account network-profile network-rule list'] = """
type: command
short-summary: List the Network rules from a Network Profile.
examples:
- name: List the Batch Accounts network profile
text: >
az batch account network-profile network-rule list -g MyResourceGroup -n MyBatchAccount
"""
helps['batch account network-profile network-rule add'] = """
type: command
short-summary: Add a Network rule from a Network Profile.
examples:
- name: Add ip address to BatchAccount network rule
text: >
az batch account network-profile network-rule add -g MyResourceGroup -n MyBatchAccount --profile BatchAccount --ip-address 1.2.3.4
"""
helps['batch account network-profile network-rule delete'] = """
type: command
short-summary: Delete a Network rule from a Network Profile.
examples:
- name: Delete ip address from BatchAccount network rule
text: >
az batch account network-profile network-rule delete -g MyResourceGroup -n MyBatchAccount --profile BatchAccount --ip-address 1.2.3.4
"""
helps['batch application'] = """
type: group
short-summary: Manage Batch applications.
"""
helps['batch application package'] = """
type: group
short-summary: Manage Batch application packages.
"""
helps['batch application package activate'] = """
type: command
short-summary: Activates a Batch application package.
long-summary: This step is unnecessary if the package has already been successfully activated by the `create` command.
"""
helps['batch application package create'] = """
type: command
short-summary: Create a Batch application package record and activate it.
"""
helps['batch application set'] = """
type: command
short-summary: Update properties for a Batch application.
"""
helps['batch application summary'] = """
type: group
short-summary: View a summary of Batch application packages.
"""
helps['batch application summary list'] = """
type: command
short-summary: Lists all of the applications available in the specified account.
long-summary: This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the 'az batch application list' command.
"""
helps['batch application summary show'] = """
type: command
short-summary: Gets information about the specified application.
long-summary: This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the 'az batch application list' command.
"""
helps['batch certificate'] = """
type: group
short-summary: Manage Batch certificates.
"""
helps['batch certificate create'] = """
type: command
short-summary: Add a certificate to a Batch account.
"""
helps['batch certificate delete'] = """
type: command
short-summary: Delete a certificate from a Batch account.
"""
helps['batch job'] = """
type: group
short-summary: Manage Batch jobs.
"""
helps['batch job create'] = """
type: command
short-summary: Add a job to a Batch account.
"""
helps['batch job list'] = """
type: command
short-summary: List all of the jobs or job schedule in a Batch account.
"""
helps['batch job prep-release-status'] = """
type: group
short-summary: View the status of Batch job preparation and release tasks.
"""
helps['batch job reset'] = """
type: command
short-summary: Update the properties of a Batch job. Unspecified properties which can be updated are reset to their defaults.
"""
helps['batch job stop'] = """
type: command
short-summary: Stop a running Batch job.
long-summary: Terminate the specified job, marking it as completed. When a Terminate Job request is received, the Batch service sets the job to the terminating state. The Batch service then terminates any running tasks associated with the job and runs any required job release tasks. Then the job moves into the completed state. If there are any tasks in the job in the active state, they will remain in the active state. Once a job is terminated, new tasks cannot be added and any remaining active tasks will not be scheduled.
parameters:
- name: --terminate-reason
type: string
short-summary: Termination reason
long-summary: The text you want to appear as the job's TerminateReason. The default is 'UserTerminate'
"""
helps['batch job set'] = """
type: command
short-summary: Update the properties of a Batch job. Updating a property in a subgroup will reset the unspecified properties of that group.
"""
helps['batch job task-counts'] = """
type: group
short-summary: View the number of tasks and slots in a Batch job and their states.
"""
helps['batch job-schedule'] = """
type: group
short-summary: Manage Batch job schedules.
"""
helps['batch job-schedule create'] = """
type: command
short-summary: Add a Batch job schedule to an account.
"""
helps['batch job-schedule reset'] = """
type: command
short-summary: Reset the properties of a job schedule. An updated job specification only applies to new jobs.
"""
helps['batch job-schedule set'] = """
type: command
short-summary: Update the properties of a job schedule.
long-summary: You can independently update the schedule and the job specification, but any change to either of these entities will reset all properties in that entity.
"""
helps['batch location'] = """
type: group
short-summary: Manage Batch service options for a subscription at the region level.
"""
helps['batch location quotas'] = """
type: group
short-summary: Manage Batch service quotas at the region level.
"""
helps['batch location list-skus'] = """
type: command
short-summary: List virtual machine SKUs available in a location.
"""
helps['batch private-link-resource'] = """
type: group
short-summary: Manage Batch account private Link Resources.
"""
helps['batch private-link-resource show'] = """
type: command
short-summary: Get information about the specified private link resource.
"""
helps['batch private-link-resource list'] = """
type: command
short-summary: List all of the private link resources in the specified account.
"""
helps['batch private-endpoint-connection'] = """
type: group
short-summary: Manage Batch account private endpoint connections.
"""
helps['batch private-endpoint-connection show'] = """
type: command
short-summary: Get information about the specified private endpoint connection.
"""
helps['batch private-endpoint-connection list'] = """
type: command
short-summary: List all of the private endpoint connections in the specified account.
"""
helps['batch node'] = """
type: group
short-summary: Manage Batch compute nodes.
"""
helps['batch node file'] = """
type: group
short-summary: Manage Batch compute node files.
"""
helps['batch node file download'] = """
type: command
short-summary: Download the content of the a node file.
"""
helps['batch node remote-desktop'] = """
type: group
short-summary: Retrieve the remote desktop protocol file for a Batch compute node.
"""
helps['batch node remote-login-settings'] = """
type: group
short-summary: Retrieve the remote login settings for a Batch compute node.
"""
helps['batch node scheduling'] = """
type: group
short-summary: Manage task scheduling for a Batch compute node.
"""
helps['batch node service-logs'] = """
type: group
short-summary: Manage the service log files of a Batch compute node.
"""
helps['batch node user'] = """
type: group
short-summary: Manage the user accounts of a Batch compute node.
"""
helps['batch node user create'] = """
type: command
short-summary: Add a user account to a Batch compute node.
"""
helps['batch node user reset'] = """
type: command
short-summary: Update the properties of a user account on a Batch compute node. Unspecified properties which can be updated are reset to their defaults.
"""
helps['batch pool'] = """
type: group
short-summary: Manage Batch pools.
"""
helps['batch pool autoscale'] = """
type: group
short-summary: Manage automatic scaling of Batch pools.
"""
helps['batch pool create'] = """
type: command
short-summary: Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration.
"""
helps['batch pool node-counts'] = """
type: group
short-summary: Get node counts for Batch pools.
"""
helps['batch pool reset'] = """
type: command
short-summary: Update the properties of a Batch pool. Unspecified properties which can be updated are reset to their defaults.
"""
helps['batch pool resize'] = """
type: command
short-summary: Resize or stop resizing a Batch pool.
"""
helps['batch pool set'] = """
type: command
short-summary: Update the properties of a Batch pool. Updating a property in a subgroup will reset the unspecified properties of that group.
"""
helps['batch pool supported-images'] = """
type: group
short-summary: Query information on VM images supported by Azure Batch service.
"""
helps['batch pool supported-images list'] = """
type: command
short-summary: Lists all Virtual Machine Images supported by the Azure Batch service.
"""
helps['batch pool usage-metrics'] = """
type: group
short-summary: View usage metrics of Batch pools.
"""
helps['batch task'] = """
type: group
short-summary: Manage Batch tasks.
"""
helps['batch task create'] = """
type: command
short-summary: Create Batch tasks.
"""
helps['batch task file'] = """
type: group
short-summary: Manage Batch task files.
"""
helps['batch task file download'] = """
type: command
short-summary: Download the content of a Batch task file.
"""
helps['batch task reset'] = """
type: command
short-summary: Reset the properties of a Batch task.
"""
helps['batch task subtask'] = """
type: group
short-summary: Manage subtask information of a Batch task.
"""