Skip to content

Commit 7e5ac5c

Browse files
authored
Merge pull request #910 from yanzhudd/migrate-vmss
{Compute} `az vmss get-instance-view`: Migrate to aaz-based implementation
2 parents 1205ee5 + 4b65340 commit 7e5ac5c

File tree

10 files changed

+313
-0
lines changed

10 files changed

+313
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# [Command] _vmss instance-view show_
2+
3+
Get the status of a VM scale set instance.
4+
5+
## Versions
6+
7+
### [2024-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L2luc3RhbmNldmlldw==/2024-11-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/instanceview 2024-11-01 -->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# [Group] _vmss instance-view_
2+
3+
Manage Instance View
4+
5+
## Commands
6+
7+
- [show](/Commands/vmss/instance-view/_show.md)
8+
: Get the status of a VM scale set instance.

Commands/vmss/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS
1010
- [identity](/Commands/vmss/identity/readme.md)
1111
: Manage identities of a VMSS.
1212

13+
- [instance-view](/Commands/vmss/instance-view/readme.md)
14+
: Manage Instance View
15+
1316
- [nic](/Commands/vmss/nic/readme.md)
1417
: Manage network interfaces of a VMSS.
1518

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# [Command] _vmss vms instance-view show_
2+
3+
Get the status of a virtual machine from a VM scale set.
4+
5+
## Versions
6+
7+
### [2024-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L3ZpcnR1YWxtYWNoaW5lcy97fS9pbnN0YW5jZXZpZXc=/2024-11-01.xml) **Stable**
8+
9+
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/instanceview 2024-11-01 -->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# [Group] _vmss vms instance-view_
2+
3+
Manage Instance View
4+
5+
## Commands
6+
7+
- [show](/Commands/vmss/vms/instance-view/_show.md)
8+
: Get the status of a virtual machine from a VM scale set.

Commands/vmss/vms/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Manage Virtual Machine
77
- [identity](/Commands/vmss/vms/identity/readme.md)
88
: Manage Identity
99

10+
- [instance-view](/Commands/vmss/vms/instance-view/readme.md)
11+
: Manage Instance View
12+
1013
## Commands
1114

1215
- [create](/Commands/vmss/vms/_create.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/instanceview", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2luc3RhbmNlVmlldw==/V/MjAyNC0xMS0wMQ=="}], "commandGroups": [{"name": "vmss instance-view", "commands": [{"name": "show", "version": "2024-11-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/instanceview", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2luc3RhbmNlVmlldw==/V/MjAyNC0xMS0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}, {"type": "string", "var": "$Path.vmScaleSetName", "options": ["vm-scale-set-name"], "required": true, "idPart": "name", "help": {"short": "The name of the VM scale set."}}]}], "operations": [{"operationId": "VirtualMachineScaleSets_GetInstanceView", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", "request": {"method": "get", "path": {"params": [{"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"maxLength": 90, "minLength": 1}}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true, "format": {"minLength": 1}}, {"type": "string", "name": "vmScaleSetName", "arg": "$Path.vmScaleSetName", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2024-11-01"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"readOnly": true, "type": "array<object>", "name": "extensions", "item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "name"}, {"readOnly": true, "type": "array<@VirtualMachineStatusCodeCount_read>", "name": "statusesSummary", "item": {"type": "@VirtualMachineStatusCodeCount_read"}}]}, "identifiers": ["name"]}, {"readOnly": true, "type": "array<object>", "name": "orchestrationServices", "item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "serviceName", "enum": {"items": [{"value": "AutomaticRepairs"}]}}, {"readOnly": true, "type": "string", "name": "serviceState", "enum": {"items": [{"value": "NotRunning"}, {"value": "Running"}, {"value": "Suspended"}]}}]}, "identifiers": ["serviceName"]}, {"type": "array<object>", "name": "statuses", "item": {"type": "object", "props": [{"type": "string", "name": "code"}, {"type": "string", "name": "displayStatus"}, {"type": "string", "name": "level", "enum": {"items": [{"value": "Error"}, {"value": "Info"}, {"value": "Warning"}]}}, {"type": "string", "name": "message"}, {"type": "dateTime", "name": "time", "format": {"protocol": "iso"}}]}}, {"readOnly": true, "type": "object", "name": "virtualMachine", "props": [{"readOnly": true, "type": "array<object>", "name": "statusesSummary", "item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "code"}, {"readOnly": true, "type": "integer32", "name": "count"}], "cls": "VirtualMachineStatusCodeCount_read"}}]}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}]}]}]}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<CodeGen plane="mgmt-plane">
3+
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/instanceview" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2luc3RhbmNlVmlldw==/V/MjAyNC0xMS0wMQ=="/>
4+
<commandGroup name="vmss instance-view">
5+
<command name="show" version="2024-11-01">
6+
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/instanceview" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2luc3RhbmNlVmlldw==/V/MjAyNC0xMS0wMQ=="/>
7+
<argGroup name="">
8+
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
9+
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
10+
<arg type="string" var="$Path.vmScaleSetName" options="vm-scale-set-name" required="True" idPart="name">
11+
<help short="The name of the VM scale set."/>
12+
</arg>
13+
</argGroup>
14+
<operation operationId="VirtualMachineScaleSets_GetInstanceView">
15+
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView">
16+
<request method="get">
17+
<path>
18+
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True">
19+
<format maxLength="90" minLength="1"/>
20+
</param>
21+
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True">
22+
<format minLength="1"/>
23+
</param>
24+
<param type="string" name="vmScaleSetName" arg="$Path.vmScaleSetName" required="True"/>
25+
</path>
26+
<query>
27+
<const readOnly="True" const="True" type="string" name="api-version" required="True">
28+
<default value="&quot;2024-11-01&quot;"/>
29+
<format minLength="1"/>
30+
</const>
31+
</query>
32+
</request>
33+
<response statusCode="200">
34+
<body>
35+
<json var="$Instance">
36+
<schema type="object">
37+
<prop readOnly="True" type="array<object>" name="extensions" identifiers="name">
38+
<item type="object">
39+
<prop readOnly="True" type="string" name="name"/>
40+
<prop readOnly="True" type="array<@VirtualMachineStatusCodeCount_read>" name="statusesSummary">
41+
<item type="@VirtualMachineStatusCodeCount_read"/>
42+
</prop>
43+
</item>
44+
</prop>
45+
<prop readOnly="True" type="array<object>" name="orchestrationServices" identifiers="serviceName">
46+
<item type="object">
47+
<prop readOnly="True" type="string" name="serviceName">
48+
<enum>
49+
<item value="&quot;AutomaticRepairs&quot;"/>
50+
</enum>
51+
</prop>
52+
<prop readOnly="True" type="string" name="serviceState">
53+
<enum>
54+
<item value="&quot;NotRunning&quot;"/>
55+
<item value="&quot;Running&quot;"/>
56+
<item value="&quot;Suspended&quot;"/>
57+
</enum>
58+
</prop>
59+
</item>
60+
</prop>
61+
<prop type="array<object>" name="statuses">
62+
<item type="object">
63+
<prop type="string" name="code"/>
64+
<prop type="string" name="displayStatus"/>
65+
<prop type="string" name="level">
66+
<enum>
67+
<item value="&quot;Error&quot;"/>
68+
<item value="&quot;Info&quot;"/>
69+
<item value="&quot;Warning&quot;"/>
70+
</enum>
71+
</prop>
72+
<prop type="string" name="message"/>
73+
<prop type="dateTime" name="time">
74+
<format protocol="iso"/>
75+
</prop>
76+
</item>
77+
</prop>
78+
<prop readOnly="True" type="object" name="virtualMachine">
79+
<prop readOnly="True" type="array<object>" name="statusesSummary">
80+
<item type="object" cls="VirtualMachineStatusCodeCount_read">
81+
<prop readOnly="True" type="string" name="code"/>
82+
<prop readOnly="True" type="integer32" name="count"/>
83+
</item>
84+
</prop>
85+
</prop>
86+
</schema>
87+
</json>
88+
</body>
89+
</response>
90+
<response isError="True">
91+
<body>
92+
<json>
93+
<schema type="@ODataV4Format"/>
94+
</json>
95+
</body>
96+
</response>
97+
</http>
98+
</operation>
99+
<output type="object" ref="$Instance" clientFlatten="True"/>
100+
</command>
101+
</commandGroup>
102+
</CodeGen>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/instanceview", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3ZpcnR1YWxNYWNoaW5lcy97aW5zdGFuY2VJZH0vaW5zdGFuY2VWaWV3/V/MjAyNC0xMS0wMQ=="}], "commandGroups": [{"name": "vmss vms instance-view", "commands": [{"name": "show", "version": "2024-11-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/instanceview", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3ZpcnR1YWxNYWNoaW5lcy97aW5zdGFuY2VJZH0vaW5zdGFuY2VWaWV3/V/MjAyNC0xMS0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.instanceId", "options": ["instance-id"], "required": true, "idPart": "child_name_1", "help": {"short": "The instance ID of the virtual machine."}}, {"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}, {"type": "string", "var": "$Path.vmScaleSetName", "options": ["vm-scale-set-name"], "required": true, "idPart": "name", "help": {"short": "The name of the VM scale set."}}]}], "operations": [{"operationId": "VirtualMachineScaleSetVMs_GetInstanceView", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView", "request": {"method": "get", "path": {"params": [{"type": "string", "name": "instanceId", "arg": "$Path.instanceId", "required": true}, {"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"maxLength": 90, "minLength": 1}}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true, "format": {"minLength": 1}}, {"type": "string", "name": "vmScaleSetName", "arg": "$Path.vmScaleSetName", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2024-11-01"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "assignedHost"}, {"type": "object", "name": "bootDiagnostics", "props": [{"readOnly": true, "type": "string", "name": "consoleScreenshotBlobUri"}, {"readOnly": true, "type": "string", "name": "serialConsoleLogBlobUri"}, {"readOnly": true, "type": "@InstanceViewStatus_read", "name": "status"}]}, {"type": "string", "name": "computerName"}, {"type": "array<object>", "name": "disks", "item": {"type": "object", "props": [{"type": "array<object>", "name": "encryptionSettings", "item": {"type": "object", "props": [{"type": "object", "name": "diskEncryptionKey", "props": [{"type": "string", "name": "secretUrl", "required": true}, {"type": "object", "name": "sourceVault", "required": true, "props": [{"type": "ResourceId", "name": "id"}], "cls": "SubResource_read"}]}, {"type": "boolean", "name": "enabled"}, {"type": "object", "name": "keyEncryptionKey", "props": [{"type": "string", "name": "keyUrl", "required": true}, {"type": "@SubResource_read", "name": "sourceVault", "required": true}]}]}}, {"type": "string", "name": "name"}, {"type": "array<@InstanceViewStatus_read>", "name": "statuses", "item": {"type": "@InstanceViewStatus_read"}}]}, "identifiers": ["name"]}, {"type": "array<object>", "name": "extensions", "item": {"type": "object", "props": [{"type": "string", "name": "name"}, {"type": "array<@InstanceViewStatus_read>", "name": "statuses", "item": {"type": "@InstanceViewStatus_read"}}, {"type": "array<@InstanceViewStatus_read>", "name": "substatuses", "item": {"type": "@InstanceViewStatus_read"}}, {"type": "string", "name": "type"}, {"type": "string", "name": "typeHandlerVersion"}]}, "identifiers": ["name", "type"]}, {"type": "string", "name": "hyperVGeneration", "enum": {"items": [{"value": "V1"}, {"value": "V2"}]}}, {"type": "object", "name": "maintenanceRedeployStatus", "props": [{"type": "boolean", "name": "isCustomerInitiatedMaintenanceAllowed"}, {"type": "string", "name": "lastOperationMessage"}, {"type": "string", "name": "lastOperationResultCode", "enum": {"items": [{"value": "MaintenanceAborted"}, {"value": "MaintenanceCompleted"}, {"value": "None"}, {"value": "RetryLater"}]}}, {"type": "dateTime", "name": "maintenanceWindowEndTime", "format": {"protocol": "iso"}}, {"type": "dateTime", "name": "maintenanceWindowStartTime", "format": {"protocol": "iso"}}, {"type": "dateTime", "name": "preMaintenanceWindowEndTime", "format": {"protocol": "iso"}}, {"type": "dateTime", "name": "preMaintenanceWindowStartTime", "format": {"protocol": "iso"}}]}, {"type": "string", "name": "osName"}, {"type": "string", "name": "osVersion"}, {"type": "string", "name": "placementGroupId"}, {"type": "integer32", "name": "platformFaultDomain"}, {"type": "integer32", "name": "platformUpdateDomain"}, {"type": "string", "name": "rdpThumbPrint"}, {"type": "array<@InstanceViewStatus_read>", "name": "statuses", "item": {"type": "@InstanceViewStatus_read"}}, {"type": "object", "name": "vmAgent", "props": [{"type": "array<object>", "name": "extensionHandlers", "item": {"type": "object", "props": [{"type": "object", "name": "status", "props": [{"type": "string", "name": "code"}, {"type": "string", "name": "displayStatus"}, {"type": "string", "name": "level", "enum": {"items": [{"value": "Error"}, {"value": "Info"}, {"value": "Warning"}]}}, {"type": "string", "name": "message"}, {"type": "dateTime", "name": "time", "format": {"protocol": "iso"}}], "cls": "InstanceViewStatus_read"}, {"type": "string", "name": "type"}, {"type": "string", "name": "typeHandlerVersion"}]}}, {"type": "array<@InstanceViewStatus_read>", "name": "statuses", "item": {"type": "@InstanceViewStatus_read"}}, {"type": "string", "name": "vmAgentVersion"}]}, {"readOnly": true, "type": "object", "name": "vmHealth", "props": [{"readOnly": true, "type": "@InstanceViewStatus_read", "name": "status"}]}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}]}]}]}

0 commit comments

Comments
 (0)