ListCertificates
Retrieves the list of broker certificates for the specified broker.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListBrokerCertificatesRequest =
cloudApi.iot.broker_broker_service.ListBrokerCertificatesRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.BrokerServiceClient);
const result = await client.listCertificates(
ListBrokerCertificatesRequest.fromPartial({
brokerId: "brokerId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.iot.broker.v1.broker_service_pb2_grpc import BrokerServiceStub
from yandex.cloud.iot.broker.v1.broker_service_pb2 import ListBrokerCertificatesRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(BrokerServiceStub)
response = service.ListCertificates(ListBrokerCertificatesRequest(broker_id="brokerId"))
print(response)
ListBrokerCertificatesRequest
brokerId
: string
ID of the broker to list certificates for.
ListBrokerCertificatesResponse
certificates
: BrokerCertificate
List of certificates for the specified broker.
BrokerCertificate
A broker certificate.
brokerId
: string
ID of the broker that the certificate belongs to.
fingerprint
: string
SHA256 hash of the certificates.
certificateData
: string
Public part of the certificate.
createdAt
: google.protobuf.Timestamp
Creation timestamp.