| :py:mod:`airflow.providers.google.cloud.hooks.compute_ssh` |
| ========================================================== |
| |
| .. py:module:: airflow.providers.google.cloud.hooks.compute_ssh |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.hooks.compute_ssh.ComputeEngineSSHHook |
| |
| |
| |
| |
| .. py:class:: ComputeEngineSSHHook(gcp_conn_id = 'google_cloud_default', instance_name = None, zone = None, user = 'root', project_id = None, hostname = None, use_internal_ip = False, use_iap_tunnel = False, use_oslogin = True, expire_time = 300, delegate_to = None) |
| |
| Bases: :py:obj:`airflow.providers.ssh.hooks.ssh.SSHHook` |
| |
| Hook to connect to a remote instance in compute engine |
| |
| :param instance_name: The name of the Compute Engine instance |
| :param zone: The zone of the Compute Engine instance |
| :param user: The name of the user on which the login attempt will be made |
| :param project_id: The project ID of the remote instance |
| :param gcp_conn_id: The connection id to use when fetching connection info |
| :param hostname: The hostname of the target instance. If it is not passed, it will be detected |
| automatically. |
| :param use_iap_tunnel: Whether to connect through IAP tunnel |
| :param use_internal_ip: Whether to connect using internal IP |
| :param use_oslogin: Whether to manage keys using OsLogin API. If false, |
| keys are managed using instance metadata |
| :param expire_time: The maximum amount of time in seconds before the private key expires |
| :param gcp_conn_id: The connection id to use when fetching connection information |
| :param delegate_to: The account to impersonate, if any. |
| For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = gcp_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = google_cloud_ssh_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = gcpssh |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = Google Cloud SSH |
| |
| |
| |
| .. py:method:: get_ui_field_behaviour() |
| :staticmethod: |
| |
| Returns custom field behaviour |
| |
| |
| .. py:method:: get_conn() |
| |
| Return SSH connection. |
| |
| |
| |