BatchClient Class
BatchClient.
Constructor
BatchClient(endpoint: str, credential: AzureNamedKeyCredential | TokenCredential, **kwargs)
Parameters
| Name | Description |
|---|---|
|
endpoint
Required
|
HTTP or HTTPS endpoint for the Web PubSub service instance. |
|
hub
Required
|
Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. |
|
credentials
Required
|
Credential needed for the client to connect to Azure. |
|
credential
Required
|
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. |
Methods
| begin_deallocate_node |
Deallocates a Compute Node with Long Running Operation support. You can deallocate a Compute Node only if it is in an idle or running state. |
| begin_delete_job |
Deletes a Job with Long Running Operation support. Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task data; that is, if the Job contains Tasks which are still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and all their contents. When a Delete Job request is received, the Batch service sets the Job to the deleting state. All update operations on a Job that is in deleting state will fail with status code 409 (Conflict), with additional information indicating that the Job is being deleted. |
| begin_delete_job_schedule |
Deletes a Job Schedule with Long Running Operation support. When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When Tasks are deleted, all the files in their working directories on the Compute Nodes are also deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible once the Job Schedule is deleted, though they are still counted towards Account lifetime statistics. |
| begin_delete_pool |
Deletes a Pool from specified Account with Long Running Operation support. When you request that a Pool be deleted, the following actions occur: the Pool state is set to deleting; any ongoing resize operation on the Pool are stopped; the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks running on existing Compute Nodes are terminated and requeued (as if a resize Pool operation had been requested with the default requeue option); finally, the Pool is removed from the system. Because running Tasks are requeued, the user can rerun these Tasks by updating their Job to target a different Pool. The Tasks can then run on the new Pool. If you want to override the requeue behavior, then you should call resize Pool explicitly to shrink the Pool to zero size before deleting the Pool. If you call an Update, Patch or Delete API on a Pool in the deleting state, it will fail with HTTP status code 409 with error code PoolBeingDeleted. |
| begin_disable_job |
Disables a Job with Long Running Operation support. The Batch Service immediately moves the Job to the disabling state. Batch then uses the disableTasks parameter to determine what to do with the currently running Tasks of the Job. The Job remains in the disabling state until the disable operation is completed and all Tasks have been dealt with according to the disableTasks option; the Job then moves to the disabled state. No new Tasks are started under the Job until it moves back to active state. If you try to disable a Job that is in any state other than active, disabling, or disabled, the request fails with status code 409. |
| begin_enable_job |
Enables a Job with Long Running Operation support. When you call this API, the Batch service sets a disabled Job to the enabling state. After the this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run. |
| begin_reboot_node |
Reboots a Compute Node with Long Running Operation support. You can restart a Compute Node only if it is in an idle or running state. |
| begin_reimage_node |
Reimages a Compute Node with Long Running Operation support. 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. |
| begin_remove_nodes |
Removes Compute Nodes from a Pool with Long Running Operation support. This operation can only run when the allocation state of the Pool is steady. When this operation runs, the allocation state changes from steady to resizing. Each request may remove up to 100 nodes. |
| begin_resize_pool |
Resizes a Pool with Long Running Operation support. You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, the request fails with status code 409. When you resize a Pool, the Pool's allocation state changes from steady to resizing. You cannot resize Pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute Nodes, use the Pool remove Compute Nodes API instead. |
| begin_start_node |
Starts a Compute Node with Long Running Operation support. You can start a Compute Node only if it has been deallocated. |
| begin_stop_pool_resize |
Stops an ongoing Pool resize operation with Long Running Operation support. 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. After stopping, the Pool stabilizes at the number of Compute Nodes it was at when the stop operation was done. During the stop operation, the Pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize Pool request; this API can also be used to halt the initial sizing of the Pool when it is created. |
| begin_terminate_job |
Terminates a Job with Long Running Operation support, marking it as completed. When a Terminate Job request is received, the Batch service sets the Job to the terminating state. The Batch service then terminates any running Tasks associated with the Job and runs any required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks in the Job in the active state, they will remain in the active state. Once a Job is terminated, new Tasks cannot be added and any remaining active Tasks will not be scheduled. |
| begin_terminate_job_schedule |
Terminates a Job Schedule with Long Running Operation support. |
| close | |
| create_job |
Creates a Job to the specified Account. The Batch service supports two ways to control the work done as part of a Job. In the first approach, the user specifies a Job Manager Task. The Batch service launches this Task when it is ready to start the Job. The Job Manager Task controls all other Tasks that run under this Job, by using the Task APIs. In the second approach, the user directly controls the execution of Tasks under an active Job, by using the Task APIs. Also note: when naming Jobs, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers. |
| create_job_schedule |
Creates a Job Schedule to the specified Account. Creates a Job Schedule to the specified Account. |
| create_node_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. Before you can remotely login to a Compute Node you must configure access ports for SSH and RDP. For more information, see https://learn.microsoft.com/azure/batch/pool-endpoint-configuration. |
| create_pool |
Creates a Pool to the specified Account. When naming Pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers. |
| create_task |
Creates a Task to the specified Job. The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time. |
| create_task_collection |
Adds a collection of Tasks to the specified Job. Note that each Task must have a unique ID. The Batch service may not return the results for each Task in the same order the Tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same Task IDs during a retry so that if the prior operation succeeded, the retry will not create extra Tasks unexpectedly. If the response contains any Tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only Tasks that failed to add, and to omit Tasks that were successfully added on the first attempt. The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time. |
| create_tasks |
Adds a collection of Tasks to the specified Job. Note that each Task must have a unique ID. The Batch service may not return the results for each Task in the same order the Tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same Task IDs during a retry so that if the prior operation succeeded, the retry will not create extra Tasks unexpectedly. If the response contains any Tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only Tasks that failed to add, and to omit Tasks that were successfully added on the first attempt. The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time. |
| delete_node_file |
Deletes the specified file from the Compute Node. Deletes the specified file from the Compute Node. |
| delete_node_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. Before you can remotely login to a Compute Node you must configure access ports for SSH and RDP. For more information, see https://learn.microsoft.com/azure/batch/pool-endpoint-configuration. |
| delete_task |
Deletes a Task from the specified Job. When a Task is deleted, all of the files in its directory on the Compute Node where it ran are also deleted (regardless of the retention time). For multi-instance Tasks, the delete Task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background. |
| delete_task_file |
Deletes the specified Task file from the Compute Node where the Task ran. Deletes the specified Task file from the Compute Node where the Task ran. |
| disable_job_schedule |
Disables a Job Schedule. No new Jobs will be created until the Job Schedule is enabled again. |
| disable_node_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_pool_auto_scale |
Disables automatic scaling for a Pool. Disables automatic scaling for a Pool. |
| download_node_file |
Returns the content of the specified Compute Node file. |
| download_task_file |
Returns the content of the specified Task file. |
| enable_job_schedule |
Enables a Job Schedule. Enables a Job Schedule. |
| enable_node_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_pool_auto_scale |
Enables automatic scaling for a Pool. You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale formula as part of the request. If automatic scaling of the Pool is already enabled, you may specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds. |
| evaluate_pool_auto_scale |
Gets the result of evaluating an automatic scaling formula on the Pool. This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the Pool. The Pool must have auto scaling enabled in order to evaluate a formula. |
| get_application |
Gets information about the specified Application. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about Applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API. |
| get_job |
Gets information about the specified Job. Gets information about the specified Job. |
| get_job_schedule |
Gets information about the specified Job Schedule. |
| get_job_task_counts |
Gets the Task counts for the specified Job. Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query. |
| get_node |
Gets information about the specified Compute Node. Gets information about the specified Compute Node. |
| get_node_extension |
Gets information about the specified Compute Node Extension. Gets information about the specified Compute Node Extension. |
| get_node_file_properties |
Gets the properties of the specified Compute Node file. |
| get_node_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 and configure access ports for SSH and RDP. For more information, see https://learn.microsoft.com/azure/batch/pool-endpoint-configuration. |
| get_pool |
Gets information about the specified Pool. |
| get_task |
Gets information about the specified Task. For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary Task. Use the list subtasks API to retrieve information about subtasks. |
| get_task_file_properties |
Gets the properties of the specified Task file. |
| job_schedule_exists |
Checks the specified Job Schedule exists. Checks the specified Job Schedule exists. |
| list_applications |
Lists all of the applications available in the specified Account. This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API. |
| list_job_preparation_and_release_task_status |
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. This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified. |
| list_job_schedules |
Lists all of the Job Schedules in the specified Account. Lists all of the Job Schedules in the specified Account. |
| list_jobs |
Lists all of the Jobs in the specified Account. Lists all of the Jobs in the specified Account. |
| list_jobs_from_schedule |
Lists the Jobs that have been created under the specified Job Schedule. Lists the Jobs that have been created under the specified Job Schedule. |
| list_node_extensions |
Lists the Compute Nodes Extensions in the specified Pool. Lists the Compute Nodes Extensions in the specified Pool. |
| list_node_files |
Lists all of the files in Task directories on the specified Compute Node. Lists all of the files in Task directories on the specified Compute Node. |
| list_nodes |
Lists the Compute Nodes in the specified Pool. Lists the Compute Nodes in the specified Pool. |
| list_pool_node_counts |
Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned may not always be up to date. If you need exact node counts, use a list query. |
| list_pool_usage_metrics |
Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. If you do not specify a $filter clause including a poolId, the response includes all Pools that existed in the Account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned. |
| list_pools |
Lists all of the Pools in the specified Account. Lists all of the Pools in the specified Account. |
| list_subtasks |
Lists all of the subtasks that are associated with the specified multi-instance Task. If the Task is not a multi-instance Task then this returns an empty collection. |
| list_supported_images |
Lists all Virtual Machine Images supported by the Azure Batch service. Lists all Virtual Machine Images supported by the Azure Batch service. |
| list_task_files |
Lists the files in a Task's directory on its Compute Node. Lists the files in a Task's directory on its Compute Node. |
| list_tasks |
Lists all of the Tasks that are associated with the specified Job. For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary Task. Use the list subtasks API to retrieve information about subtasks. |
| pool_exists |
Gets basic properties of a Pool. |
| reactivate_task |
Reactivates a Task, allowing it to run again even if its retry count has been exhausted. Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's state is changed to active. As the Task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a Task is reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the Job has completed (or is terminating or deleting). |
| replace_job |
Updates the properties of the specified Job. This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints. |
| replace_job_schedule |
Updates the properties of the specified Job Schedule. This fully replaces all the updatable properties of the Job Schedule. For example, if the schedule property is not specified with this request, then the Batch service will remove the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected. |
| replace_node_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. |
| replace_pool_properties |
Updates the properties of the specified Pool. This fully replaces all the updatable properties of the Pool. For example, if the Pool has a StartTask associated with it and if StartTask is not specified with this request, then the Batch service will remove the existing StartTask. |
| replace_task |
Updates the properties of the specified Task. |
| send_request |
Runs the network request through the client's chained policies.
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request |
| terminate_task |
Terminates the specified Task. When the Task has been terminated, it moves to the completed state. For multi-instance Tasks, the terminate Task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background. |
| update_job |
Updates the properties of the specified Job. This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints. |
| update_job_schedule |
Updates the properties of the specified Job Schedule. This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected. |
| update_pool |
Updates the properties of the specified Pool. This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask. |
| upload_node_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. |
begin_deallocate_node
Deallocates a Compute Node with Long Running Operation support.
You can deallocate a Compute Node only if it is in an idle or running state.
begin_deallocate_node(pool_id: str, node_id: str, options: BatchNodeDeallocateOptions | None = None, *, service_timeout: int | None = None, ocp_date: datetime | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that you want to restart. Required. |
|
options
|
<xref:azure.batch.models._models.BatchNodeDeallocateOptions>
The options to use for deallocating the Compute Node. Default value is None. Default value: None
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to deallocate the Compute Node, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_delete_job
Deletes a Job with Long Running Operation support.
Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task data; that is, if the Job contains Tasks which are still retained on Compute Nodes, the Batch services deletes those Tasks' working directories and all their contents. When a Delete Job request is received, the Batch service sets the Job to the deleting state. All update operations on a Job that is in deleting state will fail with status code 409 (Conflict), with additional information indicating that the Job is being deleted.
begin_delete_job(job_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, force: bool | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to delete. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the inital request to delete the Job, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead. Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
force
|
If true, the server will delete the Job even if the corresponding nodes have not fully processed the deletion. The default value is false. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
An LROPoller that can be used to wait for the job deletion to complete |
Exceptions
| Type | Description |
|---|---|
begin_delete_job_schedule
Deletes a Job Schedule with Long Running Operation support.
When you delete a Job Schedule, this also deletes all Jobs and Tasks under that schedule. When Tasks are deleted, all the files in their working directories on the Compute Nodes are also deleted (the retention period is ignored). The Job Schedule statistics are no longer accessible once the Job Schedule is deleted, though they are still counted towards Account lifetime statistics.
begin_delete_job_schedule(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to delete. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to delete the Job Schedule, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead. Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
An LROPoller that can be used to wait for the job schedule deletion to complete |
Exceptions
| Type | Description |
|---|---|
begin_delete_pool
Deletes a Pool from specified Account with Long Running Operation support.
When you request that a Pool be deleted, the following actions occur: the Pool state is set to deleting; any ongoing resize operation on the Pool are stopped; the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks running on existing Compute Nodes are terminated and requeued (as if a resize Pool operation had been requested with the default requeue option); finally, the Pool is removed from the system. Because running Tasks are requeued, the user can rerun these Tasks by updating their Job to target a different Pool. The Tasks can then run on the new Pool. If you want to override the requeue behavior, then you should call resize Pool explicitly to shrink the Pool to zero size before deleting the Pool. If you call an Update, Patch or Delete API on a Pool in the deleting state, it will fail with HTTP status code 409 with error code PoolBeingDeleted.
begin_delete_pool(pool_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to delete the Pool, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_disable_job
Disables a Job with Long Running Operation support.
The Batch Service immediately moves the Job to the disabling state. Batch then uses the disableTasks parameter to determine what to do with the currently running Tasks of the Job. The Job remains in the disabling state until the disable operation is completed and all Tasks have been dealt with according to the disableTasks option; the Job then moves to the disabled state. No new Tasks are started under the Job until it moves back to active state. If you try to disable a Job that is in any state other than active, disabling, or disabled, the request fails with status code 409.
begin_disable_job(job_id: str, disable_options: BatchJobDisableOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to disable. Required. |
|
disable_options
Required
|
The options to use for disabling the Job. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the inital request to disable the Job, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_enable_job
Enables a Job with Long Running Operation support. When you call this API, the Batch service sets a disabled Job to the enabling state. After the this operation is completed, the Job moves to the active state, and scheduling of new Tasks under the Job resumes. The Batch service does not allow a Task to remain in the active state for more than 180 days. Therefore, if you enable a Job containing active Tasks which were added more than 180 days ago, those Tasks will not run.
begin_enable_job(job_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to enable. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the intal request to enable the Job, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_reboot_node
Reboots a Compute Node with Long Running Operation support.
You can restart a Compute Node only if it is in an idle or running state.
begin_reboot_node(pool_id: str, node_id: str, options: BatchNodeRebootOptions | None = None, *, service_timeout: int | None = None, ocp_date: datetime | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that you want to restart. Required. |
|
options
|
<xref:azure.batch.models._models.BatchNodeRebootOptions>
The options to use for rebooting the Compute Node. Default value is None. Default value: None
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to reboot the Compute Node, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_reimage_node
Reimages a Compute Node with Long Running Operation support.
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.
begin_reimage_node(pool_id: str, node_id: str, options: BatchNodeReimageOptions | None = None, *, service_timeout: int | None = None, ocp_date: datetime | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that you want to restart. Required. |
|
options
|
<xref:azure.batch.models._models.BatchNodeReimageOptions>
The options to use for reimaging the Compute Node. Default value is None. Default value: None
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to reimage the Compute Node, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_remove_nodes
Removes Compute Nodes from a Pool with Long Running Operation support.
This operation can only run when the allocation state of the Pool is steady. When this operation runs, the allocation state changes from steady to resizing. Each request may remove up to 100 nodes.
begin_remove_nodes(pool_id: str, remove_options: BatchNodeRemoveOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
|
remove_options
Required
|
The options to use for removing the node. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to remove the Compute Node, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_resize_pool
Resizes a Pool with Long Running Operation support.
You can only resize a Pool when its allocation state is steady. If the Pool is already resizing, the request fails with status code 409. When you resize a Pool, the Pool's allocation state changes from steady to resizing. You cannot resize Pools which are configured for automatic scaling. If you try to do this, the Batch service returns an error 409. If you resize a Pool downwards, the Batch service chooses which Compute Nodes to remove. To remove specific Compute Nodes, use the Pool remove Compute Nodes API instead.
begin_resize_pool(pool_id: str, resize_options: BatchPoolResizeOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
|
resize_options
Required
|
The options to use for resizing the pool. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to resize the Pool, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_start_node
Starts a Compute Node with Long Running Operation support.
You can start a Compute Node only if it has been deallocated.
begin_start_node(pool_id: str, node_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that you want to restart. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to start the Compute Node, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_stop_pool_resize
Stops an ongoing Pool resize operation with Long Running Operation support.
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. After stopping, the Pool stabilizes at the number of Compute Nodes it was at when the stop operation was done. During the stop operation, the Pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize Pool request; this API can also be used to halt the initial sizing of the Pool when it is created.
begin_stop_pool_resize(pool_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to stop the Pool resize, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_terminate_job
Terminates a Job with Long Running Operation support, marking it as completed.
When a Terminate Job request is received, the Batch service sets the Job to the terminating state. The Batch service then terminates any running Tasks associated with the Job and runs any required Job release Tasks. Then the Job moves into the completed state. If there are any Tasks in the Job in the active state, they will remain in the active state. Once a Job is terminated, new Tasks cannot be added and any remaining active Tasks will not be scheduled.
begin_terminate_job(job_id: str, options: BatchJobTerminateOptions | None = None, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, force: bool | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to terminate. Required. |
|
options
|
<xref:azure.batch.models._models.BatchJobTerminateOptions>
The options to use for terminating the Job. Default value is None. Default value: None
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to terminate the Job, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
force
|
If true, the server will terminate the Job even if the corresponding nodes have not fully processed the termination. The default value is false. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
begin_terminate_job_schedule
Terminates a Job Schedule with Long Running Operation support.
begin_terminate_job_schedule(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, force: bool | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, polling_interval: int = 5, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to terminates. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the initial request to terminate the Job Schedule, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
force
|
If true, the server will terminate the JobSchedule even if the corresponding nodes have not fully processed the termination. The default value is false. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
|
polling_interval
|
The interval in seconds between polling attempts. Default value is 5. Default value: 5
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
close
close() -> None
create_job
Creates a Job to the specified Account.
The Batch service supports two ways to control the work done as part of a Job. In the first approach, the user specifies a Job Manager Task. The Batch service launches this Task when it is ready to start the Job. The Job Manager Task controls all other Tasks that run under this Job, by using the Task APIs. In the second approach, the user directly controls the execution of Tasks under an active Job, by using the Task APIs. Also note: when naming Jobs, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.
create_job(job: BatchJobCreateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job
Required
|
The Job to be created. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
create_job_schedule
Creates a Job Schedule to the specified Account.
Creates a Job Schedule to the specified Account.
create_job_schedule(job_schedule: BatchJobScheduleCreateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_schedule
Required
|
The Job Schedule to be created. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
create_node_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. Before you can remotely login to a Compute Node you must configure access ports for SSH and RDP. For more information, see https://learn.microsoft.com/azure/batch/pool-endpoint-configuration.
create_node_user(pool_id: str, node_id: str, user: BatchNodeUserCreateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the machine on which you want to create a user Account. Required. |
|
user
Required
|
The options to use for creating the user. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
create_pool
Creates a Pool to the specified Account.
When naming Pools, avoid including sensitive information such as user names or secret project names. This information may appear in telemetry logs accessible to Microsoft Support engineers.
create_pool(pool: BatchPoolCreateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool
Required
|
The Pool to be created. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
create_task
Creates a Task to the specified Job.
The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.
create_task(job_id: str, task: BatchTaskCreateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to which the Task is to be created. Required. |
|
task
Required
|
The Task to be created. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
create_task_collection
Adds a collection of Tasks to the specified Job.
Note that each Task must have a unique ID. The Batch service may not return the results for each Task in the same order the Tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same Task IDs during a retry so that if the prior operation succeeded, the retry will not create extra Tasks unexpectedly. If the response contains any Tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only Tasks that failed to add, and to omit Tasks that were successfully added on the first attempt. The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.
create_task_collection(job_id: str, task_collection: BatchTaskGroup, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> BatchCreateTaskCollectionResult
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to which the Task collection is to be added. Required. |
|
task_collection
Required
|
The Tasks to be added. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchCreateTaskCollectionResult. The BatchCreateTaskCollectionResult is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
create_tasks
Adds a collection of Tasks to the specified Job.
Note that each Task must have a unique ID. The Batch service may not return the results for each Task in the same order the Tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially or fully processed, or not at all. In such cases, the user should re-issue the request. Note that it is up to the user to correctly handle failures when re-issuing a request. For example, you should use the same Task IDs during a retry so that if the prior operation succeeded, the retry will not create extra Tasks unexpectedly. If the response contains any Tasks which failed to add, a client can retry the request. In a retry, it is most efficient to resubmit only Tasks that failed to add, and to omit Tasks that were successfully added on the first attempt. The maximum lifetime of a Task from addition to completion is 180 days. If a Task has not completed within 180 days of being added it will be terminated by the Batch service and left in whatever state it was in at that time.
create_tasks(job_id: str, task_collection: List[BatchTaskCreateOptions], *, max_concurrency: int | None = None, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> BatchCreateTaskCollectionResult
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job to which the Task collection is to be added. Required. |
|
task_collection
Required
|
<xref:azure.batch.models.BatchTaskAddCollectionResult>
The Tasks to be added. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
max_concurrency
|
number of threads to use in parallel when adding tasks. If specified and greater than 0, will start additional threads to submit requests and wait for them to finish. Otherwise will submit create_task_collection requests sequentially on main thread Default value: None
|
|
service_timeout
|
The maximum time that the server can spend processing the equest to create the task collection, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
<xref:azure.batch.models.BatchTaskAddCollectionResult>
|
BatchTaskAddCollectionResult. The BatchTaskAddCollectionResult is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
|
azure.batch.custom.CreateTasksError
|
delete_node_file
Deletes the specified file from the Compute Node.
Deletes the specified file from the Compute Node.
delete_node_file(pool_id: str, node_id: str, file_path: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, recursive: bool | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node. Required. |
|
file_path
Required
|
The path to the file or directory. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
recursive
|
Whether to delete children of a directory. If the filePath 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. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
delete_node_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. Before you can remotely login to a Compute Node you must configure access ports for SSH and RDP. For more information, see https://learn.microsoft.com/azure/batch/pool-endpoint-configuration.
delete_node_user(pool_id: str, node_id: str, user_name: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the machine on which you want to delete a user Account. Required. |
|
user_name
Required
|
The name of the user Account to delete. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
delete_task
Deletes a Task from the specified Job.
When a Task is deleted, all of the files in its directory on the Compute Node where it ran are also deleted (regardless of the retention time). For multi-instance Tasks, the delete Task operation applies synchronously to the primary task; subtasks and their files are then deleted asynchronously in the background.
delete_task(job_id: str, task_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job from which to delete the Task. Required. |
|
task_id
Required
|
The ID of the Task to delete. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
delete_task_file
Deletes the specified Task file from the Compute Node where the Task ran.
Deletes the specified Task file from the Compute Node where the Task ran.
delete_task_file(job_id: str, task_id: str, file_path: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, recursive: bool | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job that contains the Task. Required. |
|
task_id
Required
|
The ID of the Task whose file you want to retrieve. Required. |
|
file_path
Required
|
The path to the Task file that you want to get the content of. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
recursive
|
Whether to delete children of a directory. If the filePath 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. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
disable_job_schedule
Disables a Job Schedule.
No new Jobs will be created until the Job Schedule is enabled again.
disable_job_schedule(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to disable. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
disable_node_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_node_scheduling(pool_id: str, node_id: str, options: BatchNodeDisableSchedulingOptions | None = None, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node on which you want to disable Task scheduling. Required. |
|
options
|
The options to use for disabling scheduling on the Compute Node. Default value is None. Default value: None
|
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
disable_pool_auto_scale
Disables automatic scaling for a Pool.
Disables automatic scaling for a Pool.
disable_pool_auto_scale(pool_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool on which to disable automatic scaling. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
download_node_file
Returns the content of the specified Compute Node file.
download_node_file(pool_id: str, node_id: str, file_path: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, ocp_range: str | None = None, **kwargs: Any) -> Iterator[bytes]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node from which you want to delete the file. Required. |
|
file_path
Required
|
The path to the file or directory that you want to delete. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
ocp_range
|
The byte range to be retrieved. The default is to retrieve the entire file. The format is bytes=startRange-endRange. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
bytes |
Exceptions
| Type | Description |
|---|---|
download_task_file
Returns the content of the specified Task file.
download_task_file(job_id: str, task_id: str, file_path: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, ocp_range: str | None = None, **kwargs: Any) -> Iterator[bytes]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job that contains the Task. Required. |
|
task_id
Required
|
The ID of the Task whose file you want to retrieve. Required. |
|
file_path
Required
|
The path to the Task file that you want to get the content of. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
ocp_range
|
The byte range to be retrieved. The default is to retrieve the entire file. The format is bytes=startRange-endRange. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
bytes |
Exceptions
| Type | Description |
|---|---|
enable_job_schedule
Enables a Job Schedule.
Enables a Job Schedule.
enable_job_schedule(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to enable. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
enable_node_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_node_scheduling(pool_id: str, node_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node on which you want to enable Task scheduling. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
enable_pool_auto_scale
Enables automatic scaling for a Pool.
You cannot enable automatic scaling on a Pool if a resize operation is in progress on the Pool. If automatic scaling of the Pool is currently disabled, you must specify a valid autoscale formula as part of the request. If automatic scaling of the Pool is already enabled, you may specify a new autoscale formula and/or a new evaluation interval. You cannot call this API for the same Pool more than once every 30 seconds.
enable_pool_auto_scale(pool_id: str, enable_auto_scale_options: BatchPoolEnableAutoScaleOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
|
enable_auto_scale_options
Required
|
The options to use for enabling automatic scaling. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
evaluate_pool_auto_scale
Gets the result of evaluating an automatic scaling formula on the Pool.
This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the Pool. The Pool must have auto scaling enabled in order to evaluate a formula.
evaluate_pool_auto_scale(pool_id: str, evaluate_auto_scale_options: BatchPoolEvaluateAutoScaleOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> AutoScaleRun
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool on which to evaluate the automatic scaling formula. Required. |
|
evaluate_auto_scale_options
Required
|
The options to use for evaluating the automatic scaling formula. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
AutoScaleRun. The AutoScaleRun is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_application
Gets information about the specified Application.
This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about Applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
get_application(application_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> BatchApplication
Parameters
| Name | Description |
|---|---|
|
application_id
Required
|
The ID of the Application. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchApplication. The BatchApplication is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_job
Gets information about the specified Job.
Gets information about the specified Job.
get_job(job_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, select: list[str] | None = None, expand: list[str] | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> BatchJob
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchJob. The BatchJob is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_job_schedule
Gets information about the specified Job Schedule.
get_job_schedule(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, select: list[str] | None = None, expand: list[str] | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> BatchJobSchedule
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to get. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchJobSchedule. The BatchJobSchedule is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_job_task_counts
Gets the Task counts for the specified Job.
Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.
get_job_task_counts(job_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> BatchTaskCountsResult
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchTaskCountsResult. The BatchTaskCountsResult is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_node
Gets information about the specified Compute Node.
Gets information about the specified Compute Node.
get_node(pool_id: str, node_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, select: list[str] | None = None, **kwargs: Any) -> BatchNode
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that you want to get information about. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchNode. The BatchNode is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_node_extension
Gets information about the specified Compute Node Extension.
Gets information about the specified Compute Node Extension.
get_node_extension(pool_id: str, node_id: str, extension_name: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, select: list[str] | None = None, **kwargs: Any) -> BatchNodeVMExtension
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that contains the extensions. Required. |
|
extension_name
Required
|
The name of the Compute Node Extension that you want to get information about. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchNodeVMExtension. The BatchNodeVMExtension is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_node_file_properties
Gets the properties of the specified Compute Node file.
get_node_file_properties(pool_id: str, node_id: str, file_path: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, **kwargs: Any) -> BatchFileProperties
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node from which you want to delete the file. Required. |
|
file_path
Required
|
The path to the file or directory that you want to delete. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchFileProperties |
Exceptions
| Type | Description |
|---|---|
get_node_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 and configure access ports for SSH and RDP. For more information, see https://learn.microsoft.com/azure/batch/pool-endpoint-configuration.
get_node_remote_login_settings(pool_id: str, node_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> BatchNodeRemoteLoginSettings
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node for which to obtain the remote login settings. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchNodeRemoteLoginSettings. The BatchNodeRemoteLoginSettings is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_pool
Gets information about the specified Pool.
get_pool(pool_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, select: list[str] | None = None, expand: list[str] | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> BatchPool
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchPool. The BatchPool is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_task
Gets information about the specified Task.
For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary Task. Use the list subtasks API to retrieve information about subtasks.
get_task(job_id: str, task_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, select: list[str] | None = None, expand: list[str] | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> BatchTask
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job that contains the Task. Required. |
|
task_id
Required
|
The ID of the Task to get information about. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchTask. The BatchTask is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_task_file_properties
Gets the properties of the specified Task file.
get_task_file_properties(job_id: str, task_id: str, file_path: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, **kwargs: Any) -> BatchFileProperties
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job that contains the Task. Required. |
|
task_id
Required
|
The ID of the Task whose file you want to retrieve. Required. |
|
file_path
Required
|
The path to the Task file that you want to get the content of. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
BatchFileProperties |
Exceptions
| Type | Description |
|---|---|
job_schedule_exists
Checks the specified Job Schedule exists.
Checks the specified Job Schedule exists.
job_schedule_exists(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> bool
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule which you want to check. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
bool |
Exceptions
| Type | Description |
|---|---|
list_applications
Lists all of the applications available in the specified Account.
This operation returns only Applications and versions that are available for use on Compute Nodes; that is, that can be used in an Package reference. For administrator information about applications and versions that are not yet available to Compute Nodes, use the Azure portal or the Azure Resource Manager API.
list_applications(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, **kwargs: Any) -> ItemPaged[BatchApplication]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchApplication |
Exceptions
| Type | Description |
|---|---|
list_job_preparation_and_release_task_status
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.
This API returns the Job Preparation and Job Release Task status on all Compute Nodes that have run the Job Preparation or Job Release Task. This includes Compute Nodes which have since been removed from the Pool. If this API is invoked on a Job which has no Job Preparation or Job Release Task, the Batch service returns HTTP status code 409 (Conflict) with an error code of JobPreparationTaskNotSpecified.
list_job_preparation_and_release_task_status(job_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchJobPreparationAndReleaseTaskStatus]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchJobPreparationAndReleaseTaskStatus |
Exceptions
| Type | Description |
|---|---|
list_job_schedules
Lists all of the Job Schedules in the specified Account.
Lists all of the Job Schedules in the specified Account.
list_job_schedules(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, expand: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchJobSchedule]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchJobSchedule |
Exceptions
| Type | Description |
|---|---|
list_jobs
Lists all of the Jobs in the specified Account.
Lists all of the Jobs in the specified Account.
list_jobs(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, expand: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchJob]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchJob |
Exceptions
| Type | Description |
|---|---|
list_jobs_from_schedule
Lists the Jobs that have been created under the specified Job Schedule.
Lists the Jobs that have been created under the specified Job Schedule.
list_jobs_from_schedule(job_schedule_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, expand: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchJob]
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule from which you want to get a list of Jobs. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchJob |
Exceptions
| Type | Description |
|---|---|
list_node_extensions
Lists the Compute Nodes Extensions in the specified Pool.
Lists the Compute Nodes Extensions in the specified Pool.
list_node_extensions(pool_id: str, node_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, select: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchNodeVMExtension]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node that you want to list extensions. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchNodeVMExtension |
Exceptions
| Type | Description |
|---|---|
list_node_files
Lists all of the files in Task directories on the specified Compute Node.
Lists all of the files in Task directories on the specified Compute Node.
list_node_files(pool_id: str, node_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, recursive: bool | None = None, **kwargs: Any) -> ItemPaged[BatchNodeFile]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node whose files you want to list. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. Default value is None. Default value: None
|
|
recursive
|
Whether to list children of a directory. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchNodeFile |
Exceptions
| Type | Description |
|---|---|
list_nodes
Lists the Compute Nodes in the specified Pool.
Lists the Compute Nodes in the specified Pool.
list_nodes(pool_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchNode]
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool from which you want to list Compute Nodes. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchNode |
Exceptions
| Type | Description |
|---|---|
list_pool_node_counts
Gets the number of Compute Nodes in each state, grouped by Pool. Note that the numbers returned may not always be up to date. If you need exact node counts, use a list query.
list_pool_node_counts(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, **kwargs: Any) -> ItemPaged[BatchPoolNodeCounts]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchPoolNodeCounts |
Exceptions
| Type | Description |
|---|---|
list_pool_usage_metrics
Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account.
If you do not specify a $filter clause including a poolId, the response includes all Pools that existed in the Account in the time range of the returned aggregation intervals. If you do not specify a $filter clause including a startTime or endTime these filters default to the start and end times of the last aggregation interval currently available; that is, only the last aggregation interval is returned.
list_pool_usage_metrics(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, start_time: datetime | None = None, end_time: datetime | None = None, filter: str | None = None, **kwargs: Any) -> ItemPaged[BatchPoolUsageMetrics]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
start_time
|
The earliest time from which to include metrics. This must be at least two and a half hours before the current time. If not specified this defaults to the start time of the last aggregation interval currently available. Default value is None. Default value: None
|
|
end_time
|
The latest time from which to include metrics. This must be at least two hours before the current time. If not specified this defaults to the end time of the last aggregation interval currently available. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchPoolUsageMetrics |
Exceptions
| Type | Description |
|---|---|
list_pools
Lists all of the Pools in the specified Account.
Lists all of the Pools in the specified Account.
list_pools(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, expand: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchPool]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-pools. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchPool |
Exceptions
| Type | Description |
|---|---|
list_subtasks
Lists all of the subtasks that are associated with the specified multi-instance Task.
If the Task is not a multi-instance Task then this returns an empty collection.
list_subtasks(job_id: str, task_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, select: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchSubtask]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job. Required. |
|
task_id
Required
|
The ID of the Task. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchSubtask |
Exceptions
| Type | Description |
|---|---|
list_supported_images
Lists all Virtual Machine Images supported by the Azure Batch service.
Lists all Virtual Machine Images supported by the Azure Batch service.
list_supported_images(*, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, **kwargs: Any) -> ItemPaged[BatchSupportedImage]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-support-images. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchSupportedImage |
Exceptions
| Type | Description |
|---|---|
list_task_files
Lists the files in a Task's directory on its Compute Node.
Lists the files in a Task's directory on its Compute Node.
list_task_files(job_id: str, task_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, recursive: bool | None = None, **kwargs: Any) -> ItemPaged[BatchNodeFile]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job that contains the Task. Required. |
|
task_id
Required
|
The ID of the Task whose files you want to list. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-task-files. Default value is None. Default value: None
|
|
recursive
|
Whether to list children of the Task directory. This parameter can be used in combination with the filter parameter to list specific type of files. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchNodeFile |
Exceptions
| Type | Description |
|---|---|
list_tasks
Lists all of the Tasks that are associated with the specified Job.
For multi-instance Tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary Task. Use the list subtasks API to retrieve information about subtasks.
list_tasks(job_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, max_results: int | None = None, filter: str | None = None, select: list[str] | None = None, expand: list[str] | None = None, **kwargs: Any) -> ItemPaged[BatchTask]
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
max_results
|
The maximum number of items to return in the response. A maximum of 1000 applications can be returned. Default value is None. Default value: None
|
|
filter
|
An OData $filter clause. For more information on constructing this filter, see https://learn.microsoft.com/rest/api/batchservice/odata-filters-in-batch#list-tasks. Default value is None. Default value: None
|
|
select
|
An OData $select clause. Default value is None. Default value: None
|
|
expand
|
An OData $expand clause. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of BatchTask |
Exceptions
| Type | Description |
|---|---|
pool_exists
Gets basic properties of a Pool.
pool_exists(pool_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> bool
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
bool |
Exceptions
| Type | Description |
|---|---|
reactivate_task
Reactivates a Task, allowing it to run again even if its retry count has been exhausted.
Reactivation makes a Task eligible to be retried again up to its maximum retry count. The Task's state is changed to active. As the Task is no longer in the completed state, any previous exit code or failure information is no longer available after reactivation. Each time a Task is reactivated, its retry count is reset to 0. Reactivation will fail for Tasks that are not completed or that previously completed successfully (with an exit code of 0). Additionally, it will fail if the Job has completed (or is terminating or deleting).
reactivate_task(job_id: str, task_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job containing the Task. Required. |
|
task_id
Required
|
The ID of the Task to reactivate. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
replace_job
Updates the properties of the specified Job.
This fully replaces all the updatable properties of the Job. For example, if the Job has constraints associated with it and if constraints is not specified with this request, then the Batch service will remove the existing constraints.
replace_job(job_id: str, job: BatchJob, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job whose properties you want to update. Required. |
|
job
Required
|
A job with updated properties. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
replace_job_schedule
Updates the properties of the specified Job Schedule.
This fully replaces all the updatable properties of the Job Schedule. For example, if the schedule property is not specified with this request, then the Batch service will remove the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.
replace_job_schedule(job_schedule_id: str, job_schedule: BatchJobSchedule, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to update. Required. |
|
job_schedule
Required
|
A Job Schedule with updated properties. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
replace_node_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.
replace_node_user(pool_id: str, node_id: str, user_name: str, update_options: BatchNodeUserReplaceOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the machine on which you want to update a user Account. Required. |
|
user_name
Required
|
The name of the user Account to update. Required. |
|
update_options
Required
|
The options to use for updating the user. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
replace_pool_properties
Updates the properties of the specified Pool.
This fully replaces all the updatable properties of the Pool. For example, if the Pool has a StartTask associated with it and if StartTask is not specified with this request, then the Batch service will remove the existing StartTask.
replace_pool_properties(pool_id: str, pool: BatchPoolReplaceOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to update. Required. |
|
pool
Required
|
The options to use for replacing properties on the pool. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
replace_task
Updates the properties of the specified Task.
replace_task(job_id: str, task_id: str, task: BatchTask, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job containing the Task. Required. |
|
task_id
Required
|
The ID of the Task to update. Required. |
|
task
Required
|
The Task to update. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
send_request
Runs the network request through the client's chained policies.
>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client.send_request(request)
<HttpResponse: 200 OK>
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
send_request(request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse
Parameters
| Name | Description |
|---|---|
|
request
Required
|
The network request you want to make. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
stream
|
Whether the response payload will be streamed. Defaults to False. Default value: False
|
Returns
| Type | Description |
|---|---|
|
The response of your network call. Does not do error handling on your response. |
terminate_task
Terminates the specified Task.
When the Task has been terminated, it moves to the completed state. For multi-instance Tasks, the terminate Task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
terminate_task(job_id: str, task_id: str, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job containing the Task. Required. |
|
task_id
Required
|
The ID of the Task to terminate. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
update_job
Updates the properties of the specified Job.
This replaces only the Job properties specified in the request. For example, if the Job has constraints, and a request does not specify the constraints element, then the Job keeps the existing constraints.
update_job(job_id: str, job: BatchJobUpdateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_id
Required
|
The ID of the Job whose properties you want to update. Required. |
|
job
Required
|
The options to use for updating the Job. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
update_job_schedule
Updates the properties of the specified Job Schedule.
This replaces only the Job Schedule properties specified in the request. For example, if the schedule property is not specified with this request, then the Batch service will keep the existing schedule. Changes to a Job Schedule only impact Jobs created by the schedule after the update has taken place; currently running Jobs are unaffected.
update_job_schedule(job_schedule_id: str, job_schedule: BatchJobScheduleUpdateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
job_schedule_id
Required
|
The ID of the Job Schedule to update. Required. |
|
job_schedule
Required
|
The options to use for updating the Job Schedule. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
update_pool
Updates the properties of the specified Pool.
This only replaces the Pool properties specified in the request. For example, if the Pool has a StartTask associated with it, and a request does not specify a StartTask element, then the Pool keeps the existing StartTask.
update_pool(pool_id: str, pool: BatchPoolUpdateOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, if_modified_since: datetime | None = None, if_unmodified_since: datetime | None = None, etag: str | None = None, match_condition: MatchConditions | None = None, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool to get. Required. |
|
pool
Required
|
The pool properties to update. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
|
if_modified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. Default value is None. Default value: None
|
|
if_unmodified_since
|
A timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has not been modified since the specified time. Default value is None. Default value: None
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Default value is None. Default value: None
|
|
match_condition
|
The match condition to use upon the etag. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
upload_node_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_node_logs(pool_id: str, node_id: str, upload_options: UploadBatchServiceLogsOptions, *, service_timeout: int | None = None, ocp_date: datetime | None = None, **kwargs: Any) -> UploadBatchServiceLogsResult
Parameters
| Name | Description |
|---|---|
|
pool_id
Required
|
The ID of the Pool that contains the Compute Node. Required. |
|
node_id
Required
|
The ID of the Compute Node for which you want to get the Remote Desktop Protocol file. Required. |
|
upload_options
Required
|
The Azure Batch service log files upload options. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
service_timeout
|
The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". Default value is None. Default value: None
|
|
ocp_date
|
The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
UploadBatchServiceLogsResult. The UploadBatchServiceLogsResult is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|