Update NKS Cluster
client.NKS.Clusters.Update(ctx, clusterID, body) (*Operation, error)
PATCH/v1/nks/clusters/{cluster_id}
Update NKS Cluster
package main
import (
"context"
"fmt"
"github.com/nirvana-labs/nirvana-go"
"github.com/nirvana-labs/nirvana-go/nks"
"github.com/nirvana-labs/nirvana-go/option"
)
func main() {
client := nirvana.NewClient(
option.WithAPIKey("My API Key"),
)
operation, err := client.NKS.Clusters.Update(
context.TODO(),
"cluster_id",
nks.ClusterUpdateParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", operation.ID)
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"details": {
"changes": {
"foo": {
"from": "string",
"to": "string"
}
}
},
"kind": "vm",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"resource_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "pending",
"type": "create",
"updated_at": "2025-01-01T00:00:00Z"
}Returns Examples
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"details": {
"changes": {
"foo": {
"from": "string",
"to": "string"
}
}
},
"kind": "vm",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"resource_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "pending",
"type": "create",
"updated_at": "2025-01-01T00:00:00Z"
}