1# coding=utf-8
2# --------------------------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for license information.
5# --------------------------------------------------------------------------------------------
6
7from knack.help_files import helps
8# pylint: disable=line-too-long, too-many-lines
9
10helps['acr'] = """
11type: group
12short-summary: Manage private registries with Azure Container Registries.
13"""
14
15helps['acr build'] = """
16type: command
17short-summary: Queues a quick build, providing streaming logs for an Azure Container Registry.
18examples:
19  - name: Queue a local context as a Linux build, tag it, and push it to the registry.
20    text: >
21        az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry .
22  - name: Queue a local context as a Linux build, tag it, and push it to the registry without streaming logs.
23    text: >
24        az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry --no-logs .
25  - name: Queue a local context as a Linux build without pushing it to the registry.
26    text: >
27        az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry --no-push .
28  - name: Queue a local context as a Linux build without pushing it to the registry.
29    text: >
30        az acr build -r MyRegistry .
31  - name: Queue a remote GitHub context as a Windows build and x86 architecture, tag it, and push it to the registry.
32    text: >
33        az acr build -r MyRegistry https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --platform Windows/x86
34  - name: Queue a local context as a Linux build on arm/v7 architecture, tag it, and push it to the registry.
35    text: >
36        az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry . --platform linux/arm/v7
37"""
38
39helps['acr check-name'] = """
40type: command
41short-summary: Checks if an Azure Container Registry name is valid and available for use.
42examples:
43  - name: Check if a registry name already exists.
44    text: >
45        az acr check-name -n doesthisnameexist
46"""
47
48helps['acr config'] = """
49type: group
50short-summary: Configure policies for Azure Container Registries.
51"""
52
53helps['acr config content-trust'] = """
54type: group
55short-summary: Manage content-trust policy for Azure Container Registries.
56"""
57
58helps['acr config content-trust show'] = """
59type: command
60short-summary: Show the configured content-trust policy for an Azure Container Registry.
61examples:
62  - name: Show the configured content-trust policy for an Azure Container Registry
63    text: >
64        az acr config content-trust show -n MyRegistry
65"""
66
67helps['acr config content-trust update'] = """
68type: command
69short-summary: Update content-trust policy for an Azure Container Registry.
70examples:
71  - name: Update content-trust policy for an Azure Container Registry
72    text: >
73        az acr config content-trust update -n MyRegistry --status Enabled
74  - name: Update content-trust policy for an Azure Container Registry. (autogenerated)
75    text: az acr config content-trust update --name MyRegistry --resource-group MyResourceGroup --status enabled
76    crafted: true
77"""
78
79helps['acr create'] = """
80type: command
81short-summary: Creates an Azure Container Registry.
82examples:
83  - name: Create a managed container registry with the Standard SKU.
84    text: >
85        az acr create -n MyRegistry -g MyResourceGroup --sku Standard
86  - name: Create an Azure Container Registry with a new storage account with the Classic SKU (Classic registries are being deprecated by March 2019).
87    text: >
88        az acr create -n MyRegistry -g MyResourceGroup --sku Classic
89"""
90
91helps['acr credential'] = """
92type: group
93short-summary: Manage login credentials for Azure Container Registries.
94"""
95
96helps['acr credential renew'] = """
97type: command
98short-summary: Regenerate login credentials for an Azure Container Registry.
99examples:
100  - name: Renew the second password for an Azure Container Registry.
101    text: >
102        az acr credential renew -n MyRegistry --password-name password2
103  - name: Regenerate login credentials for an Azure Container Registry. (autogenerated)
104    text: az acr credential renew --name MyRegistry --password-name password --resource-group MyResourceGroup
105    crafted: true
106"""
107
108helps['acr credential show'] = """
109type: command
110short-summary: Get the login credentials for an Azure Container Registry.
111examples:
112  - name: Get the login credentials for an Azure Container Registry.
113    text: >
114        az acr credential show -n MyRegistry
115  - name: Get the username used to log in to an Azure Container Registry.
116    text: >
117        az acr credential show -n MyRegistry --query username
118  - name: Get a password used to log in to an Azure Container Registry.
119    text: >
120        az acr credential show -n MyRegistry --query passwords[0].value
121"""
122
123helps['acr delete'] = """
124type: command
125short-summary: Deletes an Azure Container Registry.
126examples:
127  - name: Delete an Azure Container Registry.
128    text: >
129        az acr delete -n MyRegistry
130"""
131
132helps['acr helm'] = """
133type: group
134short-summary: Manage helm charts for Azure Container Registries.
135"""
136
137helps['acr helm delete'] = """
138type: command
139short-summary: Delete a helm chart version in an Azure Container Registry.
140examples:
141  - name: Delete all versions of a helm chart in an Azure Container Registry
142    text: >
143        az acr helm delete -n MyRegistry mychart
144  - name: Delete a helm chart version in an Azure Container Registry
145    text: >
146        az acr helm delete -n MyRegistry mychart --version 0.3.2
147"""
148
149helps['acr helm list'] = """
150type: command
151short-summary: List all helm charts in an Azure Container Registry.
152examples:
153  - name: List all helm charts in an Azure Container Registry
154    text: >
155        az acr helm list -n MyRegistry
156"""
157
158helps['acr helm push'] = """
159type: command
160short-summary: Push a helm chart package to an Azure Container Registry.
161examples:
162  - name: Push a chart package to an Azure Container Registry
163    text: >
164        az acr helm push -n MyRegistry mychart-0.3.2.tgz
165  - name: Push a chart package to an Azure Container Registry, overwriting the existing one.
166    text: >
167        az acr helm push -n MyRegistry mychart-0.3.2.tgz --force
168"""
169
170helps['acr helm repo'] = """
171type: group
172short-summary: Manage helm chart repositories for Azure Container Registries.
173"""
174
175helps['acr helm repo add'] = """
176type: command
177short-summary: Add a helm chart repository from an Azure Container Registry through the Helm CLI.
178long-summary: Helm must be installed on your machine.
179examples:
180  - name: Add a helm chart repository from an Azure Container Registry to manage helm charts.
181    text: >
182        az acr helm repo add -n MyRegistry
183"""
184
185helps['acr helm show'] = """
186type: command
187short-summary: Describe a helm chart in an Azure Container Registry.
188examples:
189  - name: Show all versions of a helm chart in an Azure Container Registry
190    text: >
191        az acr helm show -n MyRegistry mychart
192  - name: Show a helm chart version in an Azure Container Registry
193    text: >
194        az acr helm show -n MyRegistry mychart --version 0.3.2
195"""
196
197helps['acr import'] = """
198type: command
199short-summary: Imports an image to an Azure Container Registry from another Container Registry. Import removes the need to docker pull, docker tag, docker push.
200examples:
201  - name: Import an image to the target registry and inherits sourcerepository:sourcetag from the source registry.
202    text: >
203        az acr import -n MyRegistry --source sourceregistry.azurecr.io/sourcerepository:sourcetag
204  - name: Import an image from a registry in a different subscription.
205    text: |
206        az acr import -n MyRegistry --source sourcerepository:sourcetag -t targetrepository:targettag \\
207            -r /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry
208  - name: Import an image from a public repository in Docker Hub
209    text: >
210        az acr import -n MyRegistry --source docker.io/library/hello-world:latest -t targetrepository:targettag
211"""
212
213helps['acr list'] = """
214type: command
215short-summary: Lists all the container registries under the current subscription.
216examples:
217  - name: List container registries and show the results in a table, across multiple resource groups.
218    text: >
219        az acr list -o table
220  - name: List container registries in a resource group and show the results in a table.
221    text: >
222        az acr list -g MyResourceGroup -o table
223"""
224
225helps['acr login'] = """
226type: command
227short-summary: Log in to an Azure Container Registry through the Docker CLI.
228long-summary: Docker must be installed on your machine.
229examples:
230  - name: Log in to an Azure Container Registry
231    text: >
232        az acr login -n MyRegistry
233"""
234
235helps['acr network-rule'] = """
236type: group
237short-summary: Manage network rules for Azure Container Registries.
238"""
239
240helps['acr network-rule add'] = """
241type: command
242short-summary: Add a network rule.
243examples:
244  - name: Add a rule to allow access for a subnet in the same resource group as the registry.
245    text: >
246        az acr network-rule add -n MyRegistry --vnet-name myvnet --subnet mysubnet
247  - name: Add a rule to allow access for a subnet in a different subscription or resource group.
248    text: >
249        az acr network-rule add -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet
250  - name: Add a rule to allow access for a specific IP address-range.
251    text: >
252        az acr network-rule add -n MyRegistry --ip-address 23.45.1.0/24
253"""
254
255helps['acr network-rule list'] = """
256type: command
257short-summary: List network rules.
258examples:
259  - name: List network rules for a registry.
260    text: >
261        az acr network-rule list -n MyRegistry
262"""
263
264helps['acr network-rule remove'] = """
265type: command
266short-summary: Remove a network rule.
267examples:
268  - name: Remove a rule that allows access for a subnet in the same resource group as the registry.
269    text: >
270        az acr network-rule remove -n MyRegistry --vnet-name myvnet --subnet mysubnet
271  - name: Remove a rule that allows access for a subnet in a different subscription or resource group.
272    text: >
273        az acr network-rule remove -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet
274  - name: Remove a rule that allows access for a specific IP address-range.
275    text: >
276        az acr network-rule remove -n MyRegistry --ip-address 23.45.1.0/24
277"""
278
279helps['acr replication'] = """
280type: group
281short-summary: Manage geo-replicated regions of Azure Container Registries.
282"""
283
284helps['acr replication create'] = """
285type: command
286short-summary: Create a replicated region for an Azure Container Registry.
287examples:
288  - name: Create a replicated region for an Azure Container Registry.
289    text: >
290        az acr replication create -r MyRegistry -l westus
291"""
292
293helps['acr replication delete'] = """
294type: command
295short-summary: Delete a replicated region from an Azure Container Registry.
296examples:
297  - name: Delete a replicated region from an Azure Container Registry.
298    text: >
299        az acr replication delete -n MyReplication -r MyRegistry
300"""
301
302helps['acr replication list'] = """
303type: command
304short-summary: List all of the regions for a geo-replicated Azure Container Registry.
305examples:
306  - name: List replications and show the results in a table.
307    text: >
308        az acr replication list -r MyRegistry -o table
309"""
310
311helps['acr replication show'] = """
312type: command
313short-summary: Get the details of a replicated region.
314examples:
315  - name: Get the details of a replicated region
316    text: >
317        az acr replication show -n MyReplication -r MyRegistry
318"""
319
320helps['acr replication update'] = """
321type: command
322short-summary: Updates a replication.
323examples:
324  - name: Update tags for a replication
325    text: >
326        az acr replication update -n MyReplication -r MyRegistry --tags key1=value1 key2=value2
327"""
328
329helps['acr repository'] = """
330type: group
331short-summary: Manage repositories (image names) for Azure Container Registries.
332"""
333
334helps['acr repository delete'] = """
335type: command
336short-summary: Delete a repository or image in an Azure Container Registry.
337long-summary: This command deletes all associated layer data that are not referenced by any other manifest in the container registry.
338examples:
339  - name: Delete a repository from an Azure Container Registry. This deletes all manifests and tags under 'hello-world'.
340    text: az acr repository delete -n MyRegistry --repository hello-world
341  - name: Delete an image by tag. This deletes the manifest referenced by 'hello-world:latest' and all other tags referencing the manifest.
342    text: az acr repository delete -n MyRegistry --image hello-world:latest
343  - name: Delete an image by sha256-based manifest digest. This deletes the manifest identified by 'hello-world@sha256:abc123' and all tags referencing the manifest.
344    text: az acr repository delete -n MyRegistry --image hello-world@sha256:abc123
345"""
346
347helps['acr repository list'] = """
348type: command
349short-summary: List repositories in an Azure Container Registry.
350examples:
351  - name: List repositories in a given Azure Container Registry.
352    text: az acr repository list -n MyRegistry
353"""
354
355helps['acr repository show'] = """
356type: command
357short-summary: Get the attributes of a repository or image in an Azure Container Registry.
358examples:
359  - name: Get the attributes of the repository 'hello-world'.
360    text: az acr repository show -n MyRegistry --repository hello-world
361  - name: Get the attributes of the image referenced by tag 'hello-world:latest'.
362    text: az acr repository show -n MyRegistry --image hello-world:latest
363  - name: Get the attributes of the image referenced by digest 'hello-world@sha256:abc123'.
364    text: az acr repository show -n MyRegistry --image hello-world@sha256:abc123
365"""
366
367helps['acr repository show-manifests'] = """
368type: command
369short-summary: Show manifests of a repository in an Azure Container Registry.
370examples:
371  - name: Show manifests of a repository in an Azure Container Registry.
372    text: az acr repository show-manifests -n MyRegistry --repository MyRepository
373  - name: Show the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry.
374    text: az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc
375  - name: Show the detailed information of the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry.
376    text: az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail
377"""
378
379helps['acr repository show-tags'] = """
380type: command
381short-summary: Show tags for a repository in an Azure Container Registry.
382examples:
383  - name: Show tags of a repository in an Azure Container Registry.
384    text: az acr repository show-tags -n MyRegistry --repository MyRepository
385  - name: Show the detailed information of tags of a repository in an Azure Container Registry.
386    text: az acr repository show-tags -n MyRegistry --repository MyRepository --detail
387  - name: Show the detailed information of the latest 10 tags ordered by timestamp of a repository in an Azure Container Registry.
388    text: az acr repository show-tags -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail
389"""
390
391helps['acr repository untag'] = """
392type: command
393short-summary: Untag an image in an Azure Container Registry.
394long-summary: This command does not delete the manifest referenced by the tag or any associated layer data.
395examples:
396  - name: Untag an image from a repository.
397    text: az acr repository untag -n MyRegistry --image hello-world:latest
398"""
399
400helps['acr repository update'] = """
401type: command
402short-summary: Update the attributes of a repository or image in an Azure Container Registry.
403examples:
404  - name: Update the attributes of the repository 'hello-world' to disable write operation.
405    text: az acr repository update -n MyRegistry --repository hello-world --write-enabled false
406  - name: Update the attributes of the image referenced by tag 'hello-world:latest' to disable write operation.
407    text: az acr repository update -n MyRegistry --image hello-world:latest --write-enabled false
408  - name: Update the attributes of the image referenced by digest 'hello-world@sha256:abc123' to disable write operation.
409    text: az acr repository update -n MyRegistry --image hello-world@sha256:abc123 --write-enabled false
410"""
411
412helps['acr run'] = """
413type: command
414short-summary: Queues a quick run providing streamed logs for an Azure Container Registry.
415examples:
416  - name: Queue a run to execute a container command.
417    text: >
418        az acr run -r MyRegistry --cmd MyImage /dev/null
419  - name: Queue a run with the task definition from the standard input. Either 'Ctrl + Z'(Windows) or 'Ctrl + D'(Linux) terminates the input stream.
420    text: >
421        az acr run -r MyRegistry -f - /dev/null
422  - name: Queue a run to execute the tasks passed through the pipe.
423    text: >
424        cat task.yaml | az acr run -r MyRegistry -f - /dev/null
425  - name: Queue a local context, pushed to ACR with streaming logs.
426    text: >
427        az acr run -r MyRegistry -f bash-echo.yaml .
428  - name: Queue a remote git context with streaming logs.
429    text: >
430        az acr run -r MyRegistry https://github.com/Azure-Samples/acr-tasks.git -f hello-world.yaml
431  - name: Queue a remote git context with streaming logs and runs the task on Linux platform.
432    text: >
433        az acr run -r MyRegistry https://github.com/Azure-Samples/acr-tasks.git -f build-hello-world.yaml --platform linux
434"""
435
436helps['acr pack'] = """
437type: group
438short-summary: Manage Azure Container Registry Tasks that use Cloud Native Buildpacks.
439"""
440
441helps['acr pack build'] = """
442type: command
443short-summary: Queues a quick build task that builds an app and pushes it into an Azure Container Registry.
444examples:
445  - name: Queue a build for the current directory with the default Oryx-based buildpack.
446    text: >
447        az acr pack build -r MyRegistry -t {{.Run.Registry}}/node-app:{{.Run.ID}} .
448"""
449
450helps['acr show'] = """
451type: command
452short-summary: Get the details of an Azure Container Registry.
453examples:
454  - name: Get the login server for an Azure Container Registry.
455    text: >
456        az acr show -n MyRegistry --query loginServer
457  - name: Get the details of an Azure Container Registry
458    text: az acr show --name MyRegistry --resource-group MyResourceGroup
459    crafted: true
460"""
461
462helps['acr show-usage'] = """
463type: command
464short-summary: Get the storage usage for an Azure Container Registry.
465examples:
466  - name: Get the storage usage for an Azure Container Registry.
467    text: >
468        az acr show-usage -n MyRegistry
469"""
470
471helps['acr task'] = """
472type: group
473short-summary: Manage a collection of steps for building, testing and OS & Framework patching container images using Azure Container Registries.
474"""
475
476helps['acr task cancel-run'] = """
477type: command
478short-summary: Cancel a specified run of an Azure Container Registry.
479examples:
480  - name: Cancel a run
481    text: >
482        az acr task cancel-run -r MyRegistry --run-id runId
483"""
484
485helps['acr task create'] = """
486type: command
487short-summary: Creates a series of steps for building, testing and OS & Framework patching containers. Tasks support triggers from git commits and base image updates.
488examples:
489  - name: Create a task without the source location.
490    text: >
491        az acr task create -n hello-world -r MyRegistry --cmd MyImage -c /dev/null
492  - name: Create a task with the definition from the standard input. Either 'Ctrl + Z'(Windows) or 'Ctrl + D'(Linux) terminates the input stream.
493    text: >
494        az acr task create -n hello-world -r MyRegistry -f - -c /dev/null
495  - name: Create a task with the definition from the pipe.
496    text: >
497        cat task.yaml | az acr task create -n hello-world -r MyRegistry -f - -c /dev/null
498  - name: Create a Linux task from a public GitHub repository which builds the hello-world image without triggers.
499    text: |
500        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
501            -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --commit-trigger-enabled false \\
502            --pull-request-trigger-enabled false
503  - name: Create a Linux task from a public GitHub repository which builds the hello-world image without triggers and uses a build argument.
504    text: |
505        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
506            -c https://github.com/Azure/acr-builder.git -f Dockerfile --commit-trigger-enabled false \\
507            --pull-request-trigger-enabled false --arg DOCKER_CLI_BASE_IMAGE=docker:18.03.0-ce-git
508  - name: Create a Linux task using a private GitHub repository which builds the hello-world image without triggers on Arm architecture (V7 variant)
509    text: |
510        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
511            -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --commit-trigger-enabled false \\
512            --pull-request-trigger-enabled false --git-access-token 0000000000000000000000000000000000000000 --platform linux/arm/v7
513  - name: Create a Linux task from a public GitHub repository which builds the hello-world image with a git commit trigger. Note that this task does not use Source Registry (MyRegistry), so we can explicitly set Auth mode as None for it.
514    text: |
515        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
516            --auth-mode None -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile \\
517            --git-access-token 0000000000000000000000000000000000000000
518  - name: Create a Windows task from a public GitHub repository which builds the Azure Container Builder image on Amd64 architecture.
519    text: |
520        az acr task create -t acb:{{.Run.ID}} -n acb-win -r MyRegistry \\
521            -c https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --commit-trigger-enabled false \\
522            --pull-request-trigger-enabled false --platform Windows/amd64
523  - name: Create a Linux task from a public GitHub repository which builds the hello-world image with a git commit trigger and with the system-assigned managed identity
524    text: |
525        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
526            -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile \\
527            --assign-identity
528  - name: Create a Linux task from a public GitHub repository which builds the hello-world image with a git commit trigger and with a user-assigned managed identity
529    text: |
530        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
531            -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile \\
532            --assign-identity "/subscriptions/<SUBSCRIPTON ID>/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentitiy"
533  - name: Create a Linux task from a public GitHub repository which builds the hello-world image with a git commit trigger and with both system-assigned and user-assigned managed identities
534    text: |
535        az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry \\
536            -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile \\
537            --assign-identity [system] "/subscriptions/<SUBSCRIPTON ID>/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentitiy"
538"""
539
540helps['acr task identity'] = """
541type: group
542short-summary: Managed Service Identities for Task.
543"""
544
545helps['acr task identity assign'] = """
546type: command
547short-summary: Update the managed service identity for a task.
548examples:
549  - name: Enable the system-assigned identity on an existing task. This will replace all existing user-assigned identities for that task.
550    text: >
551        az acr task identity assign -n MyTask -r MyRegistry
552  - name: Assign user-assigned managed identities to an existing task. This will remove the existing system-assigned identity.
553    text: |
554        az acr task identity assign -n MyTask -r MyRegistry \\
555            --identities "/subscriptions/<SUBSCRIPTON ID>/resourcegroups/<RESOURCE GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentitiy"
556  - name: Assign both system-assigned and user-assigned managed identities to an existing task.
557    text: |
558        az acr task identity assign -n MyTask -r MyRegistry \\
559            --identities [system] "/subscriptions/<SUBSCRIPTON ID>/resourcegroups/<RESOURCE GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentitiy"
560"""
561
562helps['acr task identity remove'] = """
563type: command
564short-summary: Remove managed service identities for a task.
565examples:
566  - name: Remove the system-assigned identity from a task.
567    text: >
568        az acr task identity remove -n MyTask -r MyRegistry
569  - name: Remove a user-assigned identity from a task.
570    text: |
571        az acr task identity remove -n MyTask -r MyRegistry \\
572            --identities "/subscriptions/<SUBSCRIPTON ID>/resourcegroups/<RESOURCE GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentitiy"
573  - name: Remove all managed identities from a task.
574    text: >
575        az acr task identity remove -n MyTask -r MyRegistry --identities [all]
576"""
577
578helps['acr task identity show'] = """
579type: command
580short-summary: Display the managed service identities for task.
581examples:
582  - name: Display the managed service identities for a task.
583    text: >
584        az acr task identity show -n MyTask -r MyRegistry
585"""
586
587helps['acr task credential'] = """
588type: group
589short-summary: Manage credentials for a task
590"""
591
592helps['acr task credential add'] = """
593type: command
594short-summary: Add a custom registry login credential to the task
595examples:
596  - name: Add a registry login credential to a task using a plain text username and password.
597    text: |
598        az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \\
599            -u 'myusername' -p 'mysecret'
600  - name: Add a registry login credential to a task using key vault secret URIs for the username and password and the task system-assigned identity.
601    text: |
602        az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \\
603            -u 'https://mykeyvault.vault.azure.net/secrets/secretusername' -p 'https://mykeyvault.vault.azure.net/secrets/secretpassword' \\
604            --use-identity [system]
605  - name: Add a registry login credential to a task using key vault secret URIs for the username and password and a task user-assigned identity given by its client id.
606    text: |
607        az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \\
608            -u 'https://mykeyvault.vault.azure.net/secrets/secretusername' -p 'https://mykeyvault.vault.azure.net/secrets/secretpassword' \\
609            --use-identity 00000000-0000-0000-0000-000000000000
610  - name: Add a registry login credential to a task using a plain text username and key vault secret URI for the password and the task user-assigned identity given by its client id.
611    text: |
612        az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \\
613            -u 'myusername' -p 'https://mykeyvault.vault.azure.net/secrets/secretpassword' \\
614            --use-identity 00000000-0000-0000-0000-000000000000
615  - name: Add a registry login credential to a task using a plain text username and key vault secret URI for the password and the default managed identity for the task if one exists.
616    text: |
617        az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \\
618            -u 'myusername' -p 'https://mykeyvault.vault.azure.net/secrets/secretpassword'
619  - name: Add a registry login credential to a task that uses only the task system-assigned identity to authenticate to the registry.
620    text: |
621        az acr task credential add -n taskname -r registryname --login-server myregistry.docker.io \\
622            --use-identity [system]
623"""
624
625helps['acr task credential list'] = """
626type: command
627short-summary: List all the custom registry credentials for task.
628examples:
629  - name: List the Credentials for a task.
630    text: >
631        az acr task credential list -n taskname -r registryname
632"""
633
634helps['acr task credential remove'] = """
635type: command
636short-summary: Remove credential for a task.
637examples:
638  - name: Remove a registry login credential from a task.
639    text: >
640        az acr task credential remove -n taskname -r registryname --login-server myregistry.docker.io
641"""
642
643helps['acr task credential update'] = """
644type: command
645short-summary: Update the registry login credential for a task.
646examples:
647  - name: Update the credential for a task
648    text: |
649        az acr task credential update -n taskname -r registryname --login-server myregistry.docker.io \\
650            -u 'myusername2' -p 'mysecret'
651"""
652
653helps['acr task delete'] = """
654type: command
655short-summary: Delete a task from an Azure Container Registry.
656examples:
657  - name: Delete a task from an Azure Container Registry.
658    text: >
659        az acr task delete -n MyTask -r MyRegistry
660"""
661
662helps['acr task list'] = """
663type: command
664short-summary: List the tasks for an Azure Container Registry.
665examples:
666  - name: List tasks and show the results in a table.
667    text: >
668        az acr task list -r MyRegistry -o table
669"""
670
671helps['acr task list-runs'] = """
672type: command
673short-summary: List all of the executed runs for an Azure Container Registry, with the ability to filter by a specific Task.
674examples:
675  - name: List all of the runs for a registry and show the results in a table.
676    text: >
677        az acr task list-runs -r MyRegistry -o table
678  - name: List runs for a task and show the results in a table.
679    text: >
680        az acr task list-runs -r MyRegistry -n MyTask -o table
681  - name: List the last 10 successful runs for a registry and show the results in a table.
682    text: >
683        az acr task list-runs -r MyRegistry --run-status Succeeded --top 10 -o table
684  - name: List all of the runs that built the image 'hello-world' for a registry and show the results in a table.
685    text: >
686        az acr task list-runs -r MyRegistry --image hello-world -o table
687"""
688
689helps['acr task logs'] = """
690type: command
691short-summary: Show logs for a particular run. If no run-id is supplied, show logs for the last created run.
692examples:
693  - name: Show logs for the last created run in the registry.
694    text: >
695        az acr task logs -r MyRegistry
696  - name: Show logs for the last created run in the registry, filtered by task.
697    text: >
698        az acr task logs -r MyRegistry -n MyTask
699  - name: Show logs for a particular run.
700    text: >
701        az acr task logs -r MyRegistry --run-id runId
702  - name: Show logs for the last created run in the registry that built the image 'hello-world'.
703    text: >
704        az acr task logs -r MyRegistry --image hello-world
705"""
706
707helps['acr task run'] = """
708type: command
709short-summary: Manually trigger a task that might otherwise be waiting for git commits or base image update triggers.
710examples:
711  - name: Trigger a task.
712    text: >
713        az acr task run -n MyTask -r MyRegistry
714"""
715
716helps['acr task show'] = """
717type: command
718short-summary: Get the properties of a named task for an Azure Container Registry.
719examples:
720  - name: Get the properties of a task, displaying the results in a table.
721    text: >
722        az acr task show -n MyTask -r MyRegistry -o table
723
724  - name: Get the properties of a task, including secure properties.
725    text: >
726        az acr task show -n MyTask -r MyRegistry --with-secure-properties
727"""
728
729helps['acr task show-run'] = """
730type: command
731short-summary: Get the properties of a specified run of an Azure Container Registry Task.
732examples:
733  - name: Get the details of a run, displaying the results in a table.
734    text: >
735        az acr task show-run -r MyRegistry --run-id runId -o table
736"""
737
738helps['acr task update'] = """
739type: command
740short-summary: Update a task for an Azure Container Registry.
741examples:
742  - name: Update base image updates to trigger on all dependent images of a multi-stage dockerfile, and status of a task in an Azure Container Registry.
743    text: >
744        az acr task update -n MyTask -r MyRegistry --base-image-trigger-type All --status Disabled
745  - name: Update platform for the Build step of your Task to Windows (prev Linux).
746    text: >
747        az acr task update -n MyTask -r MyRegistry --platform Windows
748  - name: Update a task for an Azure Container Registry. (autogenerated)
749    text: az acr task update --context https://github.com/Azure-Samples/acr-build-helloworld-node.git --image MyImage --name MyTask --registry MyRegistry
750    crafted: true
751"""
752
753helps['acr task update-run'] = """
754type: command
755short-summary: Patch the run properties of an Azure Container Registry Task.
756examples:
757  - name: Update an existing run to be archived.
758    text: >
759        az acr task update-run -r MyRegistry --run-id runId --no-archive false
760"""
761
762helps['acr update'] = """
763type: command
764short-summary: Update an Azure Container Registry.
765examples:
766  - name: Update tags for an Azure Container Registry.
767    text: >
768        az acr update -n MyRegistry --tags key1=value1 key2=value2
769  - name: Update the storage account for an Azure Container Registry (Classic Registries are being deprecated as of March 2019).
770    text: >
771        az acr update -n MyRegistry --storage-account-name MyStorageAccount
772  - name: Enable the administrator user account for an Azure Container Registry.
773    text: >
774        az acr update -n MyRegistry --admin-enabled true
775"""
776
777helps['acr webhook'] = """
778type: group
779short-summary: Manage webhooks for Azure Container Registries.
780"""
781
782helps['acr webhook create'] = """
783type: command
784short-summary: Create a webhook for an Azure Container Registry.
785examples:
786  - name: Create a webhook for an Azure Container Registry that will deliver docker push and delete events to a service URI.
787    text: >
788        az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push delete
789  - name: Create a webhook for an Azure Container Registry that will deliver docker push events to a service URI with a basic authentication header.
790    text: >
791        az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push --headers "Authorization=Basic 000000"
792  - name: Create a webhook for an Azure Container Registry that will deliver helm chart push and delete events to a service URI.
793    text: >
794        az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions chart_push chart_delete
795"""
796
797helps['acr webhook delete'] = """
798type: command
799short-summary: Delete a webhook from an Azure Container Registry.
800examples:
801  - name: Delete a webhook from an Azure Container Registry.
802    text: >
803        az acr webhook delete -n MyWebhook -r MyRegistry
804"""
805
806helps['acr webhook get-config'] = """
807type: command
808short-summary: Get the service URI and custom headers for the webhook.
809examples:
810  - name: Get the configuration information for a webhook.
811    text: >
812        az acr webhook get-config -n MyWebhook -r MyRegistry
813"""
814
815helps['acr webhook list'] = """
816type: command
817short-summary: List all of the webhooks for an Azure Container Registry.
818examples:
819  - name: List webhooks and show the results in a table.
820    text: >
821        az acr webhook list -r MyRegistry -o table
822"""
823
824helps['acr webhook list-events'] = """
825type: command
826short-summary: List recent events for a webhook.
827examples:
828  - name: List recent events for a webhook.
829    text: >
830        az acr webhook list-events -n MyWebhook -r MyRegistry
831"""
832
833helps['acr webhook ping'] = """
834type: command
835short-summary: Trigger a ping event for a webhook.
836examples:
837  - name: Trigger a ping event for a webhook.
838    text: >
839        az acr webhook ping -n MyWebhook -r MyRegistry
840"""
841
842helps['acr webhook show'] = """
843type: command
844short-summary: Get the details of a webhook.
845examples:
846  - name: Get the details of a webhook.
847    text: >
848        az acr webhook show -n MyWebhook -r MyRegistry
849"""
850
851helps['acr webhook update'] = """
852type: command
853short-summary: Update a webhook.
854examples:
855  - name: Update headers for a webhook.
856    text: >
857        az acr webhook update -n MyWebhook -r MyRegistry --headers "Authorization=Basic 000000"
858  - name: Update the service URI and actions for a webhook.
859    text: >
860        az acr webhook update -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push delete
861  - name: Disable a webhook.
862    text: >
863        az acr webhook update -n MyWebhook -r MyRegistry --status disabled
864"""
865
866helps['acr check-health'] = """
867type: command
868short-summary: Gets health information on the environment and optionally a target registry.
869examples:
870  - name: Gets health state with target registry 'MyRegistry', skipping confirmation for pulling image.
871    text: >
872        az acr check-health -n MyRegistry -y
873  - name: Gets health state of the environment, without stopping on first error.
874    text: >
875        az acr check-health --ignore-errors
876"""
877