Skip to content
DocsOpenAPI spec

    Get Agent Cluster

    client.SandboxClusters.Get(ctx, sandboxClusterID) (*SandboxCluster, error)
    GET/v1/sandbox_clusters/{sandbox_cluster_id}

    Get an Agent Cluster

    ParametersExpand Collapse
    sandboxClusterID string
    ReturnsExpand Collapse
    type SandboxCluster struct{…}

    An Agent Cluster: a cluster sandboxes run on, in one region.

    ID string

    Unique identifier for the Agent Cluster.

    CreatedAt Time

    When the Agent 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 Agent Cluster gets a new one.

    InstanceType string

    Instance type of the nodes the sandboxes run on.

    Name string

    Name of the Agent Cluster.

    NodeCount int64

    Number of nodes the sandboxes run on.

    ProjectID string

    ID of the project the Agent 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 Agent Cluster.

    UpdatedAt Time

    When the Agent Cluster was last updated.

    formatdate-time

    Get Agent Cluster

    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"),
      )
      sandboxCluster, err := client.SandboxClusters.Get(context.TODO(), "sandbox_cluster_id")
      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"
    }