TLS Certificates#
Do not construct this object directly, instead access the
tls_certificates property of an ngrok.Client object.
- class ngrok.services.TLSCertificatesClient(client)[source]#
TLS Certificates are pairs of x509 certificates and their matching private key that can be used to terminate TLS traffic. TLS certificates are unused until they are attached to a Domain. TLS Certificates may also be provisioned by ngrok automatically for domains on which you have enabled automated certificate provisioning.
- create(certificate_pem, private_key_pem, description='', metadata='')[source]#
Upload a new TLS certificate
- Parameters:
description (
str) – human-readable description of this TLS certificate. optional, max 255 bytes.metadata (
str) – arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes.certificate_pem (
str) – chain of PEM-encoded certificates, leaf first. See Certificate Bundles.private_key_pem (
str) – private key for the TLS certificate, PEM-encoded. See Private Keys.
https://ngrok.com/docs/api#api-tls-certificates-create
- Return type:
- get(id)[source]#
Get detailed information about a TLS certificate
- Parameters:
id (
str) – a resource identifier
https://ngrok.com/docs/api#api-tls-certificates-get
- Return type:
- list(before_id=None, limit=None, filter=None)[source]#
List all TLS certificates on this account
- Parameters:
before_id (
str) – Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID.limit (
str) – Constrains the number of results in the dataset. See the API Overview for details.filter (
str) – A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such asid,metadata,created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering.
https://ngrok.com/docs/api#api-tls-certificates-list
- Return type:
- update(id, description=None, metadata=None)[source]#
Update attributes of a TLS Certificate by ID
- Parameters:
id (
str) –description (
str) – human-readable description of this TLS certificate. optional, max 255 bytes.metadata (
str) – arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes.
https://ngrok.com/docs/api#api-tls-certificates-update
- Return type: