# Clusters

## Create NKS Cluster

`client.NKS.Clusters.New(ctx, body) (*Operation, error)`

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

Create an NKS Cluster

### Parameters

- `body ClusterNewParams`

  - `Autoscaling param.Field[bool]`

    Whether to enable autoscaling for the Cluster.

  - `KubernetesVersion param.Field[string]`

    Kubernetes version for the Cluster.

  - `Name param.Field[string]`

    Name of the Cluster.

  - `ProjectID param.Field[string]`

    Project ID to create the Cluster in.

  - `Region param.Field[RegionName]`

    Region the resource is in.

  - `VPCID param.Field[string]`

    ID of the VPC to use for the Cluster.

  - `Tags param.Field[[]string]`

    Tags to attach to the Cluster.

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
  "github.com/nirvana-labs/nirvana-go/shared"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.New(context.TODO(), nks.ClusterNewParams{
    Autoscaling: true,
    KubernetesVersion: "v1.34.4",
    Name: "my-cluster",
    ProjectID: "123e4567-e89b-12d3-a456-426614174000",
    Region: shared.RegionNameUsSva2,
    VPCID: "123e4567-e89b-12d3-a456-426614174000",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID) (*NKSCluster, error)`

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

Get details about an NKS cluster

### Parameters

- `clusterID string`

### Returns

- `type NKSCluster struct{…}`

  NKS Cluster details.

  - `ID string`

    Unique identifier for the Cluster.

  - `Autoscaling bool`

    Whether autoscaling is enabled for the Cluster.

  - `CreatedAt Time`

    When the Cluster was created.

  - `KubernetesVersion string`

    Kubernetes version of the Cluster.

  - `Name string`

    Name of the Cluster.

  - `PoolIDs []string`

    IDs of pools belonging to this Cluster.

  - `PrivateIP string`

    Private IP (VIP) of the Cluster.

  - `ProjectID string`

    Project ID the Cluster belongs to.

  - `PublicIP string`

    Public IP of the Cluster.

  - `Region RegionName`

    Region the resource is in.

    - `const RegionNameUsSva2 RegionName = "us-sva-2"`

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Tags []string`

    Tags attached to the Cluster.

  - `UpdatedAt Time`

    When the Cluster was last updated.

  - `VPCID string`

    ID of the VPC the Cluster is in.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksCluster, err := client.NKS.Clusters.Get(context.TODO(), "cluster_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, body) (*Operation, error)`

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

Update an NKS cluster

### Parameters

- `clusterID string`

- `body ClusterUpdateParams`

  - `Autoscaling param.Field[bool]`

    Whether to enable autoscaling for the Cluster.

  - `Name param.Field[string]`

    Name of the Cluster.

  - `Tags param.Field[[]string]`

    Tags to attach to the Cluster.

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.Update(
    context.TODO(),
    "cluster_id",
    nks.ClusterUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID) (*Operation, error)`

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

Delete an NKS cluster

### Parameters

- `clusterID string`

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.Delete(context.TODO(), "cluster_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, query) (*Cursor[NKSCluster], error)`

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

List all NKS clusters

### Parameters

- `query ClusterListParams`

  - `ProjectID param.Field[string]`

    Project ID of resources to request

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSCluster struct{…}`

  NKS Cluster details.

  - `ID string`

    Unique identifier for the Cluster.

  - `Autoscaling bool`

    Whether autoscaling is enabled for the Cluster.

  - `CreatedAt Time`

    When the Cluster was created.

  - `KubernetesVersion string`

    Kubernetes version of the Cluster.

  - `Name string`

    Name of the Cluster.

  - `PoolIDs []string`

    IDs of pools belonging to this Cluster.

  - `PrivateIP string`

    Private IP (VIP) of the Cluster.

  - `ProjectID string`

    Project ID the Cluster belongs to.

  - `PublicIP string`

    Public IP of the Cluster.

  - `Region RegionName`

    Region the resource is in.

    - `const RegionNameUsSva2 RegionName = "us-sva-2"`

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Tags []string`

    Tags attached to the Cluster.

  - `UpdatedAt Time`

    When the Cluster was last updated.

  - `VPCID string`

    ID of the VPC the Cluster is in.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.List(context.TODO(), nks.ClusterListParams{
    ProjectID: "project_id",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSCluster struct{…}`

  NKS Cluster details.

  - `ID string`

    Unique identifier for the Cluster.

  - `Autoscaling bool`

    Whether autoscaling is enabled for the Cluster.

  - `CreatedAt Time`

    When the Cluster was created.

  - `KubernetesVersion string`

    Kubernetes version of the Cluster.

  - `Name string`

    Name of the Cluster.

  - `PoolIDs []string`

    IDs of pools belonging to this Cluster.

  - `PrivateIP string`

    Private IP (VIP) of the Cluster.

  - `ProjectID string`

    Project ID the Cluster belongs to.

  - `PublicIP string`

    Public IP of the Cluster.

  - `Region RegionName`

    Region the resource is in.

    - `const RegionNameUsSva2 RegionName = "us-sva-2"`

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Tags []string`

    Tags attached to the Cluster.

  - `UpdatedAt Time`

    When the Cluster was last updated.

  - `VPCID string`

    ID of the VPC the Cluster is in.

### NKS Cluster List

- `type NKSClusterList struct{…}`

  - `Items []NKSCluster`

    - `ID string`

      Unique identifier for the Cluster.

    - `Autoscaling bool`

      Whether autoscaling is enabled for the Cluster.

    - `CreatedAt Time`

      When the Cluster was created.

    - `KubernetesVersion string`

      Kubernetes version of the Cluster.

    - `Name string`

      Name of the Cluster.

    - `PoolIDs []string`

      IDs of pools belonging to this Cluster.

    - `PrivateIP string`

      Private IP (VIP) of the Cluster.

    - `ProjectID string`

      Project ID the Cluster belongs to.

    - `PublicIP string`

      Public IP of the Cluster.

    - `Region RegionName`

      Region the resource is in.

      - `const RegionNameUsSva2 RegionName = "us-sva-2"`

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `Tags []string`

      Tags attached to the Cluster.

    - `UpdatedAt Time`

      When the Cluster was last updated.

    - `VPCID string`

      ID of the VPC the Cluster is in.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

# Availability

## Check Create NKS Cluster Availability

`client.NKS.Clusters.Availability.New(ctx, body) error`

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

Check if an NKS cluster can be created

### Parameters

- `body ClusterAvailabilityNewParams`

  - `Autoscaling param.Field[bool]`

    Whether to enable autoscaling for the Cluster.

  - `KubernetesVersion param.Field[string]`

    Kubernetes version for the Cluster.

  - `Name param.Field[string]`

    Name of the Cluster.

  - `ProjectID param.Field[string]`

    Project ID to create the Cluster in.

  - `Region param.Field[RegionName]`

    Region the resource is in.

  - `VPCID param.Field[string]`

    ID of the VPC to use for the Cluster.

  - `Tags param.Field[[]string]`

    Tags to attach to the Cluster.

### Example

```go
package main

import (
  "context"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
  "github.com/nirvana-labs/nirvana-go/shared"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.NKS.Clusters.Availability.New(context.TODO(), nks.ClusterAvailabilityNewParams{
    Autoscaling: true,
    KubernetesVersion: "v1.34.4",
    Name: "my-cluster",
    ProjectID: "123e4567-e89b-12d3-a456-426614174000",
    Region: shared.RegionNameUsSva2,
    VPCID: "123e4567-e89b-12d3-a456-426614174000",
  })
  if err != nil {
    panic(err.Error())
  }
}
```

## Check Update NKS Cluster Availability

`client.NKS.Clusters.Availability.Update(ctx, clusterID, body) error`

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

Check if an NKS cluster can be updated

### Parameters

- `clusterID string`

- `body ClusterAvailabilityUpdateParams`

  - `Autoscaling param.Field[bool]`

    Whether to enable autoscaling for the Cluster.

  - `Name param.Field[string]`

    Name of the Cluster.

  - `Tags param.Field[[]string]`

    Tags to attach to the Cluster.

### Example

```go
package main

import (
  "context"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.NKS.Clusters.Availability.Update(
    context.TODO(),
    "cluster_id",
    nks.ClusterAvailabilityUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

# Persistent Volume Claims

## Get NKS Persistent Volume Claim Details

`client.NKS.Clusters.PersistentVolumeClaims.Get(ctx, clusterID, persistentVolumeClaimID) (*PersistentVolumeClaim, error)`

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

Get details about an NKS persistent volume claim

### Parameters

- `clusterID string`

- `persistentVolumeClaimID string`

### Returns

- `type PersistentVolumeClaim struct{…}`

  NKS persistent volume claim details.

  - `ID string`

    Unique identifier for the persistent volume claim.

  - `ClusterID string`

    Cluster this persistent volume claim belongs to.

  - `CreatedAt Time`

    When the persistent volume claim was first discovered.

  - `Name string`

    Name of the persistent volume claim.

  - `Size int64`

    Size of the persistent volume claim in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the persistent volume claim was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  persistentVolumeClaim, err := client.NKS.Clusters.PersistentVolumeClaims.Get(
    context.TODO(),
    "cluster_id",
    "persistent_volume_claim_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, query) (*Cursor[PersistentVolumeClaim], error)`

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

List all persistent volume claims in an NKS cluster

### Parameters

- `clusterID string`

- `query ClusterPersistentVolumeClaimListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type PersistentVolumeClaim struct{…}`

  NKS persistent volume claim details.

  - `ID string`

    Unique identifier for the persistent volume claim.

  - `ClusterID string`

    Cluster this persistent volume claim belongs to.

  - `CreatedAt Time`

    When the persistent volume claim was first discovered.

  - `Name string`

    Name of the persistent volume claim.

  - `Size int64`

    Size of the persistent volume claim in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the persistent volume claim was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.PersistentVolumeClaims.List(
    context.TODO(),
    "cluster_id",
    nks.ClusterPersistentVolumeClaimListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type PersistentVolumeClaim struct{…}`

  NKS persistent volume claim details.

  - `ID string`

    Unique identifier for the persistent volume claim.

  - `ClusterID string`

    Cluster this persistent volume claim belongs to.

  - `CreatedAt Time`

    When the persistent volume claim was first discovered.

  - `Name string`

    Name of the persistent volume claim.

  - `Size int64`

    Size of the persistent volume claim in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the persistent volume claim was last updated.

### Persistent Volume Claim List

- `type PersistentVolumeClaimList struct{…}`

  - `Items []PersistentVolumeClaim`

    - `ID string`

      Unique identifier for the persistent volume claim.

    - `ClusterID string`

      Cluster this persistent volume claim belongs to.

    - `CreatedAt Time`

      When the persistent volume claim was first discovered.

    - `Name string`

      Name of the persistent volume claim.

    - `Size int64`

      Size of the persistent volume claim in GB.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `Type VolumeType`

      Type of the Volume.

      - `const VolumeTypeNvme VolumeType = "nvme"`

      - `const VolumeTypeABS VolumeType = "abs"`

    - `UpdatedAt Time`

      When the persistent volume claim was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

# Kubeconfig

## Get NKS Cluster Kubeconfig

`client.NKS.Clusters.Kubeconfig.Get(ctx, clusterID) (*Kubeconfig, error)`

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

Get the kubeconfig for an NKS cluster

### Parameters

- `clusterID string`

### Returns

- `type Kubeconfig struct{…}`

  Kubeconfig for an NKS Cluster.

  - `Kubeconfig string`

    Kubeconfig content for the Cluster.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  kubeconfig, err := client.NKS.Clusters.Kubeconfig.Get(context.TODO(), "cluster_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", kubeconfig.Kubeconfig)
}
```

#### Response

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

## Domain Types

### Kubeconfig

- `type Kubeconfig struct{…}`

  Kubeconfig for an NKS Cluster.

  - `Kubeconfig string`

    Kubeconfig content for the Cluster.

# Controllers

## Get NKS Controller Details

`client.NKS.Clusters.Controllers.Get(ctx, clusterID, controllerID) (*NKSController, error)`

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

Get details about an NKS controller

### Parameters

- `clusterID string`

- `controllerID string`

### Returns

- `type NKSController struct{…}`

  NKS controller details.

  - `ID string`

    Unique identifier for the controller.

  - `CreatedAt Time`

    When the controller was created.

  - `InstanceType string`

    Instance type name.

  - `Name string`

    Name of the controller.

  - `PrivateIP string`

    Private IP address of the controller.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the controller was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksController, err := client.NKS.Clusters.Controllers.Get(
    context.TODO(),
    "cluster_id",
    "controller_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, query) (*Cursor[NKSController], error)`

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

List all controllers in an NKS cluster

### Parameters

- `clusterID string`

- `query ClusterControllerListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSController struct{…}`

  NKS controller details.

  - `ID string`

    Unique identifier for the controller.

  - `CreatedAt Time`

    When the controller was created.

  - `InstanceType string`

    Instance type name.

  - `Name string`

    Name of the controller.

  - `PrivateIP string`

    Private IP address of the controller.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the controller was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.Controllers.List(
    context.TODO(),
    "cluster_id",
    nks.ClusterControllerListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSController struct{…}`

  NKS controller details.

  - `ID string`

    Unique identifier for the controller.

  - `CreatedAt Time`

    When the controller was created.

  - `InstanceType string`

    Instance type name.

  - `Name string`

    Name of the controller.

  - `PrivateIP string`

    Private IP address of the controller.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the controller was last updated.

### NKS Controller List

- `type NKSControllerList struct{…}`

  - `Items []NKSController`

    - `ID string`

      Unique identifier for the controller.

    - `CreatedAt Time`

      When the controller was created.

    - `InstanceType string`

      Instance type name.

    - `Name string`

      Name of the controller.

    - `PrivateIP string`

      Private IP address of the controller.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `UpdatedAt Time`

      When the controller was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

# Volumes

## Get NKS Controller Volume Details

`client.NKS.Clusters.Controllers.Volumes.Get(ctx, clusterID, controllerID, volumeID) (*NKSControllerVolume, error)`

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

Get details about a volume attached to an NKS controller

### Parameters

- `clusterID string`

- `controllerID string`

- `volumeID string`

### Returns

- `type NKSControllerVolume struct{…}`

  NKS controller volume details.

  - `ID string`

    Unique identifier for the volume.

  - `CreatedAt Time`

    When the volume was created.

  - `Kind VolumeKind`

    Volume kind.

    - `const VolumeKindBoot VolumeKind = "boot"`

    - `const VolumeKindData VolumeKind = "data"`

  - `Name string`

    Name of the volume.

  - `Size int64`

    Size of the volume in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the volume was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksControllerVolume, err := client.NKS.Clusters.Controllers.Volumes.Get(
    context.TODO(),
    "cluster_id",
    "controller_id",
    "volume_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, controllerID, query) (*Cursor[NKSControllerVolume], error)`

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

List all volumes attached to an NKS controller

### Parameters

- `clusterID string`

- `controllerID string`

- `query ClusterControllerVolumeListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSControllerVolume struct{…}`

  NKS controller volume details.

  - `ID string`

    Unique identifier for the volume.

  - `CreatedAt Time`

    When the volume was created.

  - `Kind VolumeKind`

    Volume kind.

    - `const VolumeKindBoot VolumeKind = "boot"`

    - `const VolumeKindData VolumeKind = "data"`

  - `Name string`

    Name of the volume.

  - `Size int64`

    Size of the volume in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the volume was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.Controllers.Volumes.List(
    context.TODO(),
    "cluster_id",
    "controller_id",
    nks.ClusterControllerVolumeListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSControllerVolume struct{…}`

  NKS controller volume details.

  - `ID string`

    Unique identifier for the volume.

  - `CreatedAt Time`

    When the volume was created.

  - `Kind VolumeKind`

    Volume kind.

    - `const VolumeKindBoot VolumeKind = "boot"`

    - `const VolumeKindData VolumeKind = "data"`

  - `Name string`

    Name of the volume.

  - `Size int64`

    Size of the volume in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the volume was last updated.

### NKS Controller Volume List

- `type NKSControllerVolumeList struct{…}`

  - `Items []NKSControllerVolume`

    - `ID string`

      Unique identifier for the volume.

    - `CreatedAt Time`

      When the volume was created.

    - `Kind VolumeKind`

      Volume kind.

      - `const VolumeKindBoot VolumeKind = "boot"`

      - `const VolumeKindData VolumeKind = "data"`

    - `Name string`

      Name of the volume.

    - `Size int64`

      Size of the volume in GB.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `Type VolumeType`

      Type of the Volume.

      - `const VolumeTypeNvme VolumeType = "nvme"`

      - `const VolumeTypeABS VolumeType = "abs"`

    - `UpdatedAt Time`

      When the volume was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

# Load Balancers

## Get NKS Load Balancer Details

`client.NKS.Clusters.LoadBalancers.Get(ctx, clusterID, loadBalancerID) (*NKSLoadBalancer, error)`

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

Get details about an NKS load balancer

### Parameters

- `clusterID string`

- `loadBalancerID string`

### Returns

- `type NKSLoadBalancer struct{…}`

  NKS load balancer details.

  - `ID string`

    Unique identifier for the load balancer.

  - `ClusterID string`

    Cluster this load balancer belongs to.

  - `CreatedAt Time`

    When the load balancer was first discovered.

  - `Namespace string`

    Kubernetes namespace of the load balancer.

  - `PrivateIP string`

    Private IP address of the load balancer.

  - `PublicIP string`

    Public IP address assigned to this load balancer.

  - `PublicIPEnabled bool`

    Whether a public IP is enabled for this load balancer.

  - `ServiceName string`

    Kubernetes service name of the load balancer.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the load balancer was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksLoadBalancer, err := client.NKS.Clusters.LoadBalancers.Get(
    context.TODO(),
    "cluster_id",
    "load_balancer_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, loadBalancerID, body) (*Operation, error)`

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

Update an NKS load balancer

### Parameters

- `clusterID string`

- `loadBalancerID string`

- `body ClusterLoadBalancerUpdateParams`

  - `PublicIPEnabled param.Field[bool]`

    Whether to enable a public IP for this load balancer.

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.LoadBalancers.Update(
    context.TODO(),
    "cluster_id",
    "load_balancer_id",
    nks.ClusterLoadBalancerUpdateParams{
      PublicIPEnabled: true,
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, query) (*Cursor[NKSLoadBalancer], error)`

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

List all load balancers in an NKS cluster

### Parameters

- `clusterID string`

- `query ClusterLoadBalancerListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSLoadBalancer struct{…}`

  NKS load balancer details.

  - `ID string`

    Unique identifier for the load balancer.

  - `ClusterID string`

    Cluster this load balancer belongs to.

  - `CreatedAt Time`

    When the load balancer was first discovered.

  - `Namespace string`

    Kubernetes namespace of the load balancer.

  - `PrivateIP string`

    Private IP address of the load balancer.

  - `PublicIP string`

    Public IP address assigned to this load balancer.

  - `PublicIPEnabled bool`

    Whether a public IP is enabled for this load balancer.

  - `ServiceName string`

    Kubernetes service name of the load balancer.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the load balancer was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.LoadBalancers.List(
    context.TODO(),
    "cluster_id",
    nks.ClusterLoadBalancerListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSLoadBalancer struct{…}`

  NKS load balancer details.

  - `ID string`

    Unique identifier for the load balancer.

  - `ClusterID string`

    Cluster this load balancer belongs to.

  - `CreatedAt Time`

    When the load balancer was first discovered.

  - `Namespace string`

    Kubernetes namespace of the load balancer.

  - `PrivateIP string`

    Private IP address of the load balancer.

  - `PublicIP string`

    Public IP address assigned to this load balancer.

  - `PublicIPEnabled bool`

    Whether a public IP is enabled for this load balancer.

  - `ServiceName string`

    Kubernetes service name of the load balancer.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the load balancer was last updated.

### NKS Load Balancer List

- `type NKSLoadBalancerList struct{…}`

  - `Items []NKSLoadBalancer`

    - `ID string`

      Unique identifier for the load balancer.

    - `ClusterID string`

      Cluster this load balancer belongs to.

    - `CreatedAt Time`

      When the load balancer was first discovered.

    - `Namespace string`

      Kubernetes namespace of the load balancer.

    - `PrivateIP string`

      Private IP address of the load balancer.

    - `PublicIP string`

      Public IP address assigned to this load balancer.

    - `PublicIPEnabled bool`

      Whether a public IP is enabled for this load balancer.

    - `ServiceName string`

      Kubernetes service name of the load balancer.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `UpdatedAt Time`

      When the load balancer was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

# Pools

## Create NKS Node Pool

`client.NKS.Clusters.Pools.New(ctx, clusterID, body) (*Operation, error)`

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

Create a node pool in an NKS cluster

### Parameters

- `clusterID string`

- `body ClusterPoolNewParams`

  - `Name param.Field[string]`

    Name of the node pool.

  - `NodeConfig param.Field[NKSNodePoolNodeConfig]`

    Node configuration.

  - `NodeCount param.Field[int64]`

    Number of nodes. Must be between 1 and 100.

  - `Tags param.Field[[]string]`

    Tags to attach to the node pool.

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/compute"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.Pools.New(
    context.TODO(),
    "cluster_id",
    nks.ClusterPoolNewParams{
      Name: "my-node-pool",
      NodeConfig: nks.NKSNodePoolNodeConfigParam{
        BootVolume: nks.NKSNodePoolBootVolumeParam{
          Size: 100,
          Type: compute.VolumeTypeABS,
        },
        InstanceType: "n1-standard-8",
      },
      NodeCount: 3,
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, poolID) (*NKSNodePool, error)`

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

Get details about an NKS node pool

### Parameters

- `clusterID string`

- `poolID string`

### Returns

- `type NKSNodePool struct{…}`

  NKS node pool details.

  - `ID string`

    Unique identifier for the node pool.

  - `ClusterID string`

    ID of the Cluster this node pool belongs to.

  - `CreatedAt Time`

    When the node pool was created.

  - `Name string`

    Name of the node pool.

  - `NodeConfig NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `BootVolume NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `Size int64`

        Size of the boot volume in GB.

      - `Type VolumeType`

        Type of the Volume.

        - `const VolumeTypeNvme VolumeType = "nvme"`

        - `const VolumeTypeABS VolumeType = "abs"`

    - `InstanceType string`

      Instance type name.

    - `Labels []string`

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

  - `NodeCount int64`

    Number of nodes.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Tags []string`

    Tags attached to the node pool.

  - `UpdatedAt Time`

    When the node pool was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksNodePool, err := client.NKS.Clusters.Pools.Get(
    context.TODO(),
    "cluster_id",
    "pool_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, poolID, body) (*Operation, error)`

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

Update an NKS node pool

### Parameters

- `clusterID string`

- `poolID string`

- `body ClusterPoolUpdateParams`

  - `Name param.Field[string]`

    Name of the node pool.

  - `NodeConfig param.Field[ClusterPoolUpdateParamsNodeConfig]`

    Partial node configuration update.

    - `Labels []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.

  - `NodeCount param.Field[int64]`

    Number of nodes.

  - `Tags param.Field[[]string]`

    Tags to attach to the node pool.

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.Pools.Update(
    context.TODO(),
    "cluster_id",
    "pool_id",
    nks.ClusterPoolUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, poolID) (*Operation, error)`

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

Delete an NKS node pool

### Parameters

- `clusterID string`

- `poolID string`

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.Pools.Delete(
    context.TODO(),
    "cluster_id",
    "pool_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, query) (*Cursor[NKSNodePool], error)`

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

List all node pools in an NKS cluster

### Parameters

- `clusterID string`

- `query ClusterPoolListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSNodePool struct{…}`

  NKS node pool details.

  - `ID string`

    Unique identifier for the node pool.

  - `ClusterID string`

    ID of the Cluster this node pool belongs to.

  - `CreatedAt Time`

    When the node pool was created.

  - `Name string`

    Name of the node pool.

  - `NodeConfig NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `BootVolume NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `Size int64`

        Size of the boot volume in GB.

      - `Type VolumeType`

        Type of the Volume.

        - `const VolumeTypeNvme VolumeType = "nvme"`

        - `const VolumeTypeABS VolumeType = "abs"`

    - `InstanceType string`

      Instance type name.

    - `Labels []string`

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

  - `NodeCount int64`

    Number of nodes.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Tags []string`

    Tags attached to the node pool.

  - `UpdatedAt Time`

    When the node pool was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.Pools.List(
    context.TODO(),
    "cluster_id",
    nks.ClusterPoolListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSNodePool struct{…}`

  NKS node pool details.

  - `ID string`

    Unique identifier for the node pool.

  - `ClusterID string`

    ID of the Cluster this node pool belongs to.

  - `CreatedAt Time`

    When the node pool was created.

  - `Name string`

    Name of the node pool.

  - `NodeConfig NKSNodePoolNodeConfigResponse`

    Node configuration.

    - `BootVolume NKSNodePoolBootVolumeResponse`

      Boot volume configuration.

      - `Size int64`

        Size of the boot volume in GB.

      - `Type VolumeType`

        Type of the Volume.

        - `const VolumeTypeNvme VolumeType = "nvme"`

        - `const VolumeTypeABS VolumeType = "abs"`

    - `InstanceType string`

      Instance type name.

    - `Labels []string`

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

  - `NodeCount int64`

    Number of nodes.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Tags []string`

    Tags attached to the node pool.

  - `UpdatedAt Time`

    When the node pool was last updated.

### NKS Node Pool Boot Volume

- `type NKSNodePoolBootVolume struct{…}`

  Boot volume configuration.

  - `Size int64`

    Size of the boot volume in GB.

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

### NKS Node Pool Boot Volume Response

- `type NKSNodePoolBootVolumeResponse struct{…}`

  Boot volume configuration.

  - `Size int64`

    Size of the boot volume in GB.

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

### NKS Node Pool List

- `type NKSNodePoolList struct{…}`

  - `Items []NKSNodePool`

    - `ID string`

      Unique identifier for the node pool.

    - `ClusterID string`

      ID of the Cluster this node pool belongs to.

    - `CreatedAt Time`

      When the node pool was created.

    - `Name string`

      Name of the node pool.

    - `NodeConfig NKSNodePoolNodeConfigResponse`

      Node configuration.

      - `BootVolume NKSNodePoolBootVolumeResponse`

        Boot volume configuration.

        - `Size int64`

          Size of the boot volume in GB.

        - `Type VolumeType`

          Type of the Volume.

          - `const VolumeTypeNvme VolumeType = "nvme"`

          - `const VolumeTypeABS VolumeType = "abs"`

      - `InstanceType string`

        Instance type name.

      - `Labels []string`

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

    - `NodeCount int64`

      Number of nodes.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `Tags []string`

      Tags attached to the node pool.

    - `UpdatedAt Time`

      When the node pool was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

### NKS Node Pool Node Config

- `type NKSNodePoolNodeConfig struct{…}`

  Node configuration.

  - `BootVolume NKSNodePoolBootVolume`

    Boot volume configuration.

    - `Size int64`

      Size of the boot volume in GB.

    - `Type VolumeType`

      Type of the Volume.

      - `const VolumeTypeNvme VolumeType = "nvme"`

      - `const VolumeTypeABS VolumeType = "abs"`

  - `InstanceType string`

    Instance type name used for worker nodes.

  - `Labels []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

- `type NKSNodePoolNodeConfigResponse struct{…}`

  Node configuration.

  - `BootVolume NKSNodePoolBootVolumeResponse`

    Boot volume configuration.

    - `Size int64`

      Size of the boot volume in GB.

    - `Type VolumeType`

      Type of the Volume.

      - `const VolumeTypeNvme VolumeType = "nvme"`

      - `const VolumeTypeABS VolumeType = "abs"`

  - `InstanceType string`

    Instance type name.

  - `Labels []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.New(ctx, clusterID, body) error`

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

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

### Parameters

- `clusterID string`

- `body ClusterPoolAvailabilityNewParams`

  - `Name param.Field[string]`

    Name of the node pool.

  - `NodeConfig param.Field[NKSNodePoolNodeConfig]`

    Node configuration.

  - `NodeCount param.Field[int64]`

    Number of nodes. Must be between 1 and 100.

  - `Tags param.Field[[]string]`

    Tags to attach to the node pool.

### Example

```go
package main

import (
  "context"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/compute"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.NKS.Clusters.Pools.Availability.New(
    context.TODO(),
    "cluster_id",
    nks.ClusterPoolAvailabilityNewParams{
      Name: "my-node-pool",
      NodeConfig: nks.NKSNodePoolNodeConfigParam{
        BootVolume: nks.NKSNodePoolBootVolumeParam{
          Size: 100,
          Type: compute.VolumeTypeABS,
        },
        InstanceType: "n1-standard-8",
      },
      NodeCount: 3,
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

## Check Update NKS Node Pool Availability

`client.NKS.Clusters.Pools.Availability.Update(ctx, clusterID, poolID, body) error`

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

Check if an NKS node pool can be updated

### Parameters

- `clusterID string`

- `poolID string`

- `body ClusterPoolAvailabilityUpdateParams`

  - `Name param.Field[string]`

    Name of the node pool.

  - `NodeConfig param.Field[ClusterPoolAvailabilityUpdateParamsNodeConfig]`

    Partial node configuration update.

    - `Labels []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.

  - `NodeCount param.Field[int64]`

    Number of nodes.

  - `Tags param.Field[[]string]`

    Tags to attach to the node pool.

### Example

```go
package main

import (
  "context"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.NKS.Clusters.Pools.Availability.Update(
    context.TODO(),
    "cluster_id",
    "pool_id",
    nks.ClusterPoolAvailabilityUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

# Nodes

## Get NKS Node Details

`client.NKS.Clusters.Pools.Nodes.Get(ctx, clusterID, poolID, nodeID) (*NKSNode, error)`

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

Get details about an NKS node

### Parameters

- `clusterID string`

- `poolID string`

- `nodeID string`

### Returns

- `type NKSNode struct{…}`

  NKS node details.

  - `ID string`

    Unique identifier for the node.

  - `CreatedAt Time`

    When the node was created.

  - `Name string`

    Name of the node.

  - `PrivateIP string`

    Private IP address of the node.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the node was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksNode, err := client.NKS.Clusters.Pools.Nodes.Get(
    context.TODO(),
    "cluster_id",
    "pool_id",
    "node_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, poolID, nodeID) (*Operation, error)`

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

Delete a single node from an NKS node pool

### Parameters

- `clusterID string`

- `poolID string`

- `nodeID string`

### Returns

- `type Operation struct{…}`

  Operation details.

  - `ID string`

    Unique identifier for the Operation.

  - `CreatedAt Time`

    When the Operation was created.

  - `Details OperationDetails`

    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 OperationFieldDiffFromUnion`

        Previous value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffFromArray []string`

      - `To OperationFieldDiffToUnion`

        New value.

        - `string`

        - `float64`

        - `bool`

        - `type OperationFieldDiffToArray []string`

  - `Kind OperationKind`

    Kind of Operation.

    - `const OperationKindVM OperationKind = "vm"`

    - `const OperationKindVolume OperationKind = "volume"`

    - `const OperationKindVPC OperationKind = "vpc"`

    - `const OperationKindFirewallRule OperationKind = "firewall_rule"`

    - `const OperationKindNKSCluster OperationKind = "nks_cluster"`

    - `const OperationKindNKSNodePool OperationKind = "nks_node_pool"`

  - `ProjectID string`

    Project ID the Operation belongs to.

  - `ResourceID string`

    ID of the resource that the Operation is acting on.

  - `Status OperationStatus`

    Status of the Operation.

    - `const OperationStatusPending OperationStatus = "pending"`

    - `const OperationStatusRunning OperationStatus = "running"`

    - `const OperationStatusDone OperationStatus = "done"`

    - `const OperationStatusFailed OperationStatus = "failed"`

    - `const OperationStatusUnknown OperationStatus = "unknown"`

  - `Type OperationType`

    Type of Operation.

    - `const OperationTypeCreate OperationType = "create"`

    - `const OperationTypeUpdate OperationType = "update"`

    - `const OperationTypeDelete OperationType = "delete"`

    - `const OperationTypeRestart OperationType = "restart"`

  - `UpdatedAt Time`

    When the Operation was updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  operation, err := client.NKS.Clusters.Pools.Nodes.Delete(
    context.TODO(),
    "cluster_id",
    "pool_id",
    "node_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, poolID, query) (*Cursor[NKSNode], error)`

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

List all nodes in an NKS node pool

### Parameters

- `clusterID string`

- `poolID string`

- `query ClusterPoolNodeListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSNode struct{…}`

  NKS node details.

  - `ID string`

    Unique identifier for the node.

  - `CreatedAt Time`

    When the node was created.

  - `Name string`

    Name of the node.

  - `PrivateIP string`

    Private IP address of the node.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the node was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.Pools.Nodes.List(
    context.TODO(),
    "cluster_id",
    "pool_id",
    nks.ClusterPoolNodeListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSNode struct{…}`

  NKS node details.

  - `ID string`

    Unique identifier for the node.

  - `CreatedAt Time`

    When the node was created.

  - `Name string`

    Name of the node.

  - `PrivateIP string`

    Private IP address of the node.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `UpdatedAt Time`

    When the node was last updated.

### NKS Node List

- `type NKSNodeList struct{…}`

  - `Items []NKSNode`

    - `ID string`

      Unique identifier for the node.

    - `CreatedAt Time`

      When the node was created.

    - `Name string`

      Name of the node.

    - `PrivateIP string`

      Private IP address of the node.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `UpdatedAt Time`

      When the node was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`

# Volumes

## Get NKS Node Volume Details

`client.NKS.Clusters.Pools.Nodes.Volumes.Get(ctx, clusterID, poolID, nodeID, volumeID) (*NKSNodeVolume, error)`

**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

- `clusterID string`

- `poolID string`

- `nodeID string`

- `volumeID string`

### Returns

- `type NKSNodeVolume struct{…}`

  NKS node volume details.

  - `ID string`

    Unique identifier for the volume.

  - `CreatedAt Time`

    When the volume was created.

  - `Kind VolumeKind`

    Volume kind.

    - `const VolumeKindBoot VolumeKind = "boot"`

    - `const VolumeKindData VolumeKind = "data"`

  - `Name string`

    Name of the volume.

  - `Size int64`

    Size of the volume in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the volume was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  nksNodeVolume, err := client.NKS.Clusters.Pools.Nodes.Volumes.Get(
    context.TODO(),
    "cluster_id",
    "pool_id",
    "node_id",
    "volume_id",
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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(ctx, clusterID, poolID, nodeID, query) (*Cursor[NKSNodeVolume], error)`

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

List all volumes attached to an NKS node

### Parameters

- `clusterID string`

- `poolID string`

- `nodeID string`

- `query ClusterPoolNodeVolumeListParams`

  - `Cursor param.Field[string]`

    Pagination cursor returned by a previous request

  - `Limit param.Field[int64]`

    Maximum number of items to return

### Returns

- `type NKSNodeVolume struct{…}`

  NKS node volume details.

  - `ID string`

    Unique identifier for the volume.

  - `CreatedAt Time`

    When the volume was created.

  - `Kind VolumeKind`

    Volume kind.

    - `const VolumeKindBoot VolumeKind = "boot"`

    - `const VolumeKindData VolumeKind = "data"`

  - `Name string`

    Name of the volume.

  - `Size int64`

    Size of the volume in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the volume was last updated.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/nks"
  "github.com/nirvana-labs/nirvana-go/option"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.NKS.Clusters.Pools.Nodes.Volumes.List(
    context.TODO(),
    "cluster_id",
    "pool_id",
    "node_id",
    nks.ClusterPoolNodeVolumeListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### 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

- `type NKSNodeVolume struct{…}`

  NKS node volume details.

  - `ID string`

    Unique identifier for the volume.

  - `CreatedAt Time`

    When the volume was created.

  - `Kind VolumeKind`

    Volume kind.

    - `const VolumeKindBoot VolumeKind = "boot"`

    - `const VolumeKindData VolumeKind = "data"`

  - `Name string`

    Name of the volume.

  - `Size int64`

    Size of the volume in GB.

  - `Status ResourceStatus`

    Status of the resource.

    - `const ResourceStatusPending ResourceStatus = "pending"`

    - `const ResourceStatusCreating ResourceStatus = "creating"`

    - `const ResourceStatusUpdating ResourceStatus = "updating"`

    - `const ResourceStatusReady ResourceStatus = "ready"`

    - `const ResourceStatusDeleting ResourceStatus = "deleting"`

    - `const ResourceStatusDeleted ResourceStatus = "deleted"`

    - `const ResourceStatusError ResourceStatus = "error"`

  - `Type VolumeType`

    Type of the Volume.

    - `const VolumeTypeNvme VolumeType = "nvme"`

    - `const VolumeTypeABS VolumeType = "abs"`

  - `UpdatedAt Time`

    When the volume was last updated.

### NKS Node Volume List

- `type NKSNodeVolumeList struct{…}`

  - `Items []NKSNodeVolume`

    - `ID string`

      Unique identifier for the volume.

    - `CreatedAt Time`

      When the volume was created.

    - `Kind VolumeKind`

      Volume kind.

      - `const VolumeKindBoot VolumeKind = "boot"`

      - `const VolumeKindData VolumeKind = "data"`

    - `Name string`

      Name of the volume.

    - `Size int64`

      Size of the volume in GB.

    - `Status ResourceStatus`

      Status of the resource.

      - `const ResourceStatusPending ResourceStatus = "pending"`

      - `const ResourceStatusCreating ResourceStatus = "creating"`

      - `const ResourceStatusUpdating ResourceStatus = "updating"`

      - `const ResourceStatusReady ResourceStatus = "ready"`

      - `const ResourceStatusDeleting ResourceStatus = "deleting"`

      - `const ResourceStatusDeleted ResourceStatus = "deleted"`

      - `const ResourceStatusError ResourceStatus = "error"`

    - `Type VolumeType`

      Type of the Volume.

      - `const VolumeTypeNvme VolumeType = "nvme"`

      - `const VolumeTypeABS VolumeType = "abs"`

    - `UpdatedAt Time`

      When the volume was last updated.

  - `Pagination Pagination`

    Pagination response details.

    - `NextCursor string`

    - `PreviousCursor string`

    - `TotalCount int64`
