ListVersions
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.certificatemanager.v1.certificate_service_pb2_grpc import CertificateServiceStub
from yandex.cloud.certificatemanager.v1.certificate_service_pb2 import ListVersionsRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(CertificateServiceStub)
response = service.ListVersions(
ListVersionsRequest(
certificate_id="certificateId",
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
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.