Skip to content
DocsOpenAPI spec

    Update Sandbox Cluster

    client.SandboxClusters.Update(ctx, sandboxClusterID, body) (*SandboxCluster, error)
    PATCH/v1/sandbox_clusters/{sandbox_cluster_id}

    Update a Sandbox Cluster’s name and tags

    ParametersExpand Collapse
    sandboxClusterID string
    body SandboxClusterUpdateParams
    Name param.Field[string]Optional

    Name of the Sandbox Cluster. Unique within its project.

    Tags param.Field[[]string]Optional

    Tags to attach to the Sandbox Cluster.

    ReturnsExpand Collapse
    type SandboxCluster struct{…}

    A cluster sandboxes run on, in one region.

    ID string

    Unique identifier for the Sandbox Cluster.

    CreatedAt Time

    When the Sandbox Cluster was created.

    formatdate-time
    GatewayHostname string

    Hostname sandboxes’ endpoints are served on over HTTPS, to allow in outbound firewalls. Null until assigned; a recreated Sandbox Cluster gets a new one.

    InstanceType string

    Instance type of the nodes the sandboxes run on.

    Name string

    Name of the Sandbox Cluster.

    NodeCount int64

    Number of nodes the sandboxes run on.

    ProjectID string

    ID of the project the Sandbox Cluster is in.

    Region RegionName

    Region the resource is in.

    One of the following:
    const RegionNameUsSva2 RegionName = "us-sva-2"
    const RegionNameUsWdc1 RegionName = "us-wdc-1"

    Status of the resource.

    One of the following:
    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"
    const ResourceStatusSuspended ResourceStatus = "suspended"
    Tags []string

    Tags attached to the Sandbox Cluster.

    UpdatedAt Time

    When the Sandbox Cluster was last updated.

    formatdate-time

    Update Sandbox Cluster

    package main
    
    import (
      "context"
      "fmt"
    
      "github.com/nirvana-labs/nirvana-go"
      "github.com/nirvana-labs/nirvana-go/option"
      "github.com/nirvana-labs/nirvana-go/sandbox_clusters"
    )
    
    func main() {
      client := nirvana.NewClient(
        option.WithAPIKey("My API Key"),
      )
      sandboxCluster, err := client.SandboxClusters.Update(
        context.TODO(),
        "sandbox_cluster_id",
        sandbox_clusters.SandboxClusterUpdateParams{
    
        },
      )
      if err != nil {
        panic(err.Error())
      }
      fmt.Printf("%+v\n", sandboxCluster.ID)
    }
    
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "gateway_hostname": "gw.0123456789ab.example.com",
      "instance_type": "n1-standard-8",
      "name": "my-sandboxes",
      "node_count": 3,
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "region": "us-sva-2",
      "status": "ready",
      "tags": [
        "production",
        "agents"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }
    Returns Examples
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2025-01-01T00:00:00Z",
      "gateway_hostname": "gw.0123456789ab.example.com",
      "instance_type": "n1-standard-8",
      "name": "my-sandboxes",
      "node_count": 3,
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "region": "us-sva-2",
      "status": "ready",
      "tags": [
        "production",
        "agents"
      ],
      "updated_at": "2025-01-01T00:00:00Z"
    }