VirtualMachineRunCommandsOperations Class

VirtualMachineRunCommandsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
VirtualMachineRunCommandsOperations

Constructor

VirtualMachineRunCommandsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

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, **kwargs: Any) -> LROPoller[_models.VirtualMachineRunCommand]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_name
str
Required

The name of the virtual machine where the run command should be created or updated.

run_command_name
str
Required

The name of the virtual machine run command.

run_command
VirtualMachineRunCommand
Required

Parameters supplied to the Create Virtual Machine RunCommand operation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type

Exceptions

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

resource_group_name
str
Required

The name of the resource group.

vm_name
str
Required

The name of the virtual machine where the run command should be deleted.

run_command_name
str
Required

The name of the virtual machine run command.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

Exceptions

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, **kwargs: Any) -> LROPoller[_models.VirtualMachineRunCommand]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_name
str
Required

The name of the virtual machine where the run command should be updated.

run_command_name
str
Required

The name of the virtual machine run command.

run_command
VirtualMachineRunCommandUpdate
Required

Parameters supplied to the Update Virtual Machine RunCommand operation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either VirtualMachineRunCommand or the result of cls(response)

Return type

Exceptions

get

Gets specific run command for a subscription in a location.

get(location: str, command_id: str, **kwargs: Any) -> _models.RunCommandDocument

Parameters

location
str
Required

The location upon which run commands is queried.

command_id
str
Required

The command id.

cls
callable

A custom type or function that will be passed the direct response

Returns

RunCommandDocument, or the result of cls(response)

Return type

Exceptions

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: Optional[str] = None, **kwargs: Any) -> _models.VirtualMachineRunCommand

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_name
str
Required

The name of the virtual machine containing the run command.

run_command_name
str
Required

The name of the virtual machine run command.

expand
str
default value: None

The expand expression to apply on the operation.

cls
callable

A custom type or function that will be passed the direct response

Returns

VirtualMachineRunCommand, or the result of cls(response)

Return type

Exceptions

list

Lists all available run commands for a subscription in a location.

list(location: str, **kwargs: Any) -> Iterable[_models.RunCommandListResult]

Parameters

location
str
Required

The location upon which run commands is queried.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either RunCommandListResult or the result of cls(response)

Return type

Exceptions

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: Optional[str] = None, **kwargs: Any) -> Iterable[_models.VirtualMachineRunCommandsListResult]

Parameters

resource_group_name
str
Required

The name of the resource group.

vm_name
str
Required

The name of the virtual machine containing the run command.

expand
str
default value: None

The expand expression to apply on the operation.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either VirtualMachineRunCommandsListResult or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.compute.v2021_04_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2021_04_01\\models\\__init__.py'>