blob: 3a914945f6326c2efdd2138df46190bf1bd3cf0d [file] [log] [blame]
:mod:`airflow.providers.microsoft.winrm.operators.winrm`
========================================================
.. py:module:: airflow.providers.microsoft.winrm.operators.winrm
Module Contents
---------------
.. py:class:: WinRMOperator(*, winrm_hook: Optional[WinRMHook] = None, ssh_conn_id: Optional[str] = None, remote_host: Optional[str] = None, command: Optional[str] = None, ps_path: Optional[str] = None, output_encoding: str = 'utf-8', timeout: int = 10, **kwargs)
Bases: :class:`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
:type winrm_hook: airflow.providers.microsoft.winrm.hooks.winrm.WinRMHook
:param ssh_conn_id: connection id from airflow Connections
:type ssh_conn_id: str
:param remote_host: remote host to connect
:type remote_host: str
:param command: command to execute on remote host. (templated)
:type command: str
:param ps_path: path to powershell, `powershell` for v5.1- and `pwsh` for v6+.
If specified, it will execute the command as powershell script.
:type ps_path: str
:param output_encoding: the encoding used to decode stout and stderr
:type output_encoding: str
:param timeout: timeout for executing the command.
:type timeout: int
.. attribute:: template_fields
:annotation: = ['command']
.. attribute:: template_fields_renderers
.. method:: execute(self, context: dict)