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 ID of a certificate use a CertificateService.List request.

view : CertificateView​

The output type of the certificate.

Certificate​

A certificate. For details about the concept, see documentation.

Status​

  • STATUS_UNSPECIFIED

  • VALIDATING

    The certificate domains validation are required. Used only for managed certificates.

  • INVALID

    The certificate issuance is failed. Used only for managed certificates.

  • ISSUED

    The certificate is issued.

  • REVOKED

    The certificate is revoked.

  • RENEWING

    The certificate renewal is started. Used only for managed certificates.

  • RENEWAL_FAILED

    The certificate renewal is failed. Used only for managed certificates.

id : string​

ID of the certificate. Generated at creation time.

folderId : string​

ID of the folder that the certificate belongs to.

createdAt : google.protobuf.Timestamp​

Creation timestamp.

name : string​

Name of the certificate. The name is unique within the folder.

description : string​

Description of the certificate.

labels : string​

Certificate labels as key:value pairs.

type : CertificateType​

Type of the certificate.

domains : string​

Fully qualified domain names of the certificate.

status : Status​

Status of the certificate.

issuer : string​

Distinguished Name of the certificate authority that issued the certificate.

subject : string​

Distinguished Name of the entity that is associated with the public key contained in the certificate.

serial : string​

Serial number of the certificate.

updatedAt : google.protobuf.Timestamp​

Time when the certificate is updated.

issuedAt : google.protobuf.Timestamp​

Time when the certificate is issued.

notAfter : google.protobuf.Timestamp​

Time after which the certificate is not valid.

notBefore : google.protobuf.Timestamp​

Time before which the certificate is not valid.

challenges : Challenge​

Domains validation challenges of the certificate. Used only for managed certificates.

deletionProtection : bool​

Flag that protects deletion of the certificate

incompleteChain : bool​

Mark imported certificates without uploaded chain or with chain which not lead to root certificate

Challenge​

Domain validation challenge.

Status​
  • STATUS_UNSPECIFIED

  • PENDING

    The challenge is waiting to be completed.

  • PROCESSING

    The challenge is awaiting approval from Let's Encrypt.

  • VALID

    The challenge is complete.

  • INVALID

    The rights check for a specific domain failed or the one-week period allocated for the check expired.

DnsRecord​
name : string​

Name of the DNS record.

type : string​

Type of the DNS-record.

value : string​

Value of the DNS-record.

HttpFile​
url : string​

Location of the HTTP file.

content : string​

Content of the HTTP file.

domain : string​

Domain of the challenge.

type : ChallengeType​

Type of the challenge.

createdAt : google.protobuf.Timestamp​

Time when the challenge is created.

updatedAt : google.protobuf.Timestamp​

Time when the challenge is updated.

status : Status​

Status of the challenge.

message : string​

Description of the challenge.

error : string​

Error of the challenge.

One of challenge​

Data of the challenge.

  • dnsChallenge : DnsRecord​

    DNS-record.

  • httpChallenge : HttpFile​

    HTTP-file.

DnsRecord​

name : string​

Name of the DNS record.

type : string​

Type of the DNS-record.

value : string​

Value of the DNS-record.

HttpFile​

url : string​

Location of the HTTP file.

content : string​

Content of the HTTP file.