ByCloud Docs
GuidesCLIAPISDK

JavaScript SDK

Certificates

TLS certificate management with automatic ACME issuance and load balancer integration

11 methods

GET

listCertificates()

List certificates

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

status

string

- Filter by certificate status

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.listCertificates();
console.log(result);
POST

createCertificate()

Create certificate

Parameters

name

string

required

- Name of the certificate

type

string

required
domains

array

- List of domains for ACME certificate (supports multi-domain and wildcard certs)

certificate

string

- PEM-encoded certificate (required when type is 'uploaded')

private_key

string

- PEM-encoded private key (required when type is 'uploaded')

chain

string

- PEM-encoded certificate chain (optional for uploaded certificates)

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.createCertificate({
name: "my-certificate",
type: "acme"
});
console.log(result);
GET

getCertificate()

Get certificate

Parameters

certificate_id

string

required

- Certificate ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.getCertificate({
certificate_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteCertificate()

Delete certificate

Parameters

certificate_id

string

required

- Certificate ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.deleteCertificate({
certificate_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listBindings()

List certificate bindings

Parameters

certificate_id

string

required

- Certificate ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.listBindings({
certificate_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
POST

createBinding()

Create certificate binding

Parameters

certificate_id

string

required

- Certificate ID

resource_type

string

required

- The type of resource to bind the certificate to

resource_id

string

required

- The ID of the resource to bind to

options

object

- Binding options

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.createBinding({
certificate_id: "550e8400-e29b-41d4-a716-446655440000",
resource_type: "octavia:listener",
resource_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

getBinding()

Get certificate binding

Parameters

certificate_id

string

required

- Certificate ID

binding_id

string

required

- Certificate Binding ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.getBinding({
certificate_id: "550e8400-e29b-41d4-a716-446655440000",
binding_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteBinding()

Delete certificate binding

Parameters

certificate_id

string

required

- Certificate ID

binding_id

string

required

- Certificate Binding ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.deleteBinding({
certificate_id: "550e8400-e29b-41d4-a716-446655440000",
binding_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
POST

renewCertificate()

Renew certificate

Parameters

certificate_id

string

required

- Certificate ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.renewCertificate({
certificate_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
POST

validateCertificate()

Validate certificate DNS

Parameters

certificate_id

string

required

- Certificate ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.validateCertificate({
certificate_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listListenerCertificates()

List listener certificates

Parameters

load_balancer_id

string

required

- Load Balancer ID

listener_id

string

required

- Listener ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.certificates.listListenerCertificates({
load_balancer_id: "550e8400-e29b-41d4-a716-446655440000",
listener_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);