Types
CertificateSortOption = enum sortId = "id", sortIdAsc = "id:asc", sortIdDesc = "id:desc", sortName = "name", sortNameAsc = "name:asc", sortNameDesc = "name:desc", sortCreated = "created", sortCreatedAsc = "created:asc", sortCreatedDesc = "created:desc"
CertificateTypeOption = enum typeUploaded = "uploaded", typeManaged = "managed"
GetCertificatesIdResponse = object
GetCertificatesResponse = object
PostCertificatesResponse = object
PutCertificatesIdResponse = object
Procs
proc deleteCertificatesId(client: HetznerClient; id: int64): Future[ AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Deletes a Certificate.
proc getCertificates(client: HetznerClient; sort: set[CertificateSortOption] = {}; name: string = default(string); labelSelector: string = default(string); type: set[CertificateTypeOption] = {}): Future[ GetCertificatesResponse] {....stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Returns all Certificate objects.
proc getCertificatesId(client: HetznerClient; id: int64): Future[ GetCertificatesIdResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Gets a specific Certificate object.
proc postCertificates(client: HetznerClient; body: PostCertificatesRequest): Future[ PostCertificatesResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Creates a new Certificate.
The default type uploaded allows for uploading your existing certificate and private_key in PEM format. You have to monitor its expiration date and handle renewal yourself.
In contrast, type managed requests a new Certificate from Let's Encrypt for the specified domain_names. Only domains managed by Hetzner DNS are supported. We handle renewal and timely alert the project owner via email if problems occur.
For type managed Certificates the action key of the response contains the Action that allows for tracking the issuance process. For type uploaded Certificates the action is always null.
proc putCertificatesId(client: HetznerClient; id: int64; body: PutCertificatesIdRequest): Future[ PutCertificatesIdResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Updates the Certificate properties.
Note that when updating labels, the Certificate’s current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.
Note: if the Certificate object changes during the request, the response will be a “conflict” error.