Failover Backends#

Do not construct this object directly, instead access the failover_backends property of an ngrok.Client object.

class ngrok.services.FailoverBackendsClient(client)[source]#

A Failover backend defines failover behavior within a list of referenced backends. Traffic is sent to the first backend in the list. If that backend is offline or no connection can be established, ngrok attempts to connect to the next backend in the list until one is successful.

create(description='', metadata='', backends=[])[source]#

Create a new Failover backend

Parameters:
  • description (str) – human-readable description of this backend. Optional

  • metadata (str) – arbitrary user-defined machine-readable data of this backend. Optional

  • backends (Sequence[str]) – the ids of the child backends in order

https://ngrok.com/docs/api#api-failover-backends-create

Return type:

FailoverBackend

delete(id)[source]#

Delete a Failover backend by ID.

Parameters:

id (str) – a resource identifier

https://ngrok.com/docs/api#api-failover-backends-delete

get(id)[source]#

Get detailed information about a Failover backend by ID

Parameters:

id (str) – a resource identifier

https://ngrok.com/docs/api#api-failover-backends-get

Return type:

FailoverBackend

list(before_id=None, limit=None)[source]#

List all Failover backends on this account

Parameters:
  • before_id (str) –

  • limit (str) –

https://ngrok.com/docs/api#api-failover-backends-list

Return type:

FailoverBackendList

update(id, description=None, metadata=None, backends=[])[source]#

Update Failover backend by ID

Parameters:
  • id (str) –

  • description (str) – human-readable description of this backend. Optional

  • metadata (str) – arbitrary user-defined machine-readable data of this backend. Optional

  • backends (Sequence[str]) – the ids of the child backends in order

https://ngrok.com/docs/api#api-failover-backends-update

Return type:

FailoverBackend