# Clusters

## Create NKS Cluster

`client.nks.clusters.create(ClusterCreateParamsbody, RequestOptionsoptions?): Operation`

**post** `/v1/nks/clusters`

Create an NKS Cluster

### Parameters

- `body: ClusterCreateParams`

  - `autoscaling: boolean`

    Whether to enable autoscaling for the Cluster.

  - `kubernetes_version: string`

    Kubernetes version for the Cluster.

  - `name: string`

    Name of the Cluster.

  - `project_id: string`

    Project ID to create the Cluster in.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `vpc_id: string`

    ID of the VPC to use for the Cluster.

  - `tags?: Array<string>`

    Tags to attach to the Cluster.

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.create({
  autoscaling: true,
  kubernetes_version: 'v1.34.4',
  name: 'my-cluster',
  project_id: '123e4567-e89b-12d3-a456-426614174000',
  region: 'us-sva-2',
  vpc_id: '123e4567-e89b-12d3-a456-426614174000',
});

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Get NKS Cluster Details

`client.nks.clusters.get(stringclusterID, RequestOptionsoptions?): NKSCluster`

**get** `/v1/nks/clusters/{cluster_id}`

Get details about an NKS cluster

### Parameters

- `clusterID: string`

### Returns

- `NKSCluster`

  NKS Cluster details.

  - `id: string`

    Unique identifier for the Cluster.

  - `autoscaling: boolean`

    Whether autoscaling is enabled for the Cluster.

  - `created_at: string`

    When the Cluster was created.

  - `kubernetes_version: string`

    Kubernetes version of the Cluster.

  - `name: string`

    Name of the Cluster.

  - `pool_ids: Array<string>`

    IDs of pools belonging to this Cluster.

  - `private_ip: string`

    Private IP (VIP) of the Cluster.

  - `project_id: string`

    Project ID the Cluster belongs to.

  - `public_ip: string`

    Public IP of the Cluster.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `tags: Array<string>`

    Tags attached to the Cluster.

  - `updated_at: string`

    When the Cluster was last updated.

  - `vpc_id: string`

    ID of the VPC the Cluster is in.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksCluster = await client.nks.clusters.get('cluster_id');

console.log(nksCluster.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "autoscaling": true,
  "created_at": "2025-01-01T00:00:00Z",
  "kubernetes_version": "v1.34.4",
  "name": "my-cluster",
  "pool_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "private_ip": "10.0.0.254",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "public_ip": "198.51.100.1",
  "region": "us-sva-2",
  "status": "ready",
  "tags": [
    "production",
    "ethereum"
  ],
  "updated_at": "2025-01-01T00:00:00Z",
  "vpc_id": "123e4567-e89b-12d3-a456-426614174000"
}
```

## Update NKS Cluster

`client.nks.clusters.update(stringclusterID, ClusterUpdateParamsbody, RequestOptionsoptions?): Operation`

**patch** `/v1/nks/clusters/{cluster_id}`

Update an NKS cluster

### Parameters

- `clusterID: string`

- `body: ClusterUpdateParams`

  - `autoscaling?: boolean`

    Whether to enable autoscaling for the Cluster.

  - `name?: string`

    Name of the Cluster.

  - `tags?: Array<string>`

    Tags to attach to the Cluster.

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.update('cluster_id');

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Delete NKS Cluster

`client.nks.clusters.delete(stringclusterID, RequestOptionsoptions?): Operation`

**delete** `/v1/nks/clusters/{cluster_id}`

Delete an NKS cluster

### Parameters

- `clusterID: string`

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.delete('cluster_id');

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Clusters

`client.nks.clusters.list(ClusterListParamsquery, RequestOptionsoptions?): Cursor<NKSCluster>`

**get** `/v1/nks/clusters`

List all NKS clusters

### Parameters

- `query: ClusterListParams`

  - `project_id: string`

    Project ID of resources to request

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `NKSCluster`

  NKS Cluster details.

  - `id: string`

    Unique identifier for the Cluster.

  - `autoscaling: boolean`

    Whether autoscaling is enabled for the Cluster.

  - `created_at: string`

    When the Cluster was created.

  - `kubernetes_version: string`

    Kubernetes version of the Cluster.

  - `name: string`

    Name of the Cluster.

  - `pool_ids: Array<string>`

    IDs of pools belonging to this Cluster.

  - `private_ip: string`

    Private IP (VIP) of the Cluster.

  - `project_id: string`

    Project ID the Cluster belongs to.

  - `public_ip: string`

    Public IP of the Cluster.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `tags: Array<string>`

    Tags attached to the Cluster.

  - `updated_at: string`

    When the Cluster was last updated.

  - `vpc_id: string`

    ID of the VPC the Cluster is in.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {
  console.log(nksCluster.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "autoscaling": true,
      "created_at": "2025-01-01T00:00:00Z",
      "kubernetes_version": "v1.34.4",
      "name": "my-cluster",
      "pool_ids": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "private_ip": "10.0.0.254",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "public_ip": "198.51.100.1",
      "region": "us-sva-2",
      "status": "ready",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z",
      "vpc_id": "123e4567-e89b-12d3-a456-426614174000"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Cluster

- `NKSCluster`

  NKS Cluster details.

  - `id: string`

    Unique identifier for the Cluster.

  - `autoscaling: boolean`

    Whether autoscaling is enabled for the Cluster.

  - `created_at: string`

    When the Cluster was created.

  - `kubernetes_version: string`

    Kubernetes version of the Cluster.

  - `name: string`

    Name of the Cluster.

  - `pool_ids: Array<string>`

    IDs of pools belonging to this Cluster.

  - `private_ip: string`

    Private IP (VIP) of the Cluster.

  - `project_id: string`

    Project ID the Cluster belongs to.

  - `public_ip: string`

    Public IP of the Cluster.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `tags: Array<string>`

    Tags attached to the Cluster.

  - `updated_at: string`

    When the Cluster was last updated.

  - `vpc_id: string`

    ID of the VPC the Cluster is in.

### NKS Cluster List

- `NKSClusterList`

  - `items: Array<NKSCluster>`

    - `id: string`

      Unique identifier for the Cluster.

    - `autoscaling: boolean`

      Whether autoscaling is enabled for the Cluster.

    - `created_at: string`

      When the Cluster was created.

    - `kubernetes_version: string`

      Kubernetes version of the Cluster.

    - `name: string`

      Name of the Cluster.

    - `pool_ids: Array<string>`

      IDs of pools belonging to this Cluster.

    - `private_ip: string`

      Private IP (VIP) of the Cluster.

    - `project_id: string`

      Project ID the Cluster belongs to.

    - `public_ip: string`

      Public IP of the Cluster.

    - `region: RegionName`

      Region the resource is in.

      - `"us-sva-2"`

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `tags: Array<string>`

      Tags attached to the Cluster.

    - `updated_at: string`

      When the Cluster was last updated.

    - `vpc_id: string`

      ID of the VPC the Cluster is in.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Availability

## Check Create NKS Cluster Availability

`client.nks.clusters.availability.create(AvailabilityCreateParamsbody, RequestOptionsoptions?): void`

**post** `/v1/nks/clusters/availability`

Check if an NKS cluster can be created

### Parameters

- `body: AvailabilityCreateParams`

  - `autoscaling: boolean`

    Whether to enable autoscaling for the Cluster.

  - `kubernetes_version: string`

    Kubernetes version for the Cluster.

  - `name: string`

    Name of the Cluster.

  - `project_id: string`

    Project ID to create the Cluster in.

  - `region: RegionName`

    Region the resource is in.

    - `"us-sva-2"`

  - `vpc_id: string`

    ID of the VPC to use for the Cluster.

  - `tags?: Array<string>`

    Tags to attach to the Cluster.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

await client.nks.clusters.availability.create({
  autoscaling: true,
  kubernetes_version: 'v1.34.4',
  name: 'my-cluster',
  project_id: '123e4567-e89b-12d3-a456-426614174000',
  region: 'us-sva-2',
  vpc_id: '123e4567-e89b-12d3-a456-426614174000',
});
```

## Check Update NKS Cluster Availability

`client.nks.clusters.availability.update(stringclusterID, AvailabilityUpdateParamsbody, RequestOptionsoptions?): void`

**patch** `/v1/nks/clusters/{cluster_id}/availability`

Check if an NKS cluster can be updated

### Parameters

- `clusterID: string`

- `body: AvailabilityUpdateParams`

  - `autoscaling?: boolean`

    Whether to enable autoscaling for the Cluster.

  - `name?: string`

    Name of the Cluster.

  - `tags?: Array<string>`

    Tags to attach to the Cluster.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

await client.nks.clusters.availability.update('cluster_id');
```

# Persistent Volume Claims

## Get NKS Persistent Volume Claim Details

`client.nks.clusters.persistentVolumeClaims.get(stringpersistentVolumeClaimID, PersistentVolumeClaimGetParamsparams, RequestOptionsoptions?): PersistentVolumeClaim`

**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims/{persistent_volume_claim_id}`

Get details about an NKS persistent volume claim

### Parameters

- `persistentVolumeClaimID: string`

- `params: PersistentVolumeClaimGetParams`

  - `cluster_id: string`

    Cluster ID

### Returns

- `PersistentVolumeClaim`

  NKS persistent volume claim details.

  - `id: string`

    Unique identifier for the persistent volume claim.

  - `cluster_id: string`

    Cluster this persistent volume claim belongs to.

  - `created_at: string`

    When the persistent volume claim was first discovered.

  - `name: string`

    Name of the persistent volume claim.

  - `size: number`

    Size of the persistent volume claim in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the persistent volume claim was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get(
  'persistent_volume_claim_id',
  { cluster_id: 'cluster_id' },
);

console.log(persistentVolumeClaim.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "name": "my-volume",
  "size": 100,
  "status": "ready",
  "type": "abs",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Persistent Volume Claims

`client.nks.clusters.persistentVolumeClaims.list(stringclusterID, PersistentVolumeClaimListParamsquery?, RequestOptionsoptions?): Cursor<PersistentVolumeClaim>`

**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims`

List all persistent volume claims in an NKS cluster

### Parameters

- `clusterID: string`

- `query: PersistentVolumeClaimListParams`

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `PersistentVolumeClaim`

  NKS persistent volume claim details.

  - `id: string`

    Unique identifier for the persistent volume claim.

  - `cluster_id: string`

    Cluster this persistent volume claim belongs to.

  - `created_at: string`

    When the persistent volume claim was first discovered.

  - `name: string`

    Name of the persistent volume claim.

  - `size: number`

    Size of the persistent volume claim in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the persistent volume claim was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list(
  'cluster_id',
)) {
  console.log(persistentVolumeClaim.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "my-volume",
      "size": 100,
      "status": "ready",
      "type": "abs",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### Persistent Volume Claim

- `PersistentVolumeClaim`

  NKS persistent volume claim details.

  - `id: string`

    Unique identifier for the persistent volume claim.

  - `cluster_id: string`

    Cluster this persistent volume claim belongs to.

  - `created_at: string`

    When the persistent volume claim was first discovered.

  - `name: string`

    Name of the persistent volume claim.

  - `size: number`

    Size of the persistent volume claim in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the persistent volume claim was last updated.

### Persistent Volume Claim List

- `PersistentVolumeClaimList`

  - `items: Array<PersistentVolumeClaim>`

    - `id: string`

      Unique identifier for the persistent volume claim.

    - `cluster_id: string`

      Cluster this persistent volume claim belongs to.

    - `created_at: string`

      When the persistent volume claim was first discovered.

    - `name: string`

      Name of the persistent volume claim.

    - `size: number`

      Size of the persistent volume claim in GB.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `type: VolumeType`

      Type of the Volume.

      - `"nvme"`

      - `"abs"`

    - `updated_at: string`

      When the persistent volume claim was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Kubeconfig

## Get NKS Cluster Kubeconfig

`client.nks.clusters.kubeconfig.get(stringclusterID, RequestOptionsoptions?): Kubeconfig`

**get** `/v1/nks/clusters/{cluster_id}/kubeconfig`

Get the kubeconfig for an NKS cluster

### Parameters

- `clusterID: string`

### Returns

- `Kubeconfig`

  Kubeconfig for an NKS Cluster.

  - `kubeconfig: string`

    Kubeconfig content for the Cluster.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');

console.log(kubeconfig.kubeconfig);
```

#### Response

```json
{
  "kubeconfig": "kubeconfig"
}
```

## Domain Types

### Kubeconfig

- `Kubeconfig`

  Kubeconfig for an NKS Cluster.

  - `kubeconfig: string`

    Kubeconfig content for the Cluster.

# Controllers

## Get NKS Controller Details

`client.nks.clusters.controllers.get(stringcontrollerID, ControllerGetParamsparams, RequestOptionsoptions?): NKSController`

**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}`

Get details about an NKS controller

### Parameters

- `controllerID: string`

- `params: ControllerGetParams`

  - `cluster_id: string`

    Cluster ID

### Returns

- `NKSController`

  NKS controller details.

  - `id: string`

    Unique identifier for the controller.

  - `created_at: string`

    When the controller was created.

  - `instance_type: string`

    Instance type name.

  - `name: string`

    Name of the controller.

  - `private_ip: string | null`

    Private IP address of the controller.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the controller was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksController = await client.nks.clusters.controllers.get('controller_id', {
  cluster_id: 'cluster_id',
});

console.log(nksController.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "instance_type": "n1-standard-8",
  "name": "my-controller-0",
  "private_ip": "10.0.0.10",
  "status": "ready",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Controllers

`client.nks.clusters.controllers.list(stringclusterID, ControllerListParamsquery?, RequestOptionsoptions?): Cursor<NKSController>`

**get** `/v1/nks/clusters/{cluster_id}/controllers`

List all controllers in an NKS cluster

### Parameters

- `clusterID: string`

- `query: ControllerListParams`

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `NKSController`

  NKS controller details.

  - `id: string`

    Unique identifier for the controller.

  - `created_at: string`

    When the controller was created.

  - `instance_type: string`

    Instance type name.

  - `name: string`

    Name of the controller.

  - `private_ip: string | null`

    Private IP address of the controller.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the controller was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {
  console.log(nksController.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "instance_type": "n1-standard-8",
      "name": "my-controller-0",
      "private_ip": "10.0.0.10",
      "status": "ready",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Controller

- `NKSController`

  NKS controller details.

  - `id: string`

    Unique identifier for the controller.

  - `created_at: string`

    When the controller was created.

  - `instance_type: string`

    Instance type name.

  - `name: string`

    Name of the controller.

  - `private_ip: string | null`

    Private IP address of the controller.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the controller was last updated.

### NKS Controller List

- `NKSControllerList`

  - `items: Array<NKSController>`

    - `id: string`

      Unique identifier for the controller.

    - `created_at: string`

      When the controller was created.

    - `instance_type: string`

      Instance type name.

    - `name: string`

      Name of the controller.

    - `private_ip: string | null`

      Private IP address of the controller.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `updated_at: string`

      When the controller was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Volumes

## Get NKS Controller Volume Details

`client.nks.clusters.controllers.volumes.get(stringvolumeID, VolumeGetParamsparams, RequestOptionsoptions?): NKSControllerVolume`

**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes/{volume_id}`

Get details about a volume attached to an NKS controller

### Parameters

- `volumeID: string`

- `params: VolumeGetParams`

  - `cluster_id: string`

    Cluster ID

  - `controller_id: string`

    Controller ID

### Returns

- `NKSControllerVolume`

  NKS controller volume details.

  - `id: string`

    Unique identifier for the volume.

  - `created_at: string`

    When the volume was created.

  - `kind: VolumeKind`

    Volume kind.

    - `"boot"`

    - `"data"`

  - `name: string`

    Name of the volume.

  - `size: number`

    Size of the volume in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the volume was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', {
  cluster_id: 'cluster_id',
  controller_id: 'controller_id',
});

console.log(nksControllerVolume.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "kind": "boot",
  "name": "my-volume",
  "size": 100,
  "status": "ready",
  "type": "abs",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Controller Volumes

`client.nks.clusters.controllers.volumes.list(stringcontrollerID, VolumeListParamsparams, RequestOptionsoptions?): Cursor<NKSControllerVolume>`

**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes`

List all volumes attached to an NKS controller

### Parameters

- `controllerID: string`

- `params: VolumeListParams`

  - `cluster_id: string`

    Path param: Cluster ID

  - `cursor?: string`

    Query param: Pagination cursor returned by a previous request

  - `limit?: number`

    Query param: Maximum number of items to return

### Returns

- `NKSControllerVolume`

  NKS controller volume details.

  - `id: string`

    Unique identifier for the volume.

  - `created_at: string`

    When the volume was created.

  - `kind: VolumeKind`

    Volume kind.

    - `"boot"`

    - `"data"`

  - `name: string`

    Name of the volume.

  - `size: number`

    Size of the volume in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the volume was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list(
  'controller_id',
  { cluster_id: 'cluster_id' },
)) {
  console.log(nksControllerVolume.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "kind": "boot",
      "name": "my-volume",
      "size": 100,
      "status": "ready",
      "type": "abs",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Controller Volume

- `NKSControllerVolume`

  NKS controller volume details.

  - `id: string`

    Unique identifier for the volume.

  - `created_at: string`

    When the volume was created.

  - `kind: VolumeKind`

    Volume kind.

    - `"boot"`

    - `"data"`

  - `name: string`

    Name of the volume.

  - `size: number`

    Size of the volume in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the volume was last updated.

### NKS Controller Volume List

- `NKSControllerVolumeList`

  - `items: Array<NKSControllerVolume>`

    - `id: string`

      Unique identifier for the volume.

    - `created_at: string`

      When the volume was created.

    - `kind: VolumeKind`

      Volume kind.

      - `"boot"`

      - `"data"`

    - `name: string`

      Name of the volume.

    - `size: number`

      Size of the volume in GB.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `type: VolumeType`

      Type of the Volume.

      - `"nvme"`

      - `"abs"`

    - `updated_at: string`

      When the volume was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Load Balancers

## Get NKS Load Balancer Details

`client.nks.clusters.loadBalancers.get(stringloadBalancerID, LoadBalancerGetParamsparams, RequestOptionsoptions?): NKSLoadBalancer`

**get** `/v1/nks/clusters/{cluster_id}/load_balancers/{load_balancer_id}`

Get details about an NKS load balancer

### Parameters

- `loadBalancerID: string`

- `params: LoadBalancerGetParams`

  - `cluster_id: string`

    Cluster ID

### Returns

- `NKSLoadBalancer`

  NKS load balancer details.

  - `id: string`

    Unique identifier for the load balancer.

  - `cluster_id: string`

    Cluster this load balancer belongs to.

  - `created_at: string`

    When the load balancer was first discovered.

  - `namespace: string`

    Kubernetes namespace of the load balancer.

  - `private_ip: string | null`

    Private IP address of the load balancer.

  - `public_ip: string | null`

    Public IP address assigned to this load balancer.

  - `public_ip_enabled: boolean`

    Whether a public IP is enabled for this load balancer.

  - `service_name: string`

    Kubernetes service name of the load balancer.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the load balancer was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', {
  cluster_id: 'cluster_id',
});

console.log(nksLoadBalancer.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "namespace": "default",
  "private_ip": "10.0.0.50",
  "public_ip": "198.51.100.10",
  "public_ip_enabled": false,
  "service_name": "my-service",
  "status": "ready",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Update NKS Load Balancer

`client.nks.clusters.loadBalancers.update(stringloadBalancerID, LoadBalancerUpdateParamsparams, RequestOptionsoptions?): Operation`

**patch** `/v1/nks/clusters/{cluster_id}/load_balancers/{load_balancer_id}`

Update an NKS load balancer

### Parameters

- `loadBalancerID: string`

- `params: LoadBalancerUpdateParams`

  - `cluster_id: string`

    Path param: Cluster ID

  - `public_ip_enabled: boolean`

    Body param: Whether to enable a public IP for this load balancer.

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.loadBalancers.update('load_balancer_id', {
  cluster_id: 'cluster_id',
  public_ip_enabled: true,
});

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Load Balancers

`client.nks.clusters.loadBalancers.list(stringclusterID, LoadBalancerListParamsquery?, RequestOptionsoptions?): Cursor<NKSLoadBalancer>`

**get** `/v1/nks/clusters/{cluster_id}/load_balancers`

List all load balancers in an NKS cluster

### Parameters

- `clusterID: string`

- `query: LoadBalancerListParams`

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `NKSLoadBalancer`

  NKS load balancer details.

  - `id: string`

    Unique identifier for the load balancer.

  - `cluster_id: string`

    Cluster this load balancer belongs to.

  - `created_at: string`

    When the load balancer was first discovered.

  - `namespace: string`

    Kubernetes namespace of the load balancer.

  - `private_ip: string | null`

    Private IP address of the load balancer.

  - `public_ip: string | null`

    Public IP address assigned to this load balancer.

  - `public_ip_enabled: boolean`

    Whether a public IP is enabled for this load balancer.

  - `service_name: string`

    Kubernetes service name of the load balancer.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the load balancer was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {
  console.log(nksLoadBalancer.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "namespace": "default",
      "private_ip": "10.0.0.50",
      "public_ip": "198.51.100.10",
      "public_ip_enabled": false,
      "service_name": "my-service",
      "status": "ready",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Load Balancer

- `NKSLoadBalancer`

  NKS load balancer details.

  - `id: string`

    Unique identifier for the load balancer.

  - `cluster_id: string`

    Cluster this load balancer belongs to.

  - `created_at: string`

    When the load balancer was first discovered.

  - `namespace: string`

    Kubernetes namespace of the load balancer.

  - `private_ip: string | null`

    Private IP address of the load balancer.

  - `public_ip: string | null`

    Public IP address assigned to this load balancer.

  - `public_ip_enabled: boolean`

    Whether a public IP is enabled for this load balancer.

  - `service_name: string`

    Kubernetes service name of the load balancer.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the load balancer was last updated.

### NKS Load Balancer List

- `NKSLoadBalancerList`

  - `items: Array<NKSLoadBalancer>`

    - `id: string`

      Unique identifier for the load balancer.

    - `cluster_id: string`

      Cluster this load balancer belongs to.

    - `created_at: string`

      When the load balancer was first discovered.

    - `namespace: string`

      Kubernetes namespace of the load balancer.

    - `private_ip: string | null`

      Private IP address of the load balancer.

    - `public_ip: string | null`

      Public IP address assigned to this load balancer.

    - `public_ip_enabled: boolean`

      Whether a public IP is enabled for this load balancer.

    - `service_name: string`

      Kubernetes service name of the load balancer.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `updated_at: string`

      When the load balancer was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Pools

## Create NKS Node Pool

`client.nks.clusters.pools.create(stringclusterID, PoolCreateParamsbody, RequestOptionsoptions?): Operation`

**post** `/v1/nks/clusters/{cluster_id}/pools`

Create a node pool in an NKS cluster

### Parameters

- `clusterID: string`

- `body: PoolCreateParams`

  - `name: string`

    Name of the node pool.

  - `node_config: NKSNodePoolNodeConfig`

    Node configuration.

    - `boot_volume: NKSNodePoolBootVolume`

      Boot volume configuration.

      - `size: number`

        Size of the boot volume in GB.

      - `type: VolumeType`

        Type of the Volume.

        - `"nvme"`

        - `"abs"`

    - `instance_type: string`

      Instance type name used for worker nodes.

    - `labels?: Array<string>`

      Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
      Keys under kubernetes.io, k8s.io, and nirvanalabs.io prefixes are reserved.

  - `node_count: number`

    Number of nodes. Must be between 1 and 100.

  - `tags?: Array<string>`

    Tags to attach to the node pool.

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.pools.create('cluster_id', {
  name: 'my-node-pool',
  node_config: {
    boot_volume: { size: 100, type: 'abs' },
    instance_type: 'n1-standard-8',
  },
  node_count: 3,
});

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Get NKS Node Pool Details

`client.nks.clusters.pools.get(stringpoolID, PoolGetParamsparams, RequestOptionsoptions?): NKSNodePool`

**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`

Get details about an NKS node pool

### Parameters

- `poolID: string`

- `params: PoolGetParams`

  - `cluster_id: string`

    Cluster ID

### Returns

- `NKSNodePool`

  NKS node pool details.

  - `id: string`

    Unique identifier for the node pool.

  - `cluster_id: string`

    ID of the Cluster this node pool belongs to.

  - `created_at: string`

    When the node pool was created.

  - `name: string`

    Name of the node pool.

  - `node_config: NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `boot_volume: NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `size: number`

        Size of the boot volume in GB.

      - `type: VolumeType`

        Type of the Volume.

        - `"nvme"`

        - `"abs"`

    - `instance_type: string`

      Instance type name.

    - `labels: Array<string>`

      Kubernetes labels applied to each node in the pool. Each entry is "key=value".

  - `node_count: number`

    Number of nodes.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `tags: Array<string>`

    Tags attached to the node pool.

  - `updated_at: string`

    When the node pool was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });

console.log(nksNodePool.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "name": "my-node-pool",
  "node_config": {
    "boot_volume": {
      "size": 100,
      "type": "abs"
    },
    "instance_type": "n1-standard-8",
    "labels": [
      "env=prod",
      "team=platform"
    ]
  },
  "node_count": 3,
  "status": "ready",
  "tags": [
    "production",
    "ethereum"
  ],
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Update NKS Node Pool

`client.nks.clusters.pools.update(stringpoolID, PoolUpdateParamsparams, RequestOptionsoptions?): Operation`

**patch** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`

Update an NKS node pool

### Parameters

- `poolID: string`

- `params: PoolUpdateParams`

  - `cluster_id: string`

    Path param: Cluster ID

  - `name?: string`

    Body param: Name of the node pool.

  - `node_config?: NodeConfig`

    Body param: Partial node configuration update.

    - `labels?: Array<string>`

      Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
      When provided, the list fully replaces the current labels on the pool and on live nodes.

  - `node_count?: number`

    Body param: Number of nodes.

  - `tags?: Array<string>`

    Body param: Tags to attach to the node pool.

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.pools.update('pool_id', { cluster_id: 'cluster_id' });

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Delete NKS Node Pool

`client.nks.clusters.pools.delete(stringpoolID, PoolDeleteParamsparams, RequestOptionsoptions?): Operation`

**delete** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`

Delete an NKS node pool

### Parameters

- `poolID: string`

- `params: PoolDeleteParams`

  - `cluster_id: string`

    Cluster ID

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Node Pools

`client.nks.clusters.pools.list(stringclusterID, PoolListParamsquery?, RequestOptionsoptions?): Cursor<NKSNodePool>`

**get** `/v1/nks/clusters/{cluster_id}/pools`

List all node pools in an NKS cluster

### Parameters

- `clusterID: string`

- `query: PoolListParams`

  - `cursor?: string`

    Pagination cursor returned by a previous request

  - `limit?: number`

    Maximum number of items to return

### Returns

- `NKSNodePool`

  NKS node pool details.

  - `id: string`

    Unique identifier for the node pool.

  - `cluster_id: string`

    ID of the Cluster this node pool belongs to.

  - `created_at: string`

    When the node pool was created.

  - `name: string`

    Name of the node pool.

  - `node_config: NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `boot_volume: NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `size: number`

        Size of the boot volume in GB.

      - `type: VolumeType`

        Type of the Volume.

        - `"nvme"`

        - `"abs"`

    - `instance_type: string`

      Instance type name.

    - `labels: Array<string>`

      Kubernetes labels applied to each node in the pool. Each entry is "key=value".

  - `node_count: number`

    Number of nodes.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `tags: Array<string>`

    Tags attached to the node pool.

  - `updated_at: string`

    When the node pool was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksNodePool of client.nks.clusters.pools.list('cluster_id')) {
  console.log(nksNodePool.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "my-node-pool",
      "node_config": {
        "boot_volume": {
          "size": 100,
          "type": "abs"
        },
        "instance_type": "n1-standard-8",
        "labels": [
          "env=prod",
          "team=platform"
        ]
      },
      "node_count": 3,
      "status": "ready",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Node Pool

- `NKSNodePool`

  NKS node pool details.

  - `id: string`

    Unique identifier for the node pool.

  - `cluster_id: string`

    ID of the Cluster this node pool belongs to.

  - `created_at: string`

    When the node pool was created.

  - `name: string`

    Name of the node pool.

  - `node_config: NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `boot_volume: NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `size: number`

        Size of the boot volume in GB.

      - `type: VolumeType`

        Type of the Volume.

        - `"nvme"`

        - `"abs"`

    - `instance_type: string`

      Instance type name.

    - `labels: Array<string>`

      Kubernetes labels applied to each node in the pool. Each entry is "key=value".

  - `node_count: number`

    Number of nodes.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `tags: Array<string>`

    Tags attached to the node pool.

  - `updated_at: string`

    When the node pool was last updated.

### NKS Node Pool Boot Volume

- `NKSNodePoolBootVolume`

  Boot volume configuration.

  - `size: number`

    Size of the boot volume in GB.

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

### NKS Node Pool Boot Volume Response

- `NKSNodePoolBootVolumeResponse`

  Boot volume configuration.

  - `size: number`

    Size of the boot volume in GB.

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

### NKS Node Pool List

- `NKSNodePoolList`

  - `items: Array<NKSNodePool>`

    - `id: string`

      Unique identifier for the node pool.

    - `cluster_id: string`

      ID of the Cluster this node pool belongs to.

    - `created_at: string`

      When the node pool was created.

    - `name: string`

      Name of the node pool.

    - `node_config: NKSNodePoolNodeConfigResponse`

      Node configuration.

      - `boot_volume: NKSNodePoolBootVolumeResponse`

        Boot volume configuration.

        - `size: number`

          Size of the boot volume in GB.

        - `type: VolumeType`

          Type of the Volume.

          - `"nvme"`

          - `"abs"`

      - `instance_type: string`

        Instance type name.

      - `labels: Array<string>`

        Kubernetes labels applied to each node in the pool. Each entry is "key=value".

    - `node_count: number`

      Number of nodes.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `tags: Array<string>`

      Tags attached to the node pool.

    - `updated_at: string`

      When the node pool was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

### NKS Node Pool Node Config

- `NKSNodePoolNodeConfig`

  Node configuration.

  - `boot_volume: NKSNodePoolBootVolume`

    Boot volume configuration.

    - `size: number`

      Size of the boot volume in GB.

    - `type: VolumeType`

      Type of the Volume.

      - `"nvme"`

      - `"abs"`

  - `instance_type: string`

    Instance type name used for worker nodes.

  - `labels?: Array<string>`

    Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
    Keys under kubernetes.io, k8s.io, and nirvanalabs.io prefixes are reserved.

### NKS Node Pool Node Config Response

- `NKSNodePoolNodeConfigResponse`

  Node configuration.

  - `boot_volume: NKSNodePoolBootVolumeResponse`

    Boot volume configuration.

    - `size: number`

      Size of the boot volume in GB.

    - `type: VolumeType`

      Type of the Volume.

      - `"nvme"`

      - `"abs"`

  - `instance_type: string`

    Instance type name.

  - `labels: Array<string>`

    Kubernetes labels applied to each node in the pool. Each entry is "key=value".

# Availability

## Check Create NKS Node Pool Availability

`client.nks.clusters.pools.availability.create(stringclusterID, AvailabilityCreateParamsbody, RequestOptionsoptions?): void`

**post** `/v1/nks/clusters/{cluster_id}/pools/availability`

Check if a node pool can be created in an NKS cluster

### Parameters

- `clusterID: string`

- `body: AvailabilityCreateParams`

  - `name: string`

    Name of the node pool.

  - `node_config: NKSNodePoolNodeConfig`

    Node configuration.

    - `boot_volume: NKSNodePoolBootVolume`

      Boot volume configuration.

      - `size: number`

        Size of the boot volume in GB.

      - `type: VolumeType`

        Type of the Volume.

        - `"nvme"`

        - `"abs"`

    - `instance_type: string`

      Instance type name used for worker nodes.

    - `labels?: Array<string>`

      Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
      Keys under kubernetes.io, k8s.io, and nirvanalabs.io prefixes are reserved.

  - `node_count: number`

    Number of nodes. Must be between 1 and 100.

  - `tags?: Array<string>`

    Tags to attach to the node pool.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

await client.nks.clusters.pools.availability.create('cluster_id', {
  name: 'my-node-pool',
  node_config: {
    boot_volume: { size: 100, type: 'abs' },
    instance_type: 'n1-standard-8',
  },
  node_count: 3,
});
```

## Check Update NKS Node Pool Availability

`client.nks.clusters.pools.availability.update(stringpoolID, AvailabilityUpdateParamsparams, RequestOptionsoptions?): void`

**patch** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/availability`

Check if an NKS node pool can be updated

### Parameters

- `poolID: string`

- `params: AvailabilityUpdateParams`

  - `cluster_id: string`

    Path param: Cluster ID

  - `name?: string`

    Body param: Name of the node pool.

  - `node_config?: NodeConfig`

    Body param: Partial node configuration update.

    - `labels?: Array<string>`

      Kubernetes labels to apply to each node in the pool. Each entry is "key=value".
      When provided, the list fully replaces the current labels on the pool and on live nodes.

  - `node_count?: number`

    Body param: Number of nodes.

  - `tags?: Array<string>`

    Body param: Tags to attach to the node pool.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

await client.nks.clusters.pools.availability.update('pool_id', { cluster_id: 'cluster_id' });
```

# Nodes

## Get NKS Node Details

`client.nks.clusters.pools.nodes.get(stringnodeID, NodeGetParamsparams, RequestOptionsoptions?): NKSNode`

**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}`

Get details about an NKS node

### Parameters

- `nodeID: string`

- `params: NodeGetParams`

  - `cluster_id: string`

    Cluster ID

  - `pool_id: string`

    Node Pool ID

### Returns

- `NKSNode`

  NKS node details.

  - `id: string`

    Unique identifier for the node.

  - `created_at: string`

    When the node was created.

  - `name: string`

    Name of the node.

  - `private_ip: string | null`

    Private IP address of the node.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the node was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksNode = await client.nks.clusters.pools.nodes.get('node_id', {
  cluster_id: 'cluster_id',
  pool_id: 'pool_id',
});

console.log(nksNode.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "name": "my-node-0",
  "private_ip": "10.0.0.10",
  "status": "ready",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Delete NKS Node

`client.nks.clusters.pools.nodes.delete(stringnodeID, NodeDeleteParamsparams, RequestOptionsoptions?): Operation`

**delete** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}`

Delete a single node from an NKS node pool

### Parameters

- `nodeID: string`

- `params: NodeDeleteParams`

  - `cluster_id: string`

    Cluster ID

  - `pool_id: string`

    Node Pool ID

### Returns

- `Operation`

  Operation details.

  - `id: string`

    Unique identifier for the Operation.

  - `created_at: string`

    When the Operation was created.

  - `details: OperationDetails | null`

    Structured details about what an operation is changing.

    - `changes: OperationChanges`

      Map of changed field names to their from/to diffs. Keys depend on the parent operation's kind+type.

      - `from: string | number | boolean | Array<string>`

        Previous value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

      - `to: string | number | boolean | Array<string>`

        New value.

        - `string`

        - `number`

        - `boolean`

        - `Array<string>`

  - `kind: OperationKind`

    Kind of Operation.

    - `"vm"`

    - `"volume"`

    - `"vpc"`

    - `"firewall_rule"`

    - `"nks_cluster"`

    - `"nks_node_pool"`

  - `project_id: string`

    Project ID the Operation belongs to.

  - `resource_id: string`

    ID of the resource that the Operation is acting on.

  - `status: OperationStatus`

    Status of the Operation.

    - `"pending"`

    - `"running"`

    - `"done"`

    - `"failed"`

    - `"unknown"`

  - `type: OperationType`

    Type of Operation.

    - `"create"`

    - `"update"`

    - `"delete"`

    - `"restart"`

  - `updated_at: string`

    When the Operation was updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const operation = await client.nks.clusters.pools.nodes.delete('node_id', {
  cluster_id: 'cluster_id',
  pool_id: 'pool_id',
});

console.log(operation.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "details": {
    "changes": {
      "foo": {
        "from": "string",
        "to": "string"
      }
    }
  },
  "kind": "vm",
  "project_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "type": "create",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Nodes

`client.nks.clusters.pools.nodes.list(stringpoolID, NodeListParamsparams, RequestOptionsoptions?): Cursor<NKSNode>`

**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes`

List all nodes in an NKS node pool

### Parameters

- `poolID: string`

- `params: NodeListParams`

  - `cluster_id: string`

    Path param: Cluster ID

  - `cursor?: string`

    Query param: Pagination cursor returned by a previous request

  - `limit?: number`

    Query param: Maximum number of items to return

### Returns

- `NKSNode`

  NKS node details.

  - `id: string`

    Unique identifier for the node.

  - `created_at: string`

    When the node was created.

  - `name: string`

    Name of the node.

  - `private_ip: string | null`

    Private IP address of the node.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the node was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', {
  cluster_id: 'cluster_id',
})) {
  console.log(nksNode.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "name": "my-node-0",
      "private_ip": "10.0.0.10",
      "status": "ready",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Node

- `NKSNode`

  NKS node details.

  - `id: string`

    Unique identifier for the node.

  - `created_at: string`

    When the node was created.

  - `name: string`

    Name of the node.

  - `private_ip: string | null`

    Private IP address of the node.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `updated_at: string`

    When the node was last updated.

### NKS Node List

- `NKSNodeList`

  - `items: Array<NKSNode>`

    - `id: string`

      Unique identifier for the node.

    - `created_at: string`

      When the node was created.

    - `name: string`

      Name of the node.

    - `private_ip: string | null`

      Private IP address of the node.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `updated_at: string`

      When the node was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`

# Volumes

## Get NKS Node Volume Details

`client.nks.clusters.pools.nodes.volumes.get(stringvolumeID, VolumeGetParamsparams, RequestOptionsoptions?): NKSNodeVolume`

**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes/{volume_id}`

Get details about a volume attached to an NKS node

### Parameters

- `volumeID: string`

- `params: VolumeGetParams`

  - `cluster_id: string`

    Cluster ID

  - `pool_id: string`

    Node Pool ID

  - `node_id: string`

    Node ID

### Returns

- `NKSNodeVolume`

  NKS node volume details.

  - `id: string`

    Unique identifier for the volume.

  - `created_at: string`

    When the volume was created.

  - `kind: VolumeKind`

    Volume kind.

    - `"boot"`

    - `"data"`

  - `name: string`

    Name of the volume.

  - `size: number`

    Size of the volume in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the volume was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

const nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {
  cluster_id: 'cluster_id',
  pool_id: 'pool_id',
  node_id: 'node_id',
});

console.log(nksNodeVolume.id);
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-01-01T00:00:00Z",
  "kind": "boot",
  "name": "my-volume",
  "size": 100,
  "status": "ready",
  "type": "abs",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## List NKS Node Volumes

`client.nks.clusters.pools.nodes.volumes.list(stringnodeID, VolumeListParamsparams, RequestOptionsoptions?): Cursor<NKSNodeVolume>`

**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes`

List all volumes attached to an NKS node

### Parameters

- `nodeID: string`

- `params: VolumeListParams`

  - `cluster_id: string`

    Path param: Cluster ID

  - `pool_id: string`

    Path param: Node Pool ID

  - `cursor?: string`

    Query param: Pagination cursor returned by a previous request

  - `limit?: number`

    Query param: Maximum number of items to return

### Returns

- `NKSNodeVolume`

  NKS node volume details.

  - `id: string`

    Unique identifier for the volume.

  - `created_at: string`

    When the volume was created.

  - `kind: VolumeKind`

    Volume kind.

    - `"boot"`

    - `"data"`

  - `name: string`

    Name of the volume.

  - `size: number`

    Size of the volume in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the volume was last updated.

### Example

```typescript
import NirvanaLabs from '@nirvana-labs/nirvana';

const client = new NirvanaLabs({
  apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', {
  cluster_id: 'cluster_id',
  pool_id: 'pool_id',
})) {
  console.log(nksNodeVolume.id);
}
```

#### Response

```json
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "kind": "boot",
      "name": "my-volume",
      "size": 100,
      "status": "ready",
      "type": "abs",
      "updated_at": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
```

## Domain Types

### NKS Node Volume

- `NKSNodeVolume`

  NKS node volume details.

  - `id: string`

    Unique identifier for the volume.

  - `created_at: string`

    When the volume was created.

  - `kind: VolumeKind`

    Volume kind.

    - `"boot"`

    - `"data"`

  - `name: string`

    Name of the volume.

  - `size: number`

    Size of the volume in GB.

  - `status: ResourceStatus`

    Status of the resource.

    - `"pending"`

    - `"creating"`

    - `"updating"`

    - `"ready"`

    - `"deleting"`

    - `"deleted"`

    - `"error"`

  - `type: VolumeType`

    Type of the Volume.

    - `"nvme"`

    - `"abs"`

  - `updated_at: string`

    When the volume was last updated.

### NKS Node Volume List

- `NKSNodeVolumeList`

  - `items: Array<NKSNodeVolume>`

    - `id: string`

      Unique identifier for the volume.

    - `created_at: string`

      When the volume was created.

    - `kind: VolumeKind`

      Volume kind.

      - `"boot"`

      - `"data"`

    - `name: string`

      Name of the volume.

    - `size: number`

      Size of the volume in GB.

    - `status: ResourceStatus`

      Status of the resource.

      - `"pending"`

      - `"creating"`

      - `"updating"`

      - `"ready"`

      - `"deleting"`

      - `"deleted"`

      - `"error"`

    - `type: VolumeType`

      Type of the Volume.

      - `"nvme"`

      - `"abs"`

    - `updated_at: string`

      When the volume was last updated.

  - `pagination: Pagination`

    Pagination response details.

    - `next_cursor: string | null`

    - `previous_cursor: string | null`

    - `total_count: number`
