# The `etcd3gw.lease` Module

class etcd3gw.lease.Lease(id, client=None)

  Bases: `object`

  keys()

    Get the keys associated with this lease.

    Returns:

  refresh()

    LeaseKeepAlive keeps the lease alive

    By streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client. This method makes a synchronous HTTP request by default.

    Returns:

      returns new TTL for lease. If lease was already expired then TTL field is absent in response and the function returns -1 according to etcd documentation. https://etcd.io/docs/v3.5/dev-guide/apispec/swagger/rpc.swagger.json

  revoke()

    LeaseRevoke revokes a lease.

    All keys attached to the lease will expire and be deleted. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

    Returns:

  ttl()

    LeaseTimeToLive retrieves lease information.

    This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

    Returns:

this page last updated: 2024-12-19 09:58:08

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.