Socket
Book a DemoInstallSign in
Socket

@rhoas/kafka-management-sdk

Package Overview
Dependencies
Maintainers
5
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhoas/kafka-management-sdk

RHOAS Kafka Management SDK

Source
npmnpm
Version
1.0.2-beta1
Version published
Maintainers
5
Created
Source

Kafka Management SDK

RHOAS Kafka Management TypeScript/JavaScript SDK

Getting Started

Install Package

npm install @rhoas/kafka-management-sdk --save

Usage

import { Configuration, DefaultApi, getErrorCode, isServiceApiError, APIErrorCodes } from "@rhoas/kafka-management-sdk";

const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://api.openshift.com";

const apiConfig = new Configuration({
  accessToken,
  basePath,
});

const kafkaApi = new DefaultApi(apiConfig);

kafkaApi
  .getKafkas()
  .then((data) => {
    console.log(data?.data.items);
  })
  .catch((err) => {
    if(isServiceApiError(err)){
        console.error("Validation issue", getErrorCode(err) == APIErrorCodes.ERROR_8)
    }
  });

See ./examples for full example

Service Accounts SDK

SDK will help you to create Service Account to Access Kafka and other services

NOTE: This SDK is currently included into Kafka SDK as Alpha feature. It will be moved out of the SDK in near future.

See ./examples for full example

Keywords

rhoas

FAQs

Package last updated on 27 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts