Skip to content

ComputeVolumes ​

Overview ​

Available Operations ​

listStandaloneVolumes ​

List organization volumes

Example Usage ​

typescript
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:

typescript
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.

tsx
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 ​

ParameterTypeRequiredDescription
requestoperations.ListStandaloneVolumesRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖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.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.ListStandaloneVolumesResponse>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

createStandaloneVolume ​

Create a standalone shared volume

Example Usage ​

typescript
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:

typescript
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.

tsx
import {
  // Mutation hook for triggering the API call.
  useComputeVolumesCreateStandaloneVolumeMutation
} from "@meetkai/mka1/react-query/computeVolumesCreateStandaloneVolume.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.CreateStandaloneVolumeRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖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.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.CreateStandaloneVolumeResponse>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

deleteStandaloneVolume ​

Deletion bypasses tenant enablement and budget gates, but is refused while non-terminal attachments exist.

Example Usage ​

typescript
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:

typescript
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.

tsx
import {
  // Mutation hook for triggering the API call.
  useComputeVolumesDeleteStandaloneVolumeMutation
} from "@meetkai/mka1/react-query/computeVolumesDeleteStandaloneVolume.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.DeleteStandaloneVolumeRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖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.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.DeleteStandaloneVolumeResponse>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

getStandaloneVolume ​

Get a standalone volume

Example Usage ​

typescript
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:

typescript
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.

tsx
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 ​

ParameterTypeRequiredDescription
requestoperations.GetStandaloneVolumeRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖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.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.GetStandaloneVolumeResponse>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*

listStandaloneVolumeAttachments ​

List volume attachments

Example Usage ​

typescript
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:

typescript
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.

tsx
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 ​

ParameterTypeRequiredDescription
requestoperations.ListStandaloneVolumeAttachmentsRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖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.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.ListStandaloneVolumeAttachmentsResponse>

Errors ​

Error TypeStatus CodeContent Type
errors.APIError4XX, 5XX*/*