Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Commands/vmss/_deallocate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _vmss deallocate_

Deallocate VMs within a VMSS.

## Versions

### [2024-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL3ZpcnR1YWxtYWNoaW5lc2NhbGVzZXRzL3t9L2RlYWxsb2NhdGU=/2024-11-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/deallocate 2024-11-01 -->

#### examples

- Deallocate VMs within a VMSS.
```bash
vmss deallocate --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup
```
3 changes: 3 additions & 0 deletions Commands/vmss/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS
- [create](/Commands/vmss/_create.md)
: Create a VM scale set.

- [deallocate](/Commands/vmss/_deallocate.md)
: Deallocate VMs within a VMSS.

- [delete](/Commands/vmss/_delete.md)
: Delete a VM scale set.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/deallocate", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2RlYWxsb2NhdGU=/V/MjAyNC0xMS0wMQ=="}], "commandGroups": [{"name": "vmss", "commands": [{"name": "deallocate", "version": "2024-11-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/deallocate", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2RlYWxsb2NhdGU=/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": ["n", "name"], "required": true, "group": "", "idPart": "name", "help": {"short": "Scale set name. You can configure the default using `az configure --defaults vmss=<name>`"}}, {"type": "boolean", "var": "$Query.hibernate", "options": ["hibernate"], "group": "", "help": {"short": "Hibernate a virtual machine from the VM scale set. Available for VMSS with Flexible OrchestrationMode only. Allowed values:false, true"}}]}, {"name": "VmInstanceIDs", "args": [{"type": "array<string>", "var": "$vmInstanceIDs.instanceIds", "options": ["instance-ids"], "group": "VmInstanceIDs", "help": {"short": "The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set."}, "item": {"type": "string"}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "VirtualMachineScaleSets_Deallocate", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", "request": {"method": "post", "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": {"params": [{"type": "boolean", "name": "hibernate", "arg": "$Query.hibernate"}], "consts": [{"readOnly": true, "const": true, "default": {"value": "2024-11-01"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}, "body": {"json": {"schema": {"type": "object", "name": "vmInstanceIDs", "props": [{"type": "array<string>", "name": "instanceIds", "arg": "$vmInstanceIDs.instanceIds", "item": {"type": "string"}}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200]}, {"statusCode": [202], "header": {"items": [{"name": "Location"}, {"name": "Retry-After"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "confirmation": ""}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/deallocate" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2RlYWxsb2NhdGU=/V/MjAyNC0xMS0wMQ=="/>
<commandGroup name="vmss">
<command name="deallocate" version="2024-11-01" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/deallocate" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L2RlYWxsb2NhdGU=/V/MjAyNC0xMS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$Path.vmScaleSetName" options="name n" required="True" group="" idPart="name">
<help short="Scale set name. You can configure the default using `az configure --defaults vmss=<name>`"/>
</arg>
<arg type="boolean" var="$Query.hibernate" options="hibernate" group="">
<help short="Hibernate a virtual machine from the VM scale set. Available for VMSS with Flexible OrchestrationMode only. Allowed values:false, true"/>
</arg>
</argGroup>
<argGroup name="VmInstanceIDs">
<arg type="array<string>" var="$vmInstanceIDs.instanceIds" options="instance-ids" group="VmInstanceIDs">
<help short="The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set."/>
<item type="string"/>
</arg>
</argGroup>
<operation operationId="VirtualMachineScaleSets_Deallocate">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate">
<request method="post">
<path>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True">
<format maxLength="90" minLength="1"/>
</param>
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True">
<format minLength="1"/>
</param>
<param type="string" name="vmScaleSetName" arg="$Path.vmScaleSetName" required="True"/>
</path>
<query>
<param type="boolean" name="hibernate" arg="$Query.hibernate"/>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2024-11-01&quot;"/>
<format minLength="1"/>
</const>
</query>
<body>
<json>
<schema type="object" name="vmInstanceIDs" clientFlatten="True">
<prop type="array<string>" name="instanceIds" arg="$vmInstanceIDs.instanceIds">
<item type="string"/>
</prop>
</schema>
</json>
</body>
</request>
<response statusCode="200"/>
<response statusCode="202">
<header>
<item name="Location"/>
<item name="Retry-After"/>
</header>
</response>
<response isError="True">
<body>
<json>
<schema type="@ODataV4Format"/>
</json>
</body>
</response>
</http>
</operation>
</command>
</commandGroup>
</CodeGen>