ComputeNodeOperations Class
ComputeNodeOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Inheritance
-
builtins.objectComputeNodeOperations
Constructor
ComputeNodeOperations(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
- api_version
The API version to use for the request. Constant value: "2022-01-01.15.0".
Methods
| add_user |
Adds a user Account to the specified Compute Node. You can add a user Account to a Compute Node only when it is in the idle or running state. |
| delete_user |
Deletes a user Account from the specified Compute Node. You can delete a user Account to a Compute Node only when it is in the idle or running state. |
| disable_scheduling |
Disables Task scheduling on the specified Compute Node. You can disable Task scheduling on a Compute Node only if its current scheduling state is enabled. |
| enable_scheduling |
Enables Task scheduling on the specified Compute Node. You can enable Task scheduling on a Compute Node only if its current scheduling state is disabled. |
| get |
Gets information about the specified Compute Node. |
| get_remote_desktop |
Gets the Remote Desktop Protocol file for the specified Compute Node. Before you can access a Compute Node by using the RDP file, you must create a user Account on the Compute Node. This API can only be invoked on Pools created with a cloud service configuration. For Pools created with a virtual machine configuration, see the GetRemoteLoginSettings API. |
| get_remote_login_settings |
Gets the settings required for remote login to a Compute Node. Before you can remotely login to a Compute Node using the remote login settings, you must create a user Account on the Compute Node. This API can be invoked only on Pools created with the virtual machine configuration property. For Pools created with a cloud service configuration, see the GetRemoteDesktop API. |
| list |
Lists the Compute Nodes in the specified Pool. |
| reboot |
Restarts the specified Compute Node. You can restart a Compute Node only if it is in an idle or running state. |
| reimage |
Reinstalls the operating system on the specified Compute Node. You can reinstall the operating system on a Compute Node only if it is in an idle or running state. This API can be invoked only on Pools created with the cloud service configuration property. |
| update_user |
Updates the password and expiration time of a user Account on the specified Compute Node. This operation replaces of all the updatable properties of the Account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user Account on a Compute Node only when it is in the idle or running state. |
| upload_batch_service_logs |
Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage. This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Batch service. |
add_user
Adds a user Account to the specified Compute Node.
You can add a user Account to a Compute Node only when it is in the idle or running state.
add_user(pool_id, node_id, user, compute_node_add_user_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_add_user_options
- ComputeNodeAddUserOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
delete_user
Deletes a user Account from the specified Compute Node.
You can delete a user Account to a Compute Node only when it is in the idle or running state.
delete_user(pool_id, node_id, user_name, compute_node_delete_user_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_delete_user_options
- ComputeNodeDeleteUserOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
disable_scheduling
Disables Task scheduling on the specified Compute Node.
You can disable Task scheduling on a Compute Node only if its current scheduling state is enabled.
disable_scheduling(pool_id, node_id, node_disable_scheduling_option=None, compute_node_disable_scheduling_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- node_disable_scheduling_option
- str or DisableComputeNodeSchedulingOption
The default value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion'
- compute_node_disable_scheduling_options
- ComputeNodeDisableSchedulingOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
enable_scheduling
Enables Task scheduling on the specified Compute Node.
You can enable Task scheduling on a Compute Node only if its current scheduling state is disabled.
enable_scheduling(pool_id, node_id, compute_node_enable_scheduling_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_enable_scheduling_options
- ComputeNodeEnableSchedulingOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
get
Gets information about the specified Compute Node.
get(pool_id, node_id, compute_node_get_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_get_options
- ComputeNodeGetOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
ComputeNode or ClientRawResponse if raw=true
Return type
Exceptions
get_remote_desktop
Gets the Remote Desktop Protocol file for the specified Compute Node.
Before you can access a Compute Node by using the RDP file, you must create a user Account on the Compute Node. This API can only be invoked on Pools created with a cloud service configuration. For Pools created with a virtual machine configuration, see the GetRemoteLoginSettings API.
get_remote_desktop(pool_id, node_id, compute_node_get_remote_desktop_options=None, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- node_id
- str
The ID of the Compute Node for which you want to get the Remote Desktop Protocol file.
- compute_node_get_remote_desktop_options
- ComputeNodeGetRemoteDesktopOptions
Additional parameters for the operation
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
object or ClientRawResponse if raw=true
Return type
Exceptions
get_remote_login_settings
Gets the settings required for remote login to a Compute Node.
Before you can remotely login to a Compute Node using the remote login settings, you must create a user Account on the Compute Node. This API can be invoked only on Pools created with the virtual machine configuration property. For Pools created with a cloud service configuration, see the GetRemoteDesktop API.
get_remote_login_settings(pool_id, node_id, compute_node_get_remote_login_settings_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_get_remote_login_settings_options
- ComputeNodeGetRemoteLoginSettingsOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
ComputeNodeGetRemoteLoginSettingsResult or ClientRawResponse if raw=true
Return type
Exceptions
list
Lists the Compute Nodes in the specified Pool.
list(pool_id, compute_node_list_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_list_options
- ComputeNodeListOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
An iterator like instance of ComputeNode
Return type
Exceptions
reboot
Restarts the specified Compute Node.
You can restart a Compute Node only if it is in an idle or running state.
reboot(pool_id, node_id, node_reboot_option=None, compute_node_reboot_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- node_reboot_option
- str or ComputeNodeRebootOption
The default value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', 'retainedData'
- compute_node_reboot_options
- ComputeNodeRebootOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
reimage
Reinstalls the operating system on the specified Compute Node.
You can reinstall the operating system on a Compute Node only if it is in an idle or running state. This API can be invoked only on Pools created with the cloud service configuration property.
reimage(pool_id, node_id, node_reimage_option=None, compute_node_reimage_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- node_reimage_option
- str or ComputeNodeReimageOption
The default value is requeue. Possible values include: 'requeue', 'terminate', 'taskCompletion', 'retainedData'
- compute_node_reimage_options
- ComputeNodeReimageOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
update_user
Updates the password and expiration time of a user Account on the specified Compute Node.
This operation replaces of all the updatable properties of the Account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user Account on a Compute Node only when it is in the idle or running state.
update_user(pool_id, node_id, user_name, node_update_user_parameter, compute_node_update_user_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- compute_node_update_user_options
- ComputeNodeUpdateUserOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
upload_batch_service_logs
Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage.
This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Batch service.
upload_batch_service_logs(pool_id, node_id, upload_batch_service_logs_configuration, compute_node_upload_batch_service_logs_options=None, custom_headers=None, raw=False, **operation_config)
Parameters
- node_id
- str
The ID of the Compute Node from which you want to upload the Azure Batch service log files.
- upload_batch_service_logs_configuration
- UploadBatchServiceLogsConfiguration
The Azure Batch service log files upload configuration.
- compute_node_upload_batch_service_logs_options
- ComputeNodeUploadBatchServiceLogsOptions
Additional parameters for the operation
- operation_config
Operation configuration overrides.
Returns
UploadBatchServiceLogsResult or ClientRawResponse if raw=true
Return type
Exceptions
Attributes
models
models = <module 'azure.batch.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\batch\\models\\__init__.py'>
Feedback
Submit and view feedback for