godo.HostedAgents.ListSandboxSizes()

Generated on 25 Nov 2026 from godo version v1.246.0

Usage

client.HostedAgents.ListSandboxSizes(ctx context.Context) (*godo.HostedAgentSandboxSizesResponse, *godo.Response, error)

Description

ListSandboxSizes returns the customer-selectable sandbox (microVM) size catalog. The set is the single source of truth shared with create-time validation; every returned slug is accepted as spec.sandbox.sizeSlug. Sizes are ordered smallest-to-largest. The catalog is static and independent of team/session; there is no pagination.

This method sends a GET request to /v2/harness-runtime/sessions/sandbox/sizes.

Returns

*godo.HostedAgentSandboxSizesResponse
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.HostedAgentSandboxSizesResponse

HostedAgentSandboxSizesResponse is returned by ListSandboxSizes.

Sizes []godo.HostedAgentSandboxSize

Sizes is ordered smallest-to-largest.

JSON key: sizes

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.HostedAgents.ListSandboxSizes(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

More Information

See GET /v2/harness-runtime/sessions/sandbox/sizes in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.