Skip to content
Merged
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
3 changes: 3 additions & 0 deletions Commands/vmss/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS
- [rolling-upgrade](/Commands/vmss/rolling-upgrade/readme.md)
: Manage rolling upgrades.

- [run-command](/Commands/vmss/run-command/readme.md)
: Manage Run Command

## Commands

- [create](/Commands/vmss/_create.md)
Expand Down
9 changes: 9 additions & 0 deletions Commands/vmss/run-command/_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _vmss run-command create_

Create operation to create or update the VMSS VM run command.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommands/{} 2024-11-01 -->
16 changes: 16 additions & 0 deletions Commands/vmss/run-command/_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _vmss run-command delete_

Delete operation to delete the VMSS VM run command.

## Versions

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

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

#### examples

- Delete a VMSS run command.
```bash
vmss run-command delete --resource-group myResourceGroup --vmss-name myvmScaleSet --instance-id 0 --run-command-name myRunCommand
```
9 changes: 9 additions & 0 deletions Commands/vmss/run-command/_invoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _vmss run-command invoke_

Run command on a virtual machine in a VM scale set.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommand 2024-11-01 -->
16 changes: 16 additions & 0 deletions Commands/vmss/run-command/_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _vmss run-command list_

List operation to get all run commands of an instance in Virtual Machine Scaleset.

## Versions

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

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

#### examples

- List run commands in Vmss instance.
```bash
vmss run-command list --resource-group "myResourceGroup" --vmss-name "myVMSS" --instance-id "0"
```
9 changes: 9 additions & 0 deletions Commands/vmss/run-command/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _vmss run-command show_

Get operation to get the VMSS VM run command.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommands/{} 2024-11-01 -->
9 changes: 9 additions & 0 deletions Commands/vmss/run-command/_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _vmss run-command update_

Update operation to create or update the VMSS VM run command.

## Versions

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

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommands/{} 2024-11-01 -->
23 changes: 23 additions & 0 deletions Commands/vmss/run-command/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# [Group] _vmss run-command_

Manage Run Command

## Commands

- [create](/Commands/vmss/run-command/_create.md)
: Create operation to create or update the VMSS VM run command.

- [delete](/Commands/vmss/run-command/_delete.md)
: Delete operation to delete the VMSS VM run command.

- [invoke](/Commands/vmss/run-command/_invoke.md)
: Run command on a virtual machine in a VM scale set.

- [list](/Commands/vmss/run-command/_list.md)
: List operation to get all run commands of an instance in Virtual Machine Scaleset.

- [show](/Commands/vmss/run-command/_show.md)
: Get operation to get the VMSS VM run command.

- [update](/Commands/vmss/run-command/_update.md)
: Update operation to create or update the VMSS VM run command.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommand", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3ZpcnR1YWxNYWNoaW5lcy97aW5zdGFuY2VJZH0vcnVuQ29tbWFuZA==/V/MjAyNC0xMS0wMQ=="}], "commandGroups": [{"name": "vmss run-command", "commands": [{"name": "invoke", "version": "2024-11-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommand", "version": "2024-11-01", "swagger": "mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3ZpcnR1YWxNYWNoaW5lcy97aW5zdGFuY2VJZH0vcnVuQ29tbWFuZA==/V/MjAyNC0xMS0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.instanceId", "options": ["instance-id"], "required": true, "group": "", "idPart": "child_name_1", "help": {"short": "The instance of the VM"}}, {"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", "vmss-name"], "required": true, "group": "", "idPart": "name", "help": {"short": "The name of the VirtualMachineScaleSet"}}, {"type": "string", "var": "$parameters.commandId", "options": ["command-id"], "required": true, "group": "", "help": {"short": "The run command id."}}, {"type": "array<object>", "var": "$parameters.parameters", "options": ["parameters"], "group": "", "help": {"short": "The run command parameters."}, "item": {"type": "object", "args": [{"type": "string", "var": "$parameters.parameters[].name", "options": ["name"], "required": true, "help": {"short": "The run command parameter name."}}, {"type": "string", "var": "$parameters.parameters[].value", "options": ["value"], "required": true, "help": {"short": "The run command parameter value."}}]}}, {"type": "array<string>", "var": "$parameters.script", "options": ["script"], "group": "", "help": {"short": "Optional. The script to be executed. When this value is given, the given script will override the default script of the command."}, "item": {"type": "string"}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "VirtualMachineScaleSetVMs_RunCommand", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommand", "request": {"method": "post", "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}}]}, "body": {"json": {"schema": {"type": "object", "name": "parameters", "required": true, "props": [{"type": "string", "name": "commandId", "arg": "$parameters.commandId", "required": true}, {"type": "array<object>", "name": "parameters", "arg": "$parameters.parameters", "item": {"type": "object", "props": [{"type": "string", "name": "name", "arg": "$parameters.parameters[].name", "required": true}, {"type": "string", "name": "value", "arg": "$parameters.parameters[].value", "required": true}]}, "identifiers": ["name"]}, {"type": "array<string>", "name": "script", "arg": "$parameters.script", "item": {"type": "string"}}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "array<object>", "name": "value", "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"}}]}}]}}}}, {"statusCode": [202], "header": {"items": [{"name": "Location"}, {"name": "Retry-After"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}], "confirmation": ""}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommand" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3ZpcnR1YWxNYWNoaW5lcy97aW5zdGFuY2VJZH0vcnVuQ29tbWFuZA==/V/MjAyNC0xMS0wMQ=="/>
<commandGroup name="vmss run-command">
<command name="invoke" version="2024-11-01" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/virtualmachinescalesets/{}/virtualmachines/{}/runcommand" version="2024-11-01" swagger="mgmt-plane/compute/ResourceProviders/Microsoft.Compute/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS92aXJ0dWFsTWFjaGluZVNjYWxlU2V0cy97dm1TY2FsZVNldE5hbWV9L3ZpcnR1YWxNYWNoaW5lcy97aW5zdGFuY2VJZH0vcnVuQ29tbWFuZA==/V/MjAyNC0xMS0wMQ=="/>
<argGroup name="">
<arg type="string" var="$Path.instanceId" options="instance-id" required="True" group="" idPart="child_name_1">
<help short="The instance of the VM"/>
</arg>
<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="vmss-name name n" required="True" group="" idPart="name">
<help short="The name of the VirtualMachineScaleSet"/>
</arg>
<arg type="string" var="$parameters.commandId" options="command-id" required="True" group="">
<help short="The run command id."/>
</arg>
<arg type="array<object>" var="$parameters.parameters" options="parameters" group="">
<help short="The run command parameters."/>
<item type="object">
<arg type="string" var="$parameters.parameters[].name" options="name" required="True">
<help short="The run command parameter name."/>
</arg>
<arg type="string" var="$parameters.parameters[].value" options="value" required="True">
<help short="The run command parameter value."/>
</arg>
</item>
</arg>
<arg type="array<string>" var="$parameters.script" options="script" group="">
<help short="Optional. The script to be executed. When this value is given, the given script will override the default script of the command."/>
<item type="string"/>
</arg>
</argGroup>
<operation operationId="VirtualMachineScaleSetVMs_RunCommand">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommand">
<request method="post">
<path>
<param type="string" name="instanceId" arg="$Path.instanceId" required="True"/>
<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>
<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="parameters" required="True" clientFlatten="True">
<prop type="string" name="commandId" arg="$parameters.commandId" required="True"/>
<prop type="array<object>" name="parameters" arg="$parameters.parameters" identifiers="name">
<item type="object">
<prop type="string" name="name" arg="$parameters.parameters[].name" required="True"/>
<prop type="string" name="value" arg="$parameters.parameters[].value" required="True"/>
</item>
</prop>
<prop type="array<string>" name="script" arg="$parameters.script">
<item type="string"/>
</prop>
</schema>
</json>
</body>
</request>
<response statusCode="200">
<body>
<json var="$Instance">
<schema type="object">
<prop type="array<object>" name="value">
<item type="object">
<prop type="string" name="code"/>
<prop type="string" name="displayStatus"/>
<prop type="string" name="level">
<enum>
<item value="&quot;Error&quot;"/>
<item value="&quot;Info&quot;"/>
<item value="&quot;Warning&quot;"/>
</enum>
</prop>
<prop type="string" name="message"/>
<prop type="dateTime" name="time">
<format protocol="iso"/>
</prop>
</item>
</prop>
</schema>
</json>
</body>
</response>
<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>
<output type="object" ref="$Instance" clientFlatten="True"/>
</command>
</commandGroup>
</CodeGen>
Loading