VirtualMachineRunCommandsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:virtual_machine_run_commands> attribute.
- Inheritance
-
builtins.objectVirtualMachineRunCommandsOperations
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.
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) -> LROPoller[_models.VirtualMachineRunCommand]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_name
Required
|
The name of the virtual machine where the run command should be created or updated. Required. |
run_command_name
Required
|
The name of the virtual machine run command. Required. |
run_command
Required
|
Parameters supplied to the Create Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommand type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete
The operation to delete the run command.
begin_delete(resource_group_name: str, vm_name: str, run_command_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_name
Required
|
The name of the virtual machine where the run command should be deleted. Required. |
run_command_name
Required
|
The name of the virtual machine run command. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update
The operation to update the run command.
begin_update(resource_group_name: str, vm_name: str, run_command_name: str, run_command: _models.VirtualMachineRunCommandUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.VirtualMachineRunCommand]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_name
Required
|
The name of the virtual machine where the run command should be updated. Required. |
run_command_name
Required
|
The name of the virtual machine run command. Required. |
run_command
Required
|
Parameters supplied to the Update Virtual Machine RunCommand operation. Is either a VirtualMachineRunCommandUpdate type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets specific run command for a subscription in a location.
get(location: str, command_id: str, **kwargs: Any) -> RunCommandDocument
Parameters
Name | Description |
---|---|
location
Required
|
The location upon which run commands is queried. Required. |
command_id
Required
|
The command id. Required. |
Returns
Type | Description |
---|---|
RunCommandDocument or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_by_virtual_machine
The operation to get the run command.
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. Required. |
vm_name
Required
|
The name of the virtual machine containing the run command. Required. |
run_command_name
Required
|
The name of the virtual machine run command. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
expand
|
The expand expression to apply on the operation. Default value is None. |
Returns
Type | Description |
---|---|
VirtualMachineRunCommand or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Lists all available run commands for a subscription in a location.
list(location: str, **kwargs: Any) -> Iterable[RunCommandDocumentBase]
Parameters
Name | Description |
---|---|
location
Required
|
The location upon which run commands is queried. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either RunCommandDocumentBase or the result of cls(response) |
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) -> Iterable[VirtualMachineRunCommand]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
vm_name
Required
|
The name of the virtual machine containing the run command. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
expand
|
The expand expression to apply on the operation. Default value is None. |
Returns
Type | Description |
---|---|
An iterator like instance of either VirtualMachineRunCommand or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.compute.v2024_03_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2024_03_01\\models\\__init__.py'>
Azure SDK for Python