Skip to main content

ListVersions

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

const ListVersionsRequest =
cloudApi.certificatemanager.certificate_service.ListVersionsRequest;

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

const result = await client.listVersions(
ListVersionsRequest.fromPartial({
certificateId: "certificateId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();

ListVersionsRequest

certificateId : string

ID of the certificate to list versions for.

pageSize : int64

Page token. To get the next page of results, set page_token to the ListCertificatesResponse.next_page_token returned by a previous list request.

pageToken : string

Page token. To get the next page of results, set page_token to the ListCertificatesResponse.next_page_token returned by a previous list request.

ListVersionsResponse

versions : Version

List of versions for the specified certificate.

nextPageToken : string

This token allows you to get the next page of results for list requests. If the number of results is greater than the specified ListCertificatesRequest.page_size, use the next_page_token as the value for the ListCertificatesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

Version

A certificate version

id : string

ID of the version.

certificateId : string

ID of the certificate that the version belongs to.

createdAt : google.protobuf.Timestamp

Time when the version was created.