Skip to content
DocsOpenAPI spec

    Update Sandbox Cluster

    client.sandboxClusters.update(stringsandboxClusterID, SandboxClusterUpdateParams { name, tags } body, RequestOptionsoptions?): SandboxCluster { id, created_at, gateway_hostname, 8 more }
    PATCH/v1/sandbox_clusters/{sandbox_cluster_id}

    Update a Sandbox Cluster’s name and tags

    ParametersExpand Collapse
    sandboxClusterID: string
    body: SandboxClusterUpdateParams { name, tags }
    name?: string

    Name of the Sandbox Cluster. Unique within its project.

    tags?: Array<string>

    Tags to attach to the Sandbox Cluster.

    ReturnsExpand Collapse
    SandboxCluster { id, created_at, gateway_hostname, 8 more }

    A cluster sandboxes run on, in one region.

    id: string

    Unique identifier for the Sandbox Cluster.

    created_at: string

    When the Sandbox Cluster was created.

    formatdate-time
    gateway_hostname: string | null

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

    instance_type: string

    Instance type of the nodes the sandboxes run on.

    name: string

    Name of the Sandbox Cluster.

    node_count: number

    Number of nodes the sandboxes run on.

    project_id: string

    ID of the project the Sandbox Cluster is in.

    region: RegionName

    Region the resource is in.

    One of the following:
    "us-sva-2"
    "us-wdc-1"

    Status of the resource.

    One of the following:
    "pending"
    "creating"
    "updating"
    "ready"
    "deleting"
    "deleted"
    "error"
    "suspended"
    tags: Array<string>

    Tags attached to the Sandbox Cluster.

    updated_at: string

    When the Sandbox Cluster was last updated.

    formatdate-time

    Update Sandbox Cluster

    import NirvanaLabs from '@nirvana-labs/nirvana';
    
    const client = new NirvanaLabs({
      apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
    });
    
    const sandboxCluster = await client.sandboxClusters.update('sandbox_cluster_id');
    
    console.log(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"
    }