azure.batch.operations module

class azure.batch.operations.ApplicationOperations(client, config, serializer, deserializer)[source]

Bases: object

ApplicationOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
get(application_id, application_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified application.

Parameters:
  • application_id (str) – The id of the application.
  • application_get_options (ApplicationGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ApplicationSummary

Return type:

ClientRawResponse if raw=true

list(application_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the applications available in the specified account.

Parameters:
  • application_list_options (ApplicationListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ApplicationSummaryPaged

class azure.batch.operations.PoolOperations(client, config, serializer, deserializer)[source]

Bases: object

PoolOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
add(pool, pool_add_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a pool to the specified account.

Parameters:
  • pool (PoolAddParameter) – The pool to be added.
  • pool_add_options (PoolAddOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

delete(pool_id, pool_delete_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a pool from the specified account.

Parameters:
  • pool_id (str) – The id of the pool to delete.
  • pool_delete_options (PoolDeleteOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

disable_auto_scale(pool_id, pool_disable_auto_scale_options=None, custom_headers=None, raw=False, **operation_config)[source]

Disables automatic scaling for a pool.

Parameters:
  • pool_id (str) – The id of the pool on which to disable automatic scaling.
  • pool_disable_auto_scale_options (PoolDisableAutoScaleOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

enable_auto_scale(pool_id, pool_enable_auto_scale_options=None, auto_scale_formula=None, auto_scale_evaluation_interval=None, custom_headers=None, raw=False, **operation_config)[source]

Enables automatic scaling for a pool.

Parameters:
  • pool_id (str) – The id of the pool on which to enable automatic scaling.
  • pool_enable_auto_scale_options (PoolEnableAutoScaleOptions) – Additional parameters for the operation
  • auto_scale_formula (str) – The formula for the desired number of compute nodes in the pool.
  • auto_scale_evaluation_interval (timedelta) – A time interval for the desired autoscale evaluation period in the pool.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

evaluate_auto_scale(pool_id, auto_scale_formula, pool_evaluate_auto_scale_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets the result of evaluating an automatic scaling formula on the pool.

Parameters:
  • pool_id (str) – The id of the pool on which to evaluate the automatic scaling formula.
  • auto_scale_formula (str) – A formula for the desired number of compute nodes in the pool.
  • pool_evaluate_auto_scale_options (PoolEvaluateAutoScaleOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

AutoScaleRun

Return type:

ClientRawResponse if raw=true

exists(pool_id, pool_exists_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets basic properties of a pool.

Parameters:
  • pool_id (str) – The id of the pool to get.
  • pool_exists_options (PoolExistsOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

bool

Return type:

ClientRawResponse if raw=true

get(pool_id, pool_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified pool.

Parameters:
  • pool_id (str) – The id of the pool to get.
  • pool_get_options (PoolGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudPool

Return type:

ClientRawResponse if raw=true

get_all_pools_lifetime_statistics(pool_get_all_pools_lifetime_statistics_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets lifetime summary statistics for all of the pools in the specified account.

Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics.

Parameters:
  • pool_get_all_pools_lifetime_statistics_options (PoolGetAllPoolsLifetimeStatisticsOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PoolStatistics

Return type:

ClientRawResponse if raw=true

list(pool_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the pools in the specified account.

Parameters:
  • pool_list_options (PoolListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudPoolPaged

list_pool_usage_metrics(pool_list_pool_usage_metrics_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the usage metrics, aggregated by pool across individual time intervals, for the specified account.

Parameters:
  • pool_list_pool_usage_metrics_options (PoolListPoolUsageMetricsOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

PoolUsageMetricsPaged

patch(pool_id, pool_patch_parameter, pool_patch_options=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of a pool.

Parameters:
  • pool_id (str) – The id of the pool to update.
  • pool_patch_parameter (PoolPatchParameter) – The parameters for the request.
  • pool_patch_options (PoolPatchOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

remove_nodes(pool_id, node_remove_parameter, pool_remove_nodes_options=None, custom_headers=None, raw=False, **operation_config)[source]

Removes compute nodes from the specified pool.

Parameters:
  • pool_id (str) – The id of the pool from which you want to remove nodes.
  • node_remove_parameter (NodeRemoveParameter) – The parameters for the request.
  • pool_remove_nodes_options (PoolRemoveNodesOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

resize(pool_id, pool_resize_parameter, pool_resize_options=None, custom_headers=None, raw=False, **operation_config)[source]

Changes the number of compute nodes that are assigned to a pool.

Parameters:
  • pool_id (str) – The id of the pool to resize.
  • pool_resize_parameter (PoolResizeParameter) – The parameters for the request.
  • pool_resize_options (PoolResizeOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

stop_resize(pool_id, pool_stop_resize_options=None, custom_headers=None, raw=False, **operation_config)[source]

Stops an ongoing resize operation on the pool.

This does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state.

Parameters:
  • pool_id (str) – The id of the pool whose resizing you want to stop.
  • pool_stop_resize_options (PoolStopResizeOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

update_properties(pool_id, pool_update_properties_parameter, pool_update_properties_options=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of a pool.

Parameters:
  • pool_id (str) – The id of the pool to update.
  • pool_update_properties_parameter (PoolUpdatePropertiesParameter) – The parameters for the request.
  • pool_update_properties_options (PoolUpdatePropertiesOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

upgrade_os(pool_id, target_os_version, pool_upgrade_os_options=None, custom_headers=None, raw=False, **operation_config)[source]

Upgrades the operating system of the specified pool.

Parameters:
  • pool_id (str) – The id of the pool to upgrade.
  • target_os_version (str) – The Azure Guest OS version to be installed on the virtual machines in the pool.
  • pool_upgrade_os_options (PoolUpgradeOSOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

class azure.batch.operations.AccountOperations(client, config, serializer, deserializer)[source]

Bases: object

AccountOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
list_node_agent_skus(account_list_node_agent_skus_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all node agent SKUs supported by the Azure Batch service.

Parameters:
  • account_list_node_agent_skus_options (AccountListNodeAgentSkusOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

NodeAgentSkuPaged

class azure.batch.operations.JobOperations(client, config, serializer, deserializer)[source]

Bases: object

JobOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
add(job, job_add_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a job to the specified account.

Parameters:
  • job (JobAddParameter) – The job to be added.
  • job_add_options (JobAddOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

delete(job_id, job_delete_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a job.

Parameters:
  • job_id (str) – The id of the job to delete.
  • job_delete_options (JobDeleteOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

disable(job_id, disable_tasks, job_disable_options=None, custom_headers=None, raw=False, **operation_config)[source]

Disables the specified job, preventing new tasks from running.

Parameters:
  • job_id (str) – The id of the job to disable.
  • disable_tasks (str or DisableJobOption) – What to do with active tasks associated with the job. Possible values include: ‘requeue’, ‘terminate’, ‘wait’
  • job_disable_options (JobDisableOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

enable(job_id, job_enable_options=None, custom_headers=None, raw=False, **operation_config)[source]

Enables the specified job, allowing new tasks to run.

Parameters:
  • job_id (str) – The id of the job to enable.
  • job_enable_options (JobEnableOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

get(job_id, job_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified job.

Parameters:
  • job_id (str) – The id of the job.
  • job_get_options (JobGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudJob

Return type:

ClientRawResponse if raw=true

get_all_jobs_lifetime_statistics(job_get_all_jobs_lifetime_statistics_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets lifetime summary statistics for all of the jobs in the specified account.

Statistics are aggregated across all jobs that have ever existed in the account, from account creation to the last update time of the statistics.

Parameters:
  • job_get_all_jobs_lifetime_statistics_options (JobGetAllJobsLifetimeStatisticsOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

JobStatistics

Return type:

ClientRawResponse if raw=true

list(job_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the jobs in the specified account.

Parameters:
  • job_list_options (JobListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudJobPaged

list_from_job_schedule(job_schedule_id, job_list_from_job_schedule_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the jobs that have been created under the specified job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule from which you want to get a list of jobs.
  • job_list_from_job_schedule_options (JobListFromJobScheduleOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudJobPaged

list_preparation_and_release_task_status(job_id, job_list_preparation_and_release_task_status_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run.

Parameters:
  • job_id (str) – The id of the job.
  • job_list_preparation_and_release_task_status_options (JobListPreparationAndReleaseTaskStatusOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

JobPreparationAndReleaseTaskExecutionInformationPaged

patch(job_id, job_patch_parameter, job_patch_options=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of a job.

Parameters:
  • job_id (str) – The id of the job whose properties you want to update.
  • job_patch_parameter (JobPatchParameter) – The parameters for the request.
  • job_patch_options (JobPatchOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

terminate(job_id, job_terminate_options=None, terminate_reason=None, custom_headers=None, raw=False, **operation_config)[source]

Terminates the specified job, marking it as completed.

Parameters:
  • job_id (str) – The id of the job to terminate.
  • job_terminate_options (JobTerminateOptions) – Additional parameters for the operation
  • terminate_reason (str) – The text you want to appear as the job’s TerminateReason. The default is ‘UserTerminate’.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

update(job_id, job_update_parameter, job_update_options=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of a job.

Parameters:
  • job_id (str) – The id of the job whose properties you want to update.
  • job_update_parameter (JobUpdateParameter) – The parameters for the request.
  • job_update_options (JobUpdateOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

class azure.batch.operations.CertificateOperations(client, config, serializer, deserializer)[source]

Bases: object

CertificateOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
add(certificate, certificate_add_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a certificate to the specified account.

Parameters:
  • certificate (CertificateAddParameter) – The certificate to be added.
  • certificate_add_options (CertificateAddOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

cancel_deletion(thumbprint_algorithm, thumbprint, certificate_cancel_deletion_options=None, custom_headers=None, raw=False, **operation_config)[source]

Cancels a failed deletion of a certificate from the specified account.

Parameters:
  • thumbprint_algorithm (str) – The algorithm used to derive the thumbprint parameter. This must be sha1.
  • thumbprint (str) – The thumbprint of the certificate being deleted.
  • certificate_cancel_deletion_options (CertificateCancelDeletionOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

delete(thumbprint_algorithm, thumbprint, certificate_delete_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a certificate from the specified account.

Parameters:
  • thumbprint_algorithm (str) – The algorithm used to derive the thumbprint parameter. This must be sha1.
  • thumbprint (str) – The thumbprint of the certificate to be deleted.
  • certificate_delete_options (CertificateDeleteOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

get(thumbprint_algorithm, thumbprint, certificate_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified certificate.

Parameters:
  • thumbprint_algorithm (str) – The algorithm used to derive the thumbprint parameter. This must be sha1.
  • thumbprint (str) – The thumbprint of the certificate to get.
  • certificate_get_options (CertificateGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

Certificate

Return type:

ClientRawResponse if raw=true

list(certificate_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the certificates that have been added to the specified account.

Parameters:
  • certificate_list_options (CertificateListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CertificatePaged

class azure.batch.operations.FileOperations(client, config, serializer, deserializer)[source]

Bases: object

FileOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
delete_from_compute_node(pool_id, node_id, file_name, recursive=None, file_delete_from_compute_node_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes the specified task file from the compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node from which you want to delete the file.
  • file_name (str) – The path to the file that you want to delete.
  • recursive (bool) – Whether to delete children of a directory. If the fileName parameter represents a directory instead of a file, you can set Recursive to true to delete the directory and all of the files and subdirectories in it. If Recursive is false then the directory must be empty or deletion will fail.
  • file_delete_from_compute_node_options (FileDeleteFromComputeNodeOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

delete_from_task(job_id, task_id, file_name, recursive=None, file_delete_from_task_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes the specified task file from the compute node where the task ran.

Parameters:
  • job_id (str) – The id of the job that contains the task.
  • task_id (str) – The id of the task whose file you want to delete.
  • file_name (str) – The path to the task file that you want to delete.
  • recursive (bool) – Whether to delete children of a directory. If the fileName parameter represents a directory instead of a file, you can set Recursive to true to delete the directory and all of the files and subdirectories in it. If Recursive is false then the directory must be empty or deletion will fail.
  • file_delete_from_task_options (FileDeleteFromTaskOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

get_from_compute_node(pool_id, node_id, file_name, file_get_from_compute_node_options=None, custom_headers=None, raw=False, callback=None, **operation_config)[source]

Returns the content of the specified task file.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node that contains the file.
  • file_name (str) – The path to the task file that you want to get the content of.
  • file_get_from_compute_node_options (FileGetFromComputeNodeOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • callback (Callable[Bytes, 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_configOperation configuration overrides.
Return type:

Generator

Return type:

ClientRawResponse if raw=true

get_from_task(job_id, task_id, file_name, file_get_from_task_options=None, custom_headers=None, raw=False, callback=None, **operation_config)[source]

Returns the content of the specified task file.

Parameters:
  • job_id (str) – The id of the job that contains the task.
  • task_id (str) – The id of the task whose file you want to retrieve.
  • file_name (str) – The path to the task file that you want to get the content of.
  • file_get_from_task_options (FileGetFromTaskOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • callback (Callable[Bytes, 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_configOperation configuration overrides.
Return type:

Generator

Return type:

ClientRawResponse if raw=true

get_node_file_properties_from_compute_node(pool_id, node_id, file_name, file_get_node_file_properties_from_compute_node_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets the properties of the specified compute node file.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node that contains the file.
  • file_name (str) – The path to the compute node file that you want to get the properties of.
  • file_get_node_file_properties_from_compute_node_options (FileGetNodeFilePropertiesFromComputeNodeOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

get_node_file_properties_from_task(job_id, task_id, file_name, file_get_node_file_properties_from_task_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets the properties of the specified task file.

Parameters:
  • job_id (str) – The id of the job that contains the task.
  • task_id (str) – The id of the task whose file you want to get the properties of.
  • file_name (str) – The path to the task file that you want to get the properties of.
  • file_get_node_file_properties_from_task_options (FileGetNodeFilePropertiesFromTaskOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

list_from_compute_node(pool_id, node_id, recursive=None, file_list_from_compute_node_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the files in task directories on the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node whose files you want to list.
  • recursive (bool) – Whether to list children of a directory.
  • file_list_from_compute_node_options (FileListFromComputeNodeOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

NodeFilePaged

list_from_task(job_id, task_id, recursive=None, file_list_from_task_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the files in a task’s directory on its compute node.

Parameters:
  • job_id (str) – The id of the job that contains the task.
  • task_id (str) – The id of the task whose files you want to list.
  • recursive (bool) – Whether to list children of a directory.
  • file_list_from_task_options (FileListFromTaskOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

NodeFilePaged

class azure.batch.operations.JobScheduleOperations(client, config, serializer, deserializer)[source]

Bases: object

JobScheduleOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
add(cloud_job_schedule, job_schedule_add_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a job schedule to the specified account.

Parameters:
  • cloud_job_schedule (JobScheduleAddParameter) – The job schedule to be added.
  • job_schedule_add_options (JobScheduleAddOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

delete(job_schedule_id, job_schedule_delete_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a job schedule from the specified account.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to delete.
  • job_schedule_delete_options (JobScheduleDeleteOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

disable(job_schedule_id, job_schedule_disable_options=None, custom_headers=None, raw=False, **operation_config)[source]

Disables a job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to disable.
  • job_schedule_disable_options (JobScheduleDisableOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

enable(job_schedule_id, job_schedule_enable_options=None, custom_headers=None, raw=False, **operation_config)[source]

Enables a job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to enable.
  • job_schedule_enable_options (JobScheduleEnableOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

exists(job_schedule_id, job_schedule_exists_options=None, custom_headers=None, raw=False, **operation_config)[source]

Checks the specified job schedule exists.

Parameters:
  • job_schedule_id (str) – The id of the job schedule which you want to check.
  • job_schedule_exists_options (JobScheduleExistsOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

bool

Return type:

ClientRawResponse if raw=true

get(job_schedule_id, job_schedule_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to get.
  • job_schedule_get_options (JobScheduleGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudJobSchedule

Return type:

ClientRawResponse if raw=true

list(job_schedule_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the job schedules in the specified account.

Parameters:
  • job_schedule_list_options (JobScheduleListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudJobSchedulePaged

patch(job_schedule_id, job_schedule_patch_parameter, job_schedule_patch_options=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of the specified job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to update.
  • job_schedule_patch_parameter (JobSchedulePatchParameter) – The parameters for the request.
  • job_schedule_patch_options (JobSchedulePatchOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

terminate(job_schedule_id, job_schedule_terminate_options=None, custom_headers=None, raw=False, **operation_config)[source]

Terminates a job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to terminates.
  • job_schedule_terminate_options (JobScheduleTerminateOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

update(job_schedule_id, job_schedule_update_parameter, job_schedule_update_options=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of the specified job schedule.

Parameters:
  • job_schedule_id (str) – The id of the job schedule to update.
  • job_schedule_update_parameter (JobScheduleUpdateParameter) – The parameters for the request.
  • job_schedule_update_options (JobScheduleUpdateOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

class azure.batch.operations.TaskOperations(client, config, serializer, deserializer)[source]

Bases: object

TaskOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
add(job_id, task, task_add_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a task to the specified job.

Parameters:
  • job_id (str) – The id of the job to which the task is to be added.
  • task (TaskAddParameter) – The task to be added.
  • task_add_options (TaskAddOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

add_collection(job_id, value, task_add_collection_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a collection of tasks to the specified job.

Parameters:
  • job_id (str) – The id of the job to which the task collection is to be added.
  • value (list of TaskAddParameter) – The collection of tasks to add.
  • task_add_collection_options (TaskAddCollectionOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

TaskAddCollectionResult

Return type:

ClientRawResponse if raw=true

delete(job_id, task_id, task_delete_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a task from the specified job.

Parameters:
  • job_id (str) – The id of the job from which to delete the task.
  • task_id (str) – The id of the task to delete.
  • task_delete_options (TaskDeleteOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

get(job_id, task_id, task_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified task.

Parameters:
  • job_id (str) – The id of the job that contains the task.
  • task_id (str) – The id of the task to get information about.
  • task_get_options (TaskGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudTask

Return type:

ClientRawResponse if raw=true

list(job_id, task_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the tasks that are associated with the specified job.

Parameters:
  • job_id (str) – The id of the job.
  • task_list_options (TaskListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudTaskPaged

list_subtasks(job_id, task_id, task_list_subtasks_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the subtasks that are associated with the specified multi-instance task.

Parameters:
  • job_id (str) – The id of the job.
  • task_id (str) – The id of the task.
  • task_list_subtasks_options (TaskListSubtasksOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CloudTaskListSubtasksResult

Return type:

ClientRawResponse if raw=true

terminate(job_id, task_id, task_terminate_options=None, custom_headers=None, raw=False, **operation_config)[source]

Terminates the specified task.

Parameters:
  • job_id (str) – The id of the job containing the task.
  • task_id (str) – The id of the task to terminate.
  • task_terminate_options (TaskTerminateOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

update(job_id, task_id, task_update_options=None, constraints=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of the specified task.

Parameters:
  • job_id (str) – The id of the job containing the task.
  • task_id (str) – The id of the task to update.
  • task_update_options (TaskUpdateOptions) – Additional parameters for the operation
  • constraints (TaskConstraints) – Constraints that apply to this task. If omitted, the task is given the default constraints.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

class azure.batch.operations.ComputeNodeOperations(client, config, serializer, deserializer)[source]

Bases: object

ComputeNodeOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
add_user(pool_id, node_id, user, compute_node_add_user_options=None, custom_headers=None, raw=False, **operation_config)[source]

Adds a user account to the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the machine on which you want to create a user account.
  • user (ComputeNodeUser) – The user account to be created.
  • compute_node_add_user_options (ComputeNodeAddUserOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

delete_user(pool_id, node_id, user_name, compute_node_delete_user_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a user account from the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the machine on which you want to delete a user account.
  • user_name (str) – The name of the user account to delete.
  • compute_node_delete_user_options (ComputeNodeDeleteUserOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

disable_scheduling(pool_id, node_id, compute_node_disable_scheduling_options=None, node_disable_scheduling_option=None, custom_headers=None, raw=False, **operation_config)[source]

Disables task scheduling on the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node on which you want to disable task scheduling.
  • compute_node_disable_scheduling_options (ComputeNodeDisableSchedulingOptions) – Additional parameters for the operation
  • node_disable_scheduling_option (str or DisableComputeNodeSchedulingOption) – What to do with currently running tasks when disable task scheduling on the compute node. The default value is requeue. Possible values include: ‘requeue’, ‘terminate’, ‘taskcompletion’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

enable_scheduling(pool_id, node_id, compute_node_enable_scheduling_options=None, custom_headers=None, raw=False, **operation_config)[source]

Enables task scheduling on the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node on which you want to enable task scheduling.
  • compute_node_enable_scheduling_options (ComputeNodeEnableSchedulingOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

get(pool_id, node_id, compute_node_get_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node that you want to get information about.
  • compute_node_get_options (ComputeNodeGetOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ComputeNode

Return type:

ClientRawResponse if raw=true

get_remote_desktop(pool_id, node_id, compute_node_get_remote_desktop_options=None, custom_headers=None, raw=False, callback=None, **operation_config)[source]

Gets the Remote Desktop Protocol file for the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • 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
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • callback (Callable[Bytes, 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_configOperation configuration overrides.
Return type:

Generator

Return type:

ClientRawResponse if raw=true

get_remote_login_settings(pool_id, node_id, compute_node_get_remote_login_settings_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets the settings required for remote login to a compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node for which to obtain the remote login settings.
  • compute_node_get_remote_login_settings_options (ComputeNodeGetRemoteLoginSettingsOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ComputeNodeGetRemoteLoginSettingsResult

Return type:

ClientRawResponse if raw=true

list(pool_id, compute_node_list_options=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the compute nodes in the specified pool.

Parameters:
  • pool_id (str) – The id of the pool from which you want to list nodes.
  • compute_node_list_options (ComputeNodeListOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ComputeNodePaged

reboot(pool_id, node_id, compute_node_reboot_options=None, node_reboot_option=None, custom_headers=None, raw=False, **operation_config)[source]

Restarts the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node that you want to restart.
  • compute_node_reboot_options (ComputeNodeRebootOptions) – Additional parameters for the operation
  • node_reboot_option (str or ComputeNodeRebootOption) – When to reboot the compute node and what to do with currently running tasks. The default value is requeue. Possible values include: ‘requeue’, ‘terminate’, ‘taskcompletion’, ‘retaineddata’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

reimage(pool_id, node_id, compute_node_reimage_options=None, node_reimage_option=None, custom_headers=None, raw=False, **operation_config)[source]

Reinstalls the operating system on the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the compute node that you want to restart.
  • compute_node_reimage_options (ComputeNodeReimageOptions) – Additional parameters for the operation
  • node_reimage_option (str or ComputeNodeReimageOption) – When to reimage the compute node and what to do with currently running tasks. The default value is requeue. Possible values include: ‘requeue’, ‘terminate’, ‘taskcompletion’, ‘retaineddata’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

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)[source]

Updates the password or expiration time of a user account on the specified compute node.

Parameters:
  • pool_id (str) – The id of the pool that contains the compute node.
  • node_id (str) – The id of the machine on which you want to update a user account.
  • user_name (str) – The name of the user account to update.
  • node_update_user_parameter (NodeUpdateUserParameter) – The parameters for the request.
  • compute_node_update_user_options (ComputeNodeUpdateUserOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true