class_docstr: Start a container on Azure Container Instances.
  
  :param ci_conn_id: connection id of a service principal which will be used
      to start the container instance
  :param registry_conn_id: connection id of a user which can login to a
      private docker registry. For Azure use :ref:`Azure connection id<howto/connection:azure>`
  :param resource_group: name of the resource group wherein this container
      instance should be started
  :param name: name of this container instance. Please note this name has
      to be unique in order to run containers in parallel.
  :param image: the docker image to be used
  :param region: the region wherein this container instance should be started
  :param environment_variables: key,value pairs containing environment
      variables which will be passed to the running container
  :param secured_variables: names of environmental variables that should not
      be exposed outside the container (typically passwords).
  :param volumes: list of ``Volume`` tuples to be mounted to the container.
      Currently only Azure Fileshares are supported.
  :param memory_in_gb: the amount of memory to allocate to this container
  :param cpu: the number of cpus to allocate to this container
  :param gpu: GPU Resource for the container.
  :param command: the command to run inside the container
  :param container_timeout: max time allowed for the execution of
      the container instance.
  :param tags: azure tags as dict of str:str
  :param os_type: The operating system type required by the containers
      in the container group. Possible values include: 'Windows', 'Linux'
  :param restart_policy: Restart policy for all containers within the container group.
      Possible values include: 'Always', 'OnFailure', 'Never'
  :param ip_address: The IP address type of the container group.
  :param subnet_ids: The subnet resource IDs for a container group
  
  **Example**::
  
      AzureContainerInstancesOperator(
          ci_conn_id="azure_service_principal",
          registry_conn_id="azure_registry_user",
          resource_group="my-resource-group",
          name="my-container-name-{{ ds }}",
          image="myprivateregistry.azurecr.io/my_container:latest",
          region="westeurope",
          environment_variables={
              "MODEL_PATH": "my_value",
              "POSTGRES_LOGIN": "{{ macros.connection('postgres_default').login }}",
              "POSTGRES_PASSWORD": "{{ macros.connection('postgres_default').password }}",
              "JOB_GUID": "{{ ti.xcom_pull(task_ids='task1', key='guid') }}",
          },
          secured_variables=["POSTGRES_PASSWORD"],
          volumes=[
              ("azure_container_instance_conn_id", "my_storage_container", "my_fileshare", "/input-data", True),
          ],
          memory_in_gb=14.0,
          cpu=4.0,
          gpu=GpuResource(count=1, sku="K80"),
          command=["/bin/echo", "world"],
          task_id="start_container",
      )
class_docstr_tok: ["Start","a","container","on","Azure","Container","Instances",".",":","param","ci_conn_id",":","connection","id","of","a","service","principal","which","will","be","used","to","start","the","container","instance",":","param","registry_conn_id",":","connection","id","of","a","user","which","can","login","to","a","private","docker","registry",".","For","Azure","use",":","ref",":","`","Azure","connection","id","<","howto\/connection",":","azure",">","`",":","param","resource_group",":","name","of","the","resource","group","wherein","this","container","instance","should","be","started",":","param","name",":","name","of","this","container","instance",".","Please","note","this","name","has","to","be","unique","in","order","to","run","containers","in","parallel",".",":","param","image",":","the","docker","image","to","be","used",":","param","region",":","the","region","wherein","this","container","instance","should","be","started",":","param","environment_variables",":","key",",","value","pairs","containing","environment","variables","which","will","be","passed","to","the","running","container",":","param","secured_variables",":","names","of","environmental","variables","that","should","not","be","exposed","outside","the","container","(","typically","passwords",")",".",":","param","volumes",":","list","of","``","Volume","``","tuples","to","be","mounted","to","the","container",".","Currently","only","Azure","Fileshares","are","supported",".",":","param","memory_in_gb",":","the","amount","of","memory","to","allocate","to","this","container",":","param","cpu",":","the","number","of","cpus","to","allocate","to","this","container",":","param","gpu",":","GPU","Resource","for","the","container",".",":","param","command",":","the","command","to","run","inside","the","container",":","param","container_timeout",":","max","time","allowed","for","the","execution","of","the","container","instance",".",":","param","tags",":","azure","tags","as","dict","of","str",":","str",":","param","os_type",":","The","operating","system","type","required","by","the","containers","in","the","container","group",".","Possible","values","include",":","'Windows","'",",","'Linux'",":","param","restart_policy",":","Restart","policy","for","all","containers","within","the","container","group",".","Possible","values","include",":","'Always","'",",","'OnFailure","'",",","'Never'",":","param","ip_address",":","The","IP","address","type","of","the","container","group",".",":","param","subnet_ids",":","The","subnet","resource","IDs","for","a","container","group","*","*","Example","*","*",":",":","AzureContainerInstancesOperator","(","ci_conn_id=","''","azure_service_principal","''",",","registry_conn_id=","''","azure_registry_user","''",",","resource_group=","''","my-resource-group","''",",","name=","''","my-container-name-","{","{","ds","}","}","''",",","image=","''","myprivateregistry.azurecr.io\/my_container",":","latest","''",",","region=","''","westeurope","''",",","environment_variables=","{","``","MODEL_PATH","''",":","``","my_value","''",",","``","POSTGRES_LOGIN","''",":","``","{","{","macros.connection","(","'postgres_default","'",")",".login","}","}","''",",","``","POSTGRES_PASSWORD","''",":","``","{","{","macros.connection","(","'postgres_default","'",")",".password","}","}","''",",","``","JOB_GUID","''",":","``","{","{","ti.xcom_pull","(","task_ids='task1","'",",","key='guid","'",")","}","}","''",",","}",",","secured_variables=","[","``","POSTGRES_PASSWORD","''","]",",","volumes=","[","(","``","azure_container_instance_conn_id","''",",","``","my_storage_container","''",",","``","my_fileshare","''",",","``","\/input-data","''",",","True",")",",","]",",","memory_in_gb=14.0",",","cpu=4.0",",","gpu=GpuResource","(","count=1",",","sku=","''","K80","''",")",",","command=","[","``","\/bin\/echo","''",",","``","world","''","]",",","task_id=","''","start_container","''",",",")"]
code: def on_kill(self) -> None:
      self.log.info("Deleting container group")
      try:
          self._ci_hook.delete(self.resource_group, self.name)
      except Exception:
          self.log.exception("Could not delete container group")
  
file_path: airflow/airflow/providers/microsoft/azure/operators/container_instances.py
imports: from __future__ import annotations
  import re
  import time
  from collections import namedtuple
  from typing import TYPE_CHECKING, Any, Sequence
  from azure.mgmt.containerinstance.models import Container, ContainerGroup, ContainerGroupSubnetId, ContainerPort, EnvironmentVariable, IpAddress, ResourceRequests, ResourceRequirements, Volume, VolumeMount
  from msrestazure.azure_exceptions import CloudError
  from airflow.exceptions import AirflowException, AirflowTaskTimeout
  from airflow.models import BaseOperator
  from airflow.providers.microsoft.azure.hooks.container_instance import AzureContainerInstanceHook
  from airflow.providers.microsoft.azure.hooks.container_registry import AzureContainerRegistryHook
  from airflow.providers.microsoft.azure.hooks.container_volume import AzureContainerVolumeHook
label_desc: Use image node_id 3 for calling the AzureContainerInstancesOperator obj's underlying member method code with example usage: obj.on_kill() without return types