ComputeVolumes
Overview
Available Operations
- listStandaloneVolumes - List organization volumes
- createStandaloneVolume - Create a standalone shared volume
- deleteStandaloneVolume - Permanently delete a standalone volume
- getStandaloneVolume - Get a standalone volume
- listStandaloneVolumeAttachments - List volume attachments
listStandaloneVolumes
List organization volumes
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeVolumes.listStandaloneVolumes({});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeVolumesListStandaloneVolumes } from "@meetkai/mka1/funcs/computeVolumesListStandaloneVolumes.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 computeVolumesListStandaloneVolumes(sdk, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeVolumesListStandaloneVolumes 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.
useComputeVolumesListStandaloneVolumes,
useComputeVolumesListStandaloneVolumesSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchComputeVolumesListStandaloneVolumes,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateComputeVolumesListStandaloneVolumes,
invalidateAllComputeVolumesListStandaloneVolumes,
} from "@meetkai/mka1/react-query/computeVolumesListStandaloneVolumes.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListStandaloneVolumesRequest | ✔️ | 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.ListStandaloneVolumesResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
createStandaloneVolume
Create a standalone shared volume
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeVolumes.createStandaloneVolume({
idempotencyKey: "<value>",
computeStandaloneVolumeCreate: {
name: "<value>",
},
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeVolumesCreateStandaloneVolume } from "@meetkai/mka1/funcs/computeVolumesCreateStandaloneVolume.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 computeVolumesCreateStandaloneVolume(sdk, {
idempotencyKey: "<value>",
computeStandaloneVolumeCreate: {
name: "<value>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeVolumesCreateStandaloneVolume 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.
useComputeVolumesCreateStandaloneVolumeMutation
} from "@meetkai/mka1/react-query/computeVolumesCreateStandaloneVolume.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.CreateStandaloneVolumeRequest | ✔️ | 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.CreateStandaloneVolumeResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
deleteStandaloneVolume
Deletion bypasses tenant enablement and budget gates, but is refused while non-terminal attachments exist.
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeVolumes.deleteStandaloneVolume({
id: "<id>",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeVolumesDeleteStandaloneVolume } from "@meetkai/mka1/funcs/computeVolumesDeleteStandaloneVolume.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 computeVolumesDeleteStandaloneVolume(sdk, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeVolumesDeleteStandaloneVolume 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.
useComputeVolumesDeleteStandaloneVolumeMutation
} from "@meetkai/mka1/react-query/computeVolumesDeleteStandaloneVolume.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteStandaloneVolumeRequest | ✔️ | 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.DeleteStandaloneVolumeResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
getStandaloneVolume
Get a standalone volume
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeVolumes.getStandaloneVolume({
id: "<id>",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeVolumesGetStandaloneVolume } from "@meetkai/mka1/funcs/computeVolumesGetStandaloneVolume.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 computeVolumesGetStandaloneVolume(sdk, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeVolumesGetStandaloneVolume 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.
useComputeVolumesGetStandaloneVolume,
useComputeVolumesGetStandaloneVolumeSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchComputeVolumesGetStandaloneVolume,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateComputeVolumesGetStandaloneVolume,
invalidateAllComputeVolumesGetStandaloneVolume,
} from "@meetkai/mka1/react-query/computeVolumesGetStandaloneVolume.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetStandaloneVolumeRequest | ✔️ | 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.GetStandaloneVolumeResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
listStandaloneVolumeAttachments
List volume attachments
Example Usage
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.computeVolumes.listStandaloneVolumeAttachments({
id: "<id>",
});
console.log(result);
}
run();Standalone function
The standalone function version of this method:
import { SDKCore } from "@meetkai/mka1/core.js";
import { computeVolumesListStandaloneVolumeAttachments } from "@meetkai/mka1/funcs/computeVolumesListStandaloneVolumeAttachments.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 computeVolumesListStandaloneVolumeAttachments(sdk, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("computeVolumesListStandaloneVolumeAttachments 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.
useComputeVolumesListStandaloneVolumeAttachments,
useComputeVolumesListStandaloneVolumeAttachmentsSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchComputeVolumesListStandaloneVolumeAttachments,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateComputeVolumesListStandaloneVolumeAttachments,
invalidateAllComputeVolumesListStandaloneVolumeAttachments,
} from "@meetkai/mka1/react-query/computeVolumesListStandaloneVolumeAttachments.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListStandaloneVolumeAttachmentsRequest | ✔️ | 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.ListStandaloneVolumeAttachmentsResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |