|
1 |
| -# Microsoft Azure CLI 'connectedmachine' Extension |
2 |
| - |
3 |
| -This package is for the 'connectedmachine' extension, i.e. 'az connectedmachine'. |
4 |
| - |
5 |
| -## Prerequisite |
6 |
| - |
7 |
| -In order to use this extension, |
8 |
| -first follow the quick start for |
9 |
| -[Hybrid Compute](https://docs.microsoft.com/en-us/azure/azure-arc/servers/learn/quick-enable-hybrid-vm) |
10 |
| -and onboard your machine(s). |
11 |
| - |
12 |
| -## How to use |
| 1 | +# Azure CLI connectedmachine Extension # |
| 2 | +This is the extension for connectedmachine |
13 | 3 |
|
| 4 | +### How to use ### |
14 | 5 | Install this extension using the below CLI command
|
15 |
| - |
16 |
| -```sh |
| 6 | +``` |
17 | 7 | az extension add --name connectedmachine
|
18 | 8 | ```
|
19 | 9 |
|
20 |
| -### Included Features |
21 |
| - |
22 |
| -#### Connected Machine Management |
23 |
| - |
24 |
| -*Examples:* |
25 |
| - |
26 |
| -##### Show connected machine |
27 |
| - |
28 |
| -```sh |
29 |
| -az connectedmachine show \ |
30 |
| - --subscription subscription_id \ |
31 |
| - --resource-group my-rg \ |
32 |
| - --name my-cluster |
| 10 | +### Included Features ### |
| 11 | +#### connectedmachine #### |
| 12 | +##### List ##### |
33 | 13 | ```
|
34 |
| - |
35 |
| -##### List connected machines in resource group |
36 |
| - |
37 |
| -```sh |
38 |
| -az connectedmachine list --resource-group my-rg |
| 14 | +az connectedmachine list --resource-group "myResourceGroup" |
39 | 15 | ```
|
40 |
| - |
41 |
| -##### Delete a connected machine |
42 |
| - |
43 |
| -```sh |
44 |
| -az connectedmachine delete \ |
45 |
| - --subscription subscription_id \ |
46 |
| - --resource-group my-rg \ |
47 |
| - --name my-machine |
| 16 | +##### Show ##### |
48 | 17 | ```
|
49 |
| - |
50 |
| -#### Connected Machine Extension Management |
51 |
| - |
52 |
| -*Examples:* |
53 |
| - |
54 |
| -##### Create or Update a Machine Extension |
55 |
| - |
56 |
| -```sh |
57 |
| -az connectedmachine extension create \ |
58 |
| - --machine-name "myMachine" \ |
59 |
| - --name "customScriptExtension" \ |
60 |
| - --location "eastus2euap" \ |
61 |
| - --type "CustomScriptExtension" \ |
62 |
| - --publisher "Microsoft.Compute" \ |
63 |
| - --settings "{\"commandToExecute\":\"powershell.exe -c \\\"Get-Process | Where-Object { $_.CPU -gt 10000 }\\\"\"}" \ |
64 |
| - --type-handler-version "1.10" \ |
65 |
| - --resource-group "myResourceGroup" |
| 18 | +az connectedmachine show --name "myMachine" --resource-group "myResourceGroup" |
66 | 19 | ```
|
67 |
| - |
68 |
| -##### Get all Machine Extensions |
69 |
| - |
70 |
| -```sh |
71 |
| -az connectedmachine extension list \ |
72 |
| - --machine-name "myMachine" \ |
73 |
| - --resource-group "myResourceGroup" |
| 20 | +##### Delete ##### |
74 | 21 | ```
|
75 |
| - |
76 |
| -##### Get a Machine Extension |
77 |
| - |
78 |
| -```sh |
79 |
| -az connectedmachine extension show \ |
80 |
| - --machine-name "myMachine" \ |
81 |
| - --name "CustomScriptExtension" \ |
82 |
| - --resource-group "myResourceGroup" |
| 22 | +az connectedmachine delete --name "myMachine" --resource-group "myResourceGroup" |
83 | 23 | ```
|
84 |
| - |
85 |
| -##### Update a Machine Extension |
86 |
| - |
87 |
| -```sh |
88 |
| -az connectedmachine extension update \ |
89 |
| - --machine-name "myMachine" \ |
90 |
| - --name "CustomScriptExtension" \ |
91 |
| - --type "CustomScriptExtension" \ |
| 24 | +#### connectedmachine extension #### |
| 25 | +##### Create ##### |
| 26 | +``` |
| 27 | +az connectedmachine extension create --n "CustomScriptExtension" --location "eastus2euap" \ |
| 28 | + --type "CustomScriptExtension" --publisher "Microsoft.Compute" \ |
| 29 | + --settings "{\\"commandToExecute\\":\\"powershell.exe -c \\\\\\"Get-Process | Where-Object { $_.CPU -gt 10000 }\\\\\\"\\"}" \ |
| 30 | + --type-handler-version "1.10" --machine-name "myMachine" --resource-group "myResourceGroup" |
| 31 | +``` |
| 32 | +##### Show ##### |
| 33 | +``` |
| 34 | +az connectedmachine extension show --n "CustomScriptExtension" --machine-name "myMachine" \ |
| 35 | + --resource-group "myResourceGroup" |
| 36 | +``` |
| 37 | +##### List ##### |
| 38 | +``` |
| 39 | +az connectedmachine extension list --machine-name "myMachine" --resource-group "myResourceGroup" |
| 40 | +``` |
| 41 | +##### Update ##### |
| 42 | +``` |
| 43 | +az connectedmachine extension update --n "CustomScriptExtension" --type "CustomScriptExtension" \ |
92 | 44 | --publisher "Microsoft.Compute" \
|
93 |
| - --settings "{\"commandToExecute\":\"powershell.exe -c \\\"Get-Process | Where-Object { $_.CPU -lt 100 }\\\"\"}" \ --type-handler-version "1.10" \ |
94 |
| - --resource-group "myResourceGroup" |
| 45 | + --settings "{\\"commandToExecute\\":\\"powershell.exe -c \\\\\\"Get-Process | Where-Object { $_.CPU -lt 100 }\\\\\\"\\"}" \ |
| 46 | + --type-handler-version "1.10" --machine-name "myMachine" --resource-group "myResourceGroup" |
95 | 47 | ```
|
96 |
| - |
97 |
| -##### Delete a Machine Extension |
98 |
| - |
99 |
| -```sh |
100 |
| -az connectedmachine extension delete \ |
101 |
| - --machine-name "myMachine" \ |
102 |
| - --name "MMA" \ |
103 |
| - --resource-group "myResourceGroup" |
| 48 | +##### Delete ##### |
| 49 | +``` |
| 50 | +az connectedmachine extension delete --n "MMA" --machine-name "myMachine" --resource-group "myResourceGroup" |
| 51 | +``` |
| 52 | +#### connectedmachine #### |
| 53 | +##### Upgrade-extension ##### |
| 54 | +``` |
| 55 | +az connectedmachine upgrade-extension \ |
| 56 | + --extension-targets "{\\"Microsoft.Azure.Monitoring\\":{\\"targetVersion\\":\\"2.0\\"},\\"Microsoft.Compute.CustomScriptExtension\\":{\\"targetVersion\\":\\"1.10\\"}}" \ |
| 57 | + --machine-name "myMachine" --resource-group "myResourceGroup" |
| 58 | +``` |
| 59 | +#### connectedmachine private-link-scope #### |
| 60 | +##### Create ##### |
| 61 | +``` |
| 62 | +az connectedmachine private-link-scope create --location "westus" --resource-group "my-resource-group" \ |
| 63 | + --scope-name "my-privatelinkscope" |
| 64 | +``` |
| 65 | +##### Update ##### |
| 66 | +``` |
| 67 | +az connectedmachine private-link-scope update --location "westus" --tags Tag1="Value1" \ |
| 68 | + --resource-group "my-resource-group" --scope-name "my-privatelinkscope" |
| 69 | +``` |
| 70 | +##### List ##### |
| 71 | +``` |
| 72 | +az connectedmachine private-link-scope list --resource-group "my-resource-group" |
| 73 | +``` |
| 74 | +##### Show ##### |
| 75 | +``` |
| 76 | +az connectedmachine private-link-scope show --resource-group "my-resource-group" --scope-name "my-privatelinkscope" |
| 77 | +``` |
| 78 | +##### Show-validation-detail ##### |
| 79 | +``` |
| 80 | +az connectedmachine private-link-scope show-validation-detail --location "wus2" \ |
| 81 | + --private-link-scope-id "f5dc51d3-92ed-4d7e-947a-775ea79b4919" |
| 82 | +``` |
| 83 | +##### Show-validation-detail-for-machine ##### |
| 84 | +``` |
| 85 | +az connectedmachine private-link-scope show-validation-detail-for-machine --machine-name "machineName" \ |
| 86 | + --resource-group "my-resource-group" |
| 87 | +``` |
| 88 | +##### Update-tag ##### |
| 89 | +``` |
| 90 | +az connectedmachine private-link-scope update-tag --tags Tag1="Value1" Tag2="Value2" \ |
| 91 | + --resource-group "my-resource-group" --scope-name "my-privatelinkscope" |
| 92 | +``` |
| 93 | +##### Delete ##### |
| 94 | +``` |
| 95 | +az connectedmachine private-link-scope delete --resource-group "my-resource-group" --scope-name "my-privatelinkscope" |
| 96 | +``` |
| 97 | +#### connectedmachine private-link-resource #### |
| 98 | +##### List ##### |
| 99 | +``` |
| 100 | +az connectedmachine private-link-resource list --resource-group "myResourceGroup" --scope-name "myPrivateLinkScope" |
| 101 | +``` |
| 102 | +##### Show ##### |
| 103 | +``` |
| 104 | +az connectedmachine private-link-resource show --group-name "hybridcompute" --resource-group "myResourceGroup" \ |
| 105 | + --scope-name "myPrivateLinkScope" |
| 106 | +``` |
| 107 | +#### connectedmachine private-endpoint-connection #### |
| 108 | +##### Update ##### |
| 109 | +``` |
| 110 | +az connectedmachine private-endpoint-connection update \ |
| 111 | + --private-link-service-connection-state description="Approved by [email protected]" status="Approved" \ |
| 112 | + --name "private-endpoint-connection-name" --resource-group "myResourceGroup" --scope-name "myPrivateLinkScope" |
| 113 | +``` |
| 114 | +##### Show ##### |
| 115 | +``` |
| 116 | +az connectedmachine private-endpoint-connection show --name "private-endpoint-connection-name" \ |
| 117 | + --resource-group "myResourceGroup" --scope-name "myPrivateLinkScope" |
| 118 | +``` |
| 119 | +##### List ##### |
| 120 | +``` |
| 121 | +az connectedmachine private-endpoint-connection list --resource-group "myResourceGroup" \ |
| 122 | + --scope-name "myPrivateLinkScope" |
| 123 | +``` |
| 124 | +##### Delete ##### |
104 | 125 | ```
|
| 126 | +az connectedmachine private-endpoint-connection delete --name "private-endpoint-connection-name" \ |
| 127 | + --resource-group "myResourceGroup" --scope-name "myPrivateLinkScope" |
| 128 | +``` |
0 commit comments