Skip to main content

ListCertificates

Retrieves the list of device certificates for the specified device.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ListDeviceCertificatesRequest =
cloudApi.iot.devices_device_service.ListDeviceCertificatesRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.DeviceServiceClient);

const result = await client.listCertificates(
ListDeviceCertificatesRequest.fromPartial({
deviceId: "deviceId",
})
);
console.log(result);
})();

ListDeviceCertificatesRequest

deviceId : string

ID of the device to list certificates for.

ListDeviceCertificatesResponse

certificates : DeviceCertificate

List of certificates for the specified device.

DeviceCertificate

A device certificate. For more information, see Managing device certificates.

deviceId : string

ID of the device that the certificate belongs to.

fingerprint : string

SHA256 hash of the certificate.

certificateData : string

Public part of the certificate.

createdAt : google.protobuf.Timestamp

Creation timestamp.