godo.PartnerAttachment.GetServiceKey()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.PartnerAttachment.GetServiceKey(ctx context.Context, id string) (*godo.ServiceKey, *godo.Response, error)

Description

This method sends a GET request to /v2/partner_network_connect/attachments/{}/service_key.

Parameters

id string required

Returns

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

ServiceKey represents the service key of a Partner Attachment.

Value string

Omitted from JSON when empty. JSON key: value

State string

Omitted from JSON when empty. JSON key: state

CreatedAt time.Time

Omitted from JSON when empty. JSON key: created_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.PartnerAttachment.GetServiceKey(ctx, "<your-id>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "service_key": {
    "created_at": "2020-03-13T19:20:47.442049222Z",
    "value": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "state": "CREATED"
  }
}

More Information

See GET /v2/partner_network_connect/attachments/{}/service_key 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.