godo.HostedAgents.GetTemplateBuild()

Generated on 25 Nov 2026 from godo version v1.246.0

Usage

client.HostedAgents.GetTemplateBuild(ctx context.Context, templateID string, buildID string) (*godo.HostedAgentTemplateBuild, *godo.Response, error)

Description

GetTemplateBuild returns a single template build.

This method sends a GET request to /v2/harness-runtime/templates/{}/builds/{}.

Parameters

templateID string required
buildID string required

Returns

*godo.HostedAgentTemplateBuild
*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.HostedAgentTemplateBuild

HostedAgentTemplateBuild is one immutable build of a template.

BuildID string

JSON key: build_id

TemplateID string

Omitted from JSON when empty. JSON key: template_id

Name string

Omitted from JSON when empty. JSON key: name

Spec *godo.HostedAgentTemplateSpec

Omitted from JSON when empty. JSON key: spec

Status godo.HostedAgentTemplateBuildStatus

JSON key: status

Error string

Omitted from JSON when empty. JSON key: error

CreatedAt godo.Timestamp

JSON key: created_at

UpdatedAt godo.Timestamp

JSON key: updated_at

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.GetTemplateBuild(ctx, "<your-template-id>", "<your-build-id>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

More Information

See GET /v2/harness-runtime/templates/{}/builds/{} 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.