godo.HostedAgents.GetAgentConfig()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.HostedAgents.GetAgentConfig(ctx context.Context, configID string) (*godo.HostedAgentConfig, *godo.Response, error)

Description

GetAgentConfig returns one Environment with redacted credential slots. Prefer GetEnvironment; this name remains for compatibility.

Parameters

configID string required

Returns

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

HostedAgentConfig is an immutable team-scoped environment definition (product name: Environment; historically called Agent Config). Prefer HostedEnvironment; this name remains for compatibility.

ID string

JSON key: id

Name string

JSON key: name

AgentSpecSchemaVersion string

JSON key: agentspec_schema_version

Manifest json.RawMessage

JSON key: manifest

ContentHash string

JSON key: content_hash

CreatedBy string

JSON key: created_by

CreatedAt godo.Timestamp

JSON key: created_at

UpdatedAt godo.Timestamp

JSON key: updated_at

Credentials []godo.HostedAgentConfigCredentialSlot

Omitted from JSON when empty. JSON key: credentials

Warnings []string

Warnings carries non-fatal create-time advisories computed from the
manifest. It is populated on the create response only.

Omitted from JSON when empty. JSON key: warnings

Region string

Region is the DO region slug the Environment lives in, e.g. "ric1". An
Environment is a regional resource: it is placed in the region of the API
host that created it (see HostedAgentsRegionalBaseURL), is a 404 on every
other region's host, and a session can only be created from it on that
same host. There is no copy or sync between regions. Returned on
create/get/list for teams on the regional routing rollout; omitted
otherwise, and for rows created before the field existed (all ric1).

Omitted from JSON when empty. JSON key: region

Location string

Location is the Environment's canonical URL from the create response's
Location header, on the host of the region that owns it. Populated only
by the create methods, only when the server sent the header (teams on the
regional routing rollout); never on the wire.

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

More Information

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.