VirtualMachineRunCommandsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:virtual_machine_run_commands> attribute.
Constructor
VirtualMachineRunCommandsOperations(*args, **kwargs)
Methods
| begin_create_or_update |
The operation to create or update the run command. |
| begin_delete |
The operation to delete the run command. |
| begin_update |
The operation to update the run command. |
| get |
Gets specific run command for a subscription in a location. |
| get_by_virtual_machine |
The operation to get the run command. |
| list |
Lists all available run commands for a subscription in a location. |
| list_by_virtual_machine |
The operation to get all run commands of a Virtual Machine. |
begin_create_or_update
The operation to create or update the run command.
async begin_create_or_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommand, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.VirtualMachineRunCommand]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
vm_name
Required
|
The name of the VirtualMachine. Required. |
|
run_command_name
Required
|
The name of the VirtualMachineRunCommand. Required. |
|
run_command
Required
|
Parameters supplied to the Create Virtual Machine RunCommand operation. Is one of the following types: VirtualMachineRunCommand, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
An instance of AsyncLROPoller that returns VirtualMachineRunCommand. The VirtualMachineRunCommand is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
begin_delete
The operation to delete the run command.
async begin_delete(resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any) -> AsyncLROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
vm_name
Required
|
The name of the VirtualMachine. Required. |
|
run_command_name
Required
|
The name of the VirtualMachineRunCommand. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of AsyncLROPoller that returns None |
Exceptions
| Type | Description |
|---|---|
begin_update
The operation to update the run command.
async begin_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommandUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.VirtualMachineRunCommand]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
vm_name
Required
|
The name of the VirtualMachine. Required. |
|
run_command_name
Required
|
The name of the VirtualMachineRunCommand. Required. |
|
run_command
Required
|
Parameters supplied to the Update Virtual Machine RunCommand operation. Is one of the following types: VirtualMachineRunCommandUpdate, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
An instance of AsyncLROPoller that returns VirtualMachineRunCommand. The VirtualMachineRunCommand is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get
Gets specific run command for a subscription in a location.
async get(location: str, command_id: str, **kwargs: Any) -> RunCommandDocument
Parameters
| Name | Description |
|---|---|
|
location
Required
|
The name of the Azure region. Required. |
|
command_id
Required
|
Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands. Required. |
Returns
| Type | Description |
|---|---|
|
RunCommandDocument. The RunCommandDocument is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_by_virtual_machine
The operation to get the run command.
async get_by_virtual_machine(resource_group_name: str, vm_name: str, run_command_name: str, *, expand: str | None = None, **kwargs: Any) -> VirtualMachineRunCommand
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
vm_name
Required
|
The name of the VirtualMachine. Required. |
|
run_command_name
Required
|
The name of the VirtualMachineRunCommand. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
expand
|
The expand expression to apply on the operation. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
VirtualMachineRunCommand. The VirtualMachineRunCommand is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list
Lists all available run commands for a subscription in a location.
list(location: str, **kwargs: Any) -> AsyncItemPaged[RunCommandDocumentBase]
Parameters
| Name | Description |
|---|---|
|
location
Required
|
The location name. Required. |
Returns
| Type | Description |
|---|---|
|
An iterator like instance of RunCommandDocumentBase |
Exceptions
| Type | Description |
|---|---|
list_by_virtual_machine
The operation to get all run commands of a Virtual Machine.
list_by_virtual_machine(resource_group_name: str, vm_name: str, *, expand: str | None = None, **kwargs: Any) -> AsyncItemPaged[VirtualMachineRunCommand]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
vm_name
Required
|
The name of the VirtualMachine. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
expand
|
The expand expression to apply on the operation. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of VirtualMachineRunCommand |
Exceptions
| Type | Description |
|---|---|