ComputeTenants
Overview
Available Operations
- listComputeTenants - List tenants
- getComputeTenant - Get a tenant
- putComputeTenant - Update a tenant
listComputeTenants
Cluster-administrator-only.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeTenants.listComputeTenants({});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeTenantsListComputeTenants } from "@meetkai/mka1/funcs/computeTenantsListComputeTenants.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await computeTenantsListComputeTenants(sdk, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeTenantsListComputeTenants failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useComputeTenantsListComputeTenants,
useComputeTenantsListComputeTenantsSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchComputeTenantsListComputeTenants,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateComputeTenantsListComputeTenants,
invalidateAllComputeTenantsListComputeTenants,
} from "@meetkai/mka1/react-query/computeTenantsListComputeTenants.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListComputeTenantsRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ListComputeTenantsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
getComputeTenant
Cluster-administrator-only.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeTenants.getComputeTenant({
orgId: "<id>",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeTenantsGetComputeTenant } from "@meetkai/mka1/funcs/computeTenantsGetComputeTenant.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await computeTenantsGetComputeTenant(sdk, {
orgId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeTenantsGetComputeTenant failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useComputeTenantsGetComputeTenant,
useComputeTenantsGetComputeTenantSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchComputeTenantsGetComputeTenant,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateComputeTenantsGetComputeTenant,
invalidateAllComputeTenantsGetComputeTenant,
} from "@meetkai/mka1/react-query/computeTenantsGetComputeTenant.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetComputeTenantRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetComputeTenantResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
putComputeTenant
Cluster-administrator-only idempotent upsert.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeTenants.putComputeTenant({
orgId: "<id>",
computeTenantUpdate: {},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeTenantsPutComputeTenant } from "@meetkai/mka1/funcs/computeTenantsPutComputeTenant.js";
// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await computeTenantsPutComputeTenant(sdk, {
orgId: "<id>",
computeTenantUpdate: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeTenantsPutComputeTenant failed:", res.error);
}
}
run();React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useComputeTenantsPutComputeTenantMutation
} from "@meetkai/mka1/react-query/computeTenantsPutComputeTenant.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.PutComputeTenantRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.PutComputeTenantResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |