IP Whitelist¶
Do not construct this object directly, instead access the
ip_whitelist property of an ngrok.Client object.
-
class
ngrok.services.IPWhitelistClient(client)[source]¶ -
create(description='', metadata='', ip_net='')[source]¶ Create a new IP whitelist entry that will restrict traffic to all tunnel endpoints on the account.
- Parameters
description (
str) – human-readable description of the source IPs for this IP whitelist entry. optional, max 255 bytes.metadata (
str) – arbitrary user-defined machine-readable data of this IP whitelist entry. optional, max 4096 bytes.ip_net (
str) – an IP address or IP network range in CIDR notation (e.g. 10.1.1.1 or 10.1.0.0/16) of addresses that will be whitelisted to communicate with your tunnel endpoints
https://ngrok.com/docs/api#api-ip-whitelist-create
- Return type
-
get(id)[source]¶ Get detailed information about an IP whitelist entry by ID.
- Parameters
id (
str) – a resource identifier
https://ngrok.com/docs/api#api-ip-whitelist-get
- Return type
-
list(before_id=None, limit=None)[source]¶ List all IP whitelist entries on this account
- Parameters
before_id (
Optional[str]) –limit (
Optional[str]) –
https://ngrok.com/docs/api#api-ip-whitelist-list
- Return type
-
update(id, description=None, metadata=None)[source]¶ Update attributes of an IP whitelist entry by ID
- Parameters
id (
str) –description (
Optional[str]) – human-readable description of the source IPs for this IP whitelist entry. optional, max 255 bytes.metadata (
Optional[str]) – arbitrary user-defined machine-readable data of this IP whitelist entry. optional, max 4096 bytes.
https://ngrok.com/docs/api#api-ip-whitelist-update
- Return type
-