airflow.providers.microsoft.azure.hooks.container_instance
¶
Module Contents¶
Classes¶
A hook to communicate with Azure Container Instances. |
- class airflow.providers.microsoft.azure.hooks.container_instance.AzureContainerInstanceHook(conn_id: str = default_conn_name)[source]¶
Bases:
airflow.providers.microsoft.azure.hooks.base_azure.AzureBaseHook
A hook to communicate with Azure Container Instances.
This hook requires a service principal in order to work. After creating this service principal (Azure Active Directory/App Registrations), you need to fill in the client_id (Application ID) as login, the generated password as password, and tenantId and subscriptionId in the extra's field as a json.
- Parameters
conn_id -- Azure connection id of a service principal which will be used to start the container instance.
- create_or_update(self, resource_group: str, name: str, container_group: azure.mgmt.containerinstance.models.ContainerGroup) None [source]¶
Create a new container group
- get_state_exitcode_details(self, resource_group: str, name: str) tuple [source]¶
Get the state and exitcode of a container group
- get_messages(self, resource_group: str, name: str) list [source]¶
Get the messages of a container group
- get_logs(self, resource_group: str, name: str, tail: int = 1000) list [source]¶
Get the tail from logs of a container group