LabsOperations Class
LabsOperations 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.objectLabsOperations
Constructor
LabsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| begin_claim_any_vm |
Claim a random claimable virtual machine in the lab. This operation can take a while to complete. |
| begin_create_environment |
Create virtual machines in a lab. This operation can take a while to complete. |
| begin_create_or_update |
Create or replace an existing lab. This operation can take a while to complete. |
| begin_delete |
Delete lab. This operation can take a while to complete. |
| begin_export_resource_usage |
Exports the lab resource usage into a storage account This operation can take a while to complete. |
| begin_import_virtual_machine |
Import a virtual machine into a different lab. This operation can take a while to complete. |
| generate_upload_uri |
Generate a URI for uploading custom disk images to a Lab. |
| get |
Get lab. |
| list_by_resource_group |
List labs in a resource group. |
| list_by_subscription |
List labs in a subscription. |
| list_vhds |
List disk images available for custom image creation. |
| update |
Allows modifying tags of labs. All other properties will be ignored. |
begin_claim_any_vm
Claim a random claimable virtual machine in the lab. This operation can take a while to complete.
begin_claim_any_vm(resource_group_name: str, name: str, **kwargs: Any) -> LROPoller[None]
Parameters
- 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
True for ARMPolling, False for no polling, or a polling object for 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_create_environment
Create virtual machines in a lab. This operation can take a while to complete.
begin_create_environment(resource_group_name: str, name: str, lab_virtual_machine_creation_parameter: _models.LabVirtualMachineCreationParameter, **kwargs: Any) -> LROPoller[None]
Parameters
- lab_virtual_machine_creation_parameter
- LabVirtualMachineCreationParameter
Properties for creating a virtual machine.
- 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
True for ARMPolling, False for no polling, or a polling object for 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_create_or_update
Create or replace an existing lab. This operation can take a while to complete.
begin_create_or_update(resource_group_name: str, name: str, lab: _models.Lab, **kwargs: Any) -> LROPoller[_models.Lab]
Parameters
- 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
True for ARMPolling, False for no polling, or a polling object for 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 Lab or the result of cls(response)
Return type
Exceptions
begin_delete
Delete lab. This operation can take a while to complete.
begin_delete(resource_group_name: str, name: str, **kwargs: Any) -> LROPoller[None]
Parameters
- 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
True for ARMPolling, False for no polling, or a polling object for 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_export_resource_usage
Exports the lab resource usage into a storage account This operation can take a while to complete.
begin_export_resource_usage(resource_group_name: str, name: str, blob_storage_absolute_sas_uri: Optional[str] = None, usage_start_date: Optional[datetime.datetime] = None, **kwargs: Any) -> LROPoller[None]
Parameters
- blob_storage_absolute_sas_uri
- str
The blob storage absolute sas uri with write permission to the container which the usage data needs to be uploaded to.
- usage_start_date
- datetime
The start time of the usage. If not provided, usage will be reported since the beginning of data collection.
- 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
True for ARMPolling, False for no polling, or a polling object for 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_import_virtual_machine
Import a virtual machine into a different lab. This operation can take a while to complete.
begin_import_virtual_machine(resource_group_name: str, name: str, source_virtual_machine_resource_id: Optional[str] = None, destination_virtual_machine_name: Optional[str] = None, **kwargs: Any) -> LROPoller[None]
Parameters
- source_virtual_machine_resource_id
- str
The full resource ID of the virtual machine to be imported.
- destination_virtual_machine_name
- str
The name of the virtual machine in the destination lab.
- 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
True for ARMPolling, False for no polling, or a polling object for 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
generate_upload_uri
Generate a URI for uploading custom disk images to a Lab.
generate_upload_uri(resource_group_name: str, name: str, blob_name: Optional[str] = None, **kwargs: Any) -> _models.GenerateUploadUriResponse
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
GenerateUploadUriResponse, or the result of cls(response)
Return type
Exceptions
get
Get lab.
get(resource_group_name: str, name: str, expand: Optional[str] = None, **kwargs: Any) -> _models.Lab
Parameters
- expand
- str
Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
Lab, or the result of cls(response)
Return type
Exceptions
list_by_resource_group
List labs in a resource group.
list_by_resource_group(resource_group_name: str, expand: Optional[str] = None, filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any) -> Iterable[_models.LabList]
Parameters
- expand
- str
Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
- filter
- str
The filter to apply to the operation. Example: '$filter=contains(name,'myName').
- top
- int
The maximum number of resources to return from the operation. Example: '$top=10'.
- orderby
- str
The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either LabList or the result of cls(response)
Return type
Exceptions
list_by_subscription
List labs in a subscription.
list_by_subscription(expand: Optional[str] = None, filter: Optional[str] = None, top: Optional[int] = None, orderby: Optional[str] = None, **kwargs: Any) -> Iterable[_models.LabList]
Parameters
- expand
- str
Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'.
- filter
- str
The filter to apply to the operation. Example: '$filter=contains(name,'myName').
- top
- int
The maximum number of resources to return from the operation. Example: '$top=10'.
- orderby
- str
The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either LabList or the result of cls(response)
Return type
Exceptions
list_vhds
List disk images available for custom image creation.
list_vhds(resource_group_name: str, name: str, **kwargs: Any) -> Iterable[_models.LabVhdList]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either LabVhdList or the result of cls(response)
Return type
Exceptions
update
Allows modifying tags of labs. All other properties will be ignored.
update(resource_group_name: str, name: str, lab: _models.LabFragment, **kwargs: Any) -> _models.Lab
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
Lab, or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.devtestlabs.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\devtestlabs\\models\\__init__.py'>
Feedback
Submit and view feedback for