| :py:mod:`airflow.providers.microsoft.winrm.operators.winrm` |
| =========================================================== |
| |
| .. py:module:: airflow.providers.microsoft.winrm.operators.winrm |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.microsoft.winrm.operators.winrm.WinRMOperator |
| |
| |
| |
| |
| .. py:class:: WinRMOperator(*, winrm_hook = None, ssh_conn_id = None, remote_host = None, command = None, ps_path = None, output_encoding = 'utf-8', timeout = 10, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| WinRMOperator to execute commands on given remote host using the winrm_hook. |
| |
| :param winrm_hook: predefined ssh_hook to use for remote execution |
| :param ssh_conn_id: connection id from airflow Connections |
| :param remote_host: remote host to connect |
| :param command: command to execute on remote host. (templated) |
| :param ps_path: path to powershell, `powershell` for v5.1- and `pwsh` for v6+. |
| If specified, it will execute the command as powershell script. |
| :param output_encoding: the encoding used to decode stout and stderr |
| :param timeout: timeout for executing the command. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['command'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |