| :py:mod:`airflow.providers.google.cloud.hooks.os_login` |
| ======================================================= |
| |
| .. py:module:: airflow.providers.google.cloud.hooks.os_login |
| |
| .. autoapi-nested-parse:: |
| |
| .. spelling:: |
| |
| ImportSshPublicKeyResponse |
| oslogin |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.hooks.os_login.OSLoginHook |
| |
| |
| |
| |
| .. py:class:: OSLoginHook(gcp_conn_id = 'google_cloud_default', delegate_to = None, impersonation_chain = None) |
| |
| Bases: :py:obj:`airflow.providers.google.common.hooks.base_google.GoogleBaseHook` |
| |
| Hook for Google OS login APIs. |
| |
| All the methods in the hook where project_id is used must be called with |
| keyword arguments rather than positional. |
| |
| .. py:method:: get_conn(self) |
| |
| Return OS Login service client |
| |
| |
| .. py:method:: import_ssh_public_key(self, user, ssh_public_key, project_id = PROVIDE_PROJECT_ID, retry = DEFAULT, timeout = None, metadata = ()) |
| |
| Adds an SSH public key and returns the profile information. Default POSIX |
| account information is set when no username and UID exist as part of the |
| login profile. |
| |
| :param user: The unique ID for the user |
| :param ssh_public_key: The SSH public key and expiration time. |
| :param project_id: The project ID of the Google Cloud project. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will |
| be retried using a default configuration. |
| :param timeout: The amount of time, in seconds, to wait for the request to complete. Note that |
| if ``retry`` is specified, the timeout applies to each individual attempt. |
| :param metadata: Additional metadata that is provided to the method. |
| :return: A :class:`~google.cloud.oslogin_v1.ImportSshPublicKeyResponse` instance. |
| |
| |
| |