Skip to main content

Get

Returns the specified certificate.

To get the list of available certificates, make a List request.

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

const CertificateView =
cloudApi.certificatemanager.certificate_service.CertificateView;
const GetCertificateRequest =
cloudApi.certificatemanager.certificate_service.GetCertificateRequest;

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

const result = await client.get(
GetCertificateRequest.fromPartial({
certificateId: "certificateId",
// view: CertificateView.FULL
})
);
console.log(result);
})();

GetCertificateRequest

certificateId : string

ID of the certificate to return. To get the certificate ID, make a CertificateService.List request.

Certificate

A certificate.

id : string

ID of the certificate.

federationId : string

ID of the federation that the certificate belongs to.

name : string

Name of the certificate.

description : string

Description of the certificate.

createdAt : google.protobuf.Timestamp

Creation timestamp.

data : string

Certificate data in PEM format.