class_docstr: Hook for Azure Batch APIs.
  
  :param azure_batch_conn_id: :ref:`Azure Batch connection id<howto/connection:azure_batch>`
      of a service principal which will be used to start the container instance.
class_docstr_tok: ["Hook","for","Azure","Batch","APIs",".",":","param","azure_batch_conn_id",":",":","ref",":","`","Azure","Batch","connection","id","<","howto\/connection",":","azure_batch",">","`","of","a","service","principal","which","will","be","used","to","start","the","container","instance","."]
docstr: Creates a task.
  
  :param task_id: A string that identifies the task to create
  :param command_line: The command line of the Task.
  :param display_name: A display name for the Task
  :param container_settings: The settings for the container under which the Task runs.
      If the Pool that will run this Task has containerConfiguration set,
      this must be set as well. If the Pool that will run this Task doesn't have
      containerConfiguration set, this must not be set.
docstr_tok: ["Creates","a","task",".",":","param","task_id",":","A","string","that","identifies","the","task","to","create",":","param","command_line",":","The","command","line","of","the","Task",".",":","param","display_name",":","A","display","name","for","the","Task",":","param","container_settings",":","The","settings","for","the","container","under","which","the","Task","runs",".","If","the","Pool","that","will","run","this","Task","has","containerConfiguration","set",",","this","must","be","set","as","well",".","If","the","Pool","that","will","run","this","Task","does","n't","have","containerConfiguration","set",",","this","must","not","be","set","."]
code: def configure_task(
      self,
      task_id: str,
      command_line: str,
      display_name: str | None = None,
      container_settings=None,
      **kwargs,
  ) -> TaskAddParameter:
      """
      Creates a task.
  
      :param task_id: A string that identifies the task to create
      :param command_line: The command line of the Task.
      :param display_name: A display name for the Task
      :param container_settings: The settings for the container under which the Task runs.
          If the Pool that will run this Task has containerConfiguration set,
          this must be set as well. If the Pool that will run this Task doesn't have
          containerConfiguration set, this must not be set.
      """
      task = batch_models.TaskAddParameter(
          id=task_id,
          command_line=command_line,
          display_name=display_name,
          container_settings=container_settings,
          **kwargs,
      )
      self.log.info("Task created: %s", task_id)
      return task
  
imports: from __future__ import annotations
  import time
  from datetime import timedelta
  from functools import cached_property
  from typing import TYPE_CHECKING, Any
  from azure.batch import BatchServiceClient, batch_auth, models
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.providers.microsoft.azure.utils import AzureIdentityCredentialAdapter, add_managed_identity_connection_widgets, get_field
  from airflow.utils import timezone
label_desc: Use image node_id 13 for calling the AzureBatchHook obj's underlying member method code with example usage: obj.configure_task(task_id, command_line, display_name, container_settings) and returns: task