## Update Stream `client.Pipelines.Streams.Update(ctx, streamID, params) (*StreamUpdateResponse, error)` **patch** `/accounts/{account_id}/pipelines/v1/streams/{stream_id}` Update a Stream. ### Parameters - `streamID string` Specifies the public ID of the stream. - `params StreamUpdateParams` - `AccountID param.Field[string]` Path param: Specifies the public ID of the account. - `HTTP param.Field[StreamUpdateParamsHTTP]` Body param - `Authentication bool` Indicates that authentication is required for the HTTP endpoint. - `Enabled bool` Indicates that the HTTP endpoint is enabled. - `CORS StreamUpdateParamsHTTPCORS` Specifies the CORS options for the HTTP endpoint. - `Origins []string` - `WorkerBinding param.Field[StreamUpdateParamsWorkerBinding]` Body param - `Enabled bool` Indicates that the worker binding is enabled. ### Returns - `type StreamUpdateResponse struct{…}` - `ID string` Indicates a unique identifier for this stream. - `CreatedAt Time` - `HTTP StreamUpdateResponseHTTP` - `Authentication bool` Indicates that authentication is required for the HTTP endpoint. - `Enabled bool` Indicates that the HTTP endpoint is enabled. - `CORS StreamUpdateResponseHTTPCORS` Specifies the CORS options for the HTTP endpoint. - `Origins []string` - `ModifiedAt Time` - `Name string` Indicates the name of the Stream. - `Version int64` Indicates the current version of this stream. - `WorkerBinding StreamUpdateResponseWorkerBinding` - `Enabled bool` Indicates that the worker binding is enabled. - `Endpoint string` Indicates the endpoint URL of this stream. - `Format StreamUpdateResponseFormat` - `type StreamUpdateResponseFormatJson struct{…}` - `Type StreamUpdateResponseFormatJsonType` - `const StreamUpdateResponseFormatJsonTypeJson StreamUpdateResponseFormatJsonType = "json"` - `DecimalEncoding StreamUpdateResponseFormatJsonDecimalEncoding` - `const StreamUpdateResponseFormatJsonDecimalEncodingNumber StreamUpdateResponseFormatJsonDecimalEncoding = "number"` - `const StreamUpdateResponseFormatJsonDecimalEncodingString StreamUpdateResponseFormatJsonDecimalEncoding = "string"` - `const StreamUpdateResponseFormatJsonDecimalEncodingBytes StreamUpdateResponseFormatJsonDecimalEncoding = "bytes"` - `TimestampFormat StreamUpdateResponseFormatJsonTimestampFormat` - `const StreamUpdateResponseFormatJsonTimestampFormatRfc3339 StreamUpdateResponseFormatJsonTimestampFormat = "rfc3339"` - `const StreamUpdateResponseFormatJsonTimestampFormatUnixMillis StreamUpdateResponseFormatJsonTimestampFormat = "unix_millis"` - `Unstructured bool` - `type StreamUpdateResponseFormatParquet struct{…}` - `Type StreamUpdateResponseFormatParquetType` - `const StreamUpdateResponseFormatParquetTypeParquet StreamUpdateResponseFormatParquetType = "parquet"` - `Compression StreamUpdateResponseFormatParquetCompression` - `const StreamUpdateResponseFormatParquetCompressionUncompressed StreamUpdateResponseFormatParquetCompression = "uncompressed"` - `const StreamUpdateResponseFormatParquetCompressionSnappy StreamUpdateResponseFormatParquetCompression = "snappy"` - `const StreamUpdateResponseFormatParquetCompressionGzip StreamUpdateResponseFormatParquetCompression = "gzip"` - `const StreamUpdateResponseFormatParquetCompressionZstd StreamUpdateResponseFormatParquetCompression = "zstd"` - `const StreamUpdateResponseFormatParquetCompressionLz4 StreamUpdateResponseFormatParquetCompression = "lz4"` - `RowGroupBytes int64` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/pipelines" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) stream, err := client.Pipelines.Streams.Update( context.TODO(), "033e105f4ecef8ad9ca31a8372d0c353", pipelines.StreamUpdateParams{ AccountID: cloudflare.F("0123105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", stream.ID) } ``` #### Response ```json { "result": { "id": "01234567890123457689012345678901", "created_at": "2019-12-27T18:11:19.117Z", "http": { "authentication": false, "enabled": true, "cors": { "origins": [ "string" ] } }, "modified_at": "2019-12-27T18:11:19.117Z", "name": "my_stream", "version": 3, "worker_binding": { "enabled": true }, "endpoint": "https://01234567890123457689012345678901.ingest.cloudflare.com/v1", "format": { "type": "json", "decimal_encoding": "number", "timestamp_format": "rfc3339", "unstructured": true } }, "success": true } ```