godo.Registry.Create()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Registry.Create(ctx context.Context, create *godo.RegistryCreateRequest) (*godo.Registry, *godo.Response, error)

Description

Create creates a registry.

This method sends a POST request to /v2/registry.

Parameters

create *godo.RegistryCreateRequest required

Fields of godo.RegistryCreateRequest

RegistryCreateRequest represents a request to create a registry.

Name string

Omitted from JSON when empty. JSON key: name

SubscriptionTierSlug string

Omitted from JSON when empty. JSON key: subscription_tier_slug

Region string

Omitted from JSON when empty. JSON key: region

Returns

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

Registry represents a registry.

UUID string

Omitted from JSON when empty. JSON key: uuid

Name string

Omitted from JSON when empty. JSON key: name

StorageUsageBytes uint64

Omitted from JSON when empty. JSON key: storage_usage_bytes

StorageUsageBytesUpdatedAt time.Time

Omitted from JSON when empty. JSON key: storage_usage_bytes_updated_at

CreatedAt time.Time

Omitted from JSON when empty. JSON key: created_at

Region string

Omitted from JSON when empty. JSON key: region

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.Registry.Create(ctx, &godo.RegistryCreateRequest{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

More Information

See POST /v2/registry 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.