@rhoas/kafka-instance-sdk
v1.0.3
Published
RHOAS Kafka Instance Adminstration SDK
Downloads
22
Readme
Kafka Instance Admin SDK
RHOAS Kafka Instance Admin SDK TypeScript SDK Provides SDK for interacting with Kafka instances
NOTE: This SDK requires different authentication than management APIs
Getting Started
Install Package
npm install @rhoas/kafka-instance-sdk --save
Usage
import { Configuration, DefaultApi } from "@rhoas/kafka-instance-sdk";
const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://api.openshift.com";
const apiConfig = new Configuration({
accessToken,
basePath,
});
const kafkaInstance = new DefaultApi(apiConfig)
kafkaInstance.getTopics().then((data) => {
console.log(data?.data)
}).catch((err) => {
console.error(err.message)
})
See ./examples for full example