godo.ADS.UpdateDataFlow()

Generated on 23 Nov 2026 from godo version v1.245.0

Usage

client.ADS.UpdateDataFlow(ctx context.Context, update *godo.ADSDataFlowUpdateRequest) (*godo.ADSDataFlowUpdateResponse, *godo.Response, error)

Description

UpdateDataFlow patches a data flow. Region comes from update and is used as the path segment only.

Parameters

update *godo.ADSDataFlowUpdateRequest required

Fields of godo.ADSDataFlowUpdateRequest

ADSDataFlowUpdateRequest is the body for UpdateDataFlow. Region is path-only and is not sent in the JSON body. Workspace and ID are required path segments and are also sent in the body. A nil DesiredReplicas leaves the replica count unchanged; 0 pauses the data flow and must be sent without other fields.

Region string
ID string

JSON key: id

Workspace string

JSON key: workspace

DesiredReplicas *int32

Omitted from JSON when empty. JSON key: desired_replicas

MaxReplicas int32

Omitted from JSON when empty. JSON key: max_replicas

SecretRefs []string

Omitted from JSON when empty. JSON key: secret_refs

ClearSecretRefs bool

Omitted from JSON when empty. JSON key: clear_secret_refs

Manifest json.RawMessage

Omitted from JSON when empty. JSON key: manifest

Returns

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

ADSDataFlowUpdateResponse is the body of UpdateDataFlow.

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.UpdateDataFlow(ctx, &godo.ADSDataFlowUpdateRequest{
		Region: "<your-region>",
		ID: "<your-id>",
		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.