godo.ADS.CreateDataFlow()

Generated on 23 Nov 2026 from godo version v1.245.0

Usage

client.ADS.CreateDataFlow(ctx context.Context, create *godo.ADSDataFlowCreateRequest) (*godo.ADSDataFlowCreateResponse, *godo.Response, error)

Description

CreateDataFlow creates a data flow in the workspace on create. Region comes from create and is used as the path segment only.

Parameters

create *godo.ADSDataFlowCreateRequest required

Fields of godo.ADSDataFlowCreateRequest

ADSDataFlowCreateRequest is the body for CreateDataFlow. Region is path-only and is not sent in the JSON body. Workspace is required and used as a path segment; it is also sent in the body.

Region string
Name string

Omitted from JSON when empty. JSON key: name

DesiredReplicas int32

Omitted from JSON when empty. JSON key: desired_replicas

MaxReplicas int32

Omitted from JSON when empty. JSON key: max_replicas

Workspace string

JSON key: workspace

ImageRef string

Omitted from JSON when empty. JSON key: image_ref

Manifest json.RawMessage

Omitted from JSON when empty. JSON key: manifest

Returns

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

ADSDataFlowCreateResponse is the body of CreateDataFlow.

UUID string

Omitted from JSON when empty. JSON key: uuid

State string

Omitted from JSON when empty. JSON key: state

Upload *godo.ADSTarballUpload

Omitted from JSON when empty. JSON key: upload

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.ADS.CreateDataFlow(ctx, &godo.ADSDataFlowCreateRequest{
		Region: "<your-region>",
		Workspace: "<your-workspace>",
	})
	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.