Reserved Domains#
Do not construct this object directly, instead access the
reserved_domains
property of an ngrok.Client
object.
- class ngrok.services.ReservedDomainsClient(client)[source]#
Reserved Domains are hostnames that you can listen for traffic on. Domains can be used to listen for http, https or tls traffic. You may use a domain that you own by creating a CNAME record specified in the returned resource. This CNAME record points traffic for that domain to ngrok’s edge servers.
- create(domain='', region='', description='', metadata='', certificate_id=None, certificate_management_policy=None)[source]#
Create a new reserved domain.
- Parameters:
domain (
str
) – hostname of the reserved domainregion (
str
) – deprecated: With the launch of the ngrok Global Network domains traffic is now handled globally. This field applied only to endpoints. Note that agents may still connect to specific regions. Optional, null by default. (au, eu, ap, us, jp, in, sa)description (
str
) – human-readable description of what this reserved domain will be used formetadata (
str
) – arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes.certificate_id (
str
) – ID of a user-uploaded TLS certificate to use for connections to targeting this domain. Optional, mutually exclusive withcertificate_management_policy
.certificate_management_policy (
ReservedDomainCertPolicy
) – configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional, mutually exclusive withcertificate_id
.
https://ngrok.com/docs/api#api-reserved-domains-create
- Return type:
- delete_certificate(id)[source]#
Detach the certificate attached to a reserved domain.
- Parameters:
id (
str
) – a resource identifier
https://ngrok.com/docs/api#api-reserved-domains-delete-certificate
- delete_certificate_management_policy(id)[source]#
Detach the certificate management policy attached to a reserved domain.
- Parameters:
id (
str
) – a resource identifier
https://ngrok.com/docs/api#api-reserved-domains-delete-certificate-management-policy
- get(id)[source]#
Get the details of a reserved domain.
- Parameters:
id (
str
) – a resource identifier
https://ngrok.com/docs/api#api-reserved-domains-get
- Return type:
- list(before_id=None, limit=None)[source]#
List all reserved domains on this account.
- Parameters:
before_id (
str
) –limit (
str
) –
https://ngrok.com/docs/api#api-reserved-domains-list
- Return type:
- update(id, description=None, metadata=None, certificate_id=None, certificate_management_policy=None)[source]#
Update the attributes of a reserved domain.
- Parameters:
id (
str
) –description (
str
) – human-readable description of what this reserved domain will be used formetadata (
str
) – arbitrary user-defined machine-readable data of this reserved domain. Optional, max 4096 bytes.certificate_id (
str
) – ID of a user-uploaded TLS certificate to use for connections to targeting this domain. Optional, mutually exclusive withcertificate_management_policy
.certificate_management_policy (
ReservedDomainCertPolicy
) – configuration for automatic management of TLS certificates for this domain, or null if automatic management is disabled. Optional, mutually exclusive withcertificate_id
.
https://ngrok.com/docs/api#api-reserved-domains-update
- Return type: