Endpoints#
Do not construct this object directly, instead access the
endpoints
property of an ngrok.Client
object.
- class ngrok.services.EndpointsClient(client)[source]#
Endpoints provides an API for querying the endpoint objects which define what tunnel or edge is used to serve a hostport. Only active endpoints associated with a tunnel or backend are returned.
- create(url, type, traffic_policy, description=None, metadata=None, bindings=None, pooling_enabled=False)[source]#
Create an endpoint, currently available only for cloud endpoints
- Parameters:
url (
str
) – the url of the endpointtype (
str
) – Type of endpoint. Only ‘cloud’ is currently supported (represents a cloud endpoint). Defaults to ‘cloud’ if not specified.traffic_policy (
str
) – The traffic policy attached to this endpointdescription (
str
) – user-supplied description of the associated tunnelmetadata (
str
) – user-supplied metadata of the associated tunnel or edge objectbindings (
Sequence
[str
]) – the bindings associated with this endpointpooling_enabled (
bool
) –
https://ngrok.com/docs/api#api-endpoints-create
- Return type:
- delete(id)[source]#
Delete an Endpoint by ID, currently available only for cloud endpoints
- Parameters:
id (
str
) – a resource identifier
- get(id)[source]#
Get the status of an endpoint by ID
- Parameters:
id (
str
) – a resource identifier
https://ngrok.com/docs/api#api-endpoints-get
- Return type:
- list(before_id=None, limit=None)[source]#
List all active endpoints on the account
- Parameters:
before_id (
str
) –limit (
str
) –
https://ngrok.com/docs/api#api-endpoints-list
- Return type:
- update(id, url=None, traffic_policy=None, description=None, metadata=None, bindings=None, pooling_enabled=False)[source]#
Update an Endpoint by ID, currently available only for cloud endpoints
- Parameters:
id (
str
) – unique endpoint resource identifierurl (
str
) – the url of the endpointtraffic_policy (
str
) – The traffic policy attached to this endpointdescription (
str
) – user-supplied description of the associated tunnelmetadata (
str
) – user-supplied metadata of the associated tunnel or edge objectbindings (
Sequence
[str
]) – the bindings associated with this endpointpooling_enabled (
bool
) –
https://ngrok.com/docs/api#api-endpoints-update
- Return type: