Repository: apache/airflow

Issue:
AzureContainerInstancesOperator is not working due to argument error
### Apache Airflow Provider(s)

microsoft-azure

### Versions of Apache Airflow Providers

3.1.0

### Apache Airflow version

2.1.3 (latest released)

### Operating System

Ubuntu

### Deployment

Docker-Compose

### Deployment details

_No response_

### What happened

I'm getting this error when trying to run AzureContainerInstancesOperator. I believe its due to AzureContainerInstanceHook initialization when passing self.ci_conn_id as a positional argument.

https://github.com/apache/airflow/blob/79d85573591f641db4b5f89a12213e799ec6dea1/airflow/providers/microsoft/azure/operators/azure_container_instances.py#L202

Should this be?
```py
        self._ci_hook = AzureContainerInstanceHook(conn_id=self.ci_conn_id)
```

Error:
```
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1164, in _run_raw_task
    self._prepare_and_execute_task_with_callbacks(context, task)
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1282, in _prepare_and_execute_task_with_callbacks
    result = self._execute_task(context, task_copy)
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1312, in _execute_task
    result = task_copy.execute(context=context)
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/microsoft/azure/operators/azure_container_instances.py", line 202, in execute
    self._ci_hook = AzureContainerInstanceHook(self.ci_conn_id)
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/microsoft/azure/hooks/azure_container_instance.py", line 45, in __init__
    super().__init__(sdk_client=ContainerInstanceManagementClient, *args, **kwargs)
TypeError: __init__() got multiple values for argument 'sdk_client'
```




### What you expected to happen

_No response_

### How to reproduce

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)



Discussion:
Thanks for opening your first issue here! Be sure to follow the issue template!

@binhnefits assigned to you
@binhnefits are you still working on this issue?
I can also help with this one.
We are facing the same issue.

Would be great if this could be fixed.



Resolving patch:
diff --git a/airflow/providers/microsoft/azure/operators/container_instances.py b/airflow/providers/microsoft/azure/operators/container_instances.py
--- a/airflow/providers/microsoft/azure/operators/container_instances.py
+++ b/airflow/providers/microsoft/azure/operators/container_instances.py
@@ -199,7 +199,7 @@ def execute(self, context: dict) -> int:
         # Check name again in case it was templated.
         self._check_name(self.name)
 
-        self._ci_hook = AzureContainerInstanceHook(self.ci_conn_id)
+        self._ci_hook = AzureContainerInstanceHook(conn_id=self.ci_conn_id)
 
         if self.fail_if_exists:
             self.log.info("Testing if container group already exists")


Test patch: