Closed kvmukhin closed 1 year ago
I trying update label exist compute instance through UpdateInstanceRequest, but get error rpc error: code = InvalidArgument desc = Request validation error: Unable to update selected parameters at once. Can you take simple example? My function
rpc error: code = InvalidArgument desc = Request validation error: Unable to update selected parameters at once.
func setLabels(ctx context.Context, sdk *ycsdk.SDK, instance Instance, label map[string]string) { req := &compute.UpdateInstanceRequest{InstanceId: instance.Id} req.SetLabels(label) op, err := sdk.WrapOperation(sdk.Compute().Instance().Update(ctx, req)) if err != nil { log.Fatal(err) } err = op.Wait(ctx) if err != nil { log.Fatal(err) } }
Finded answer https://github.com/yandex-cloud/terraform-provider-yandex/blob/bfe7aeb6a4351eb202391e1959b4b9bfe5c9f742/yandex/resource_yandex_compute_instance.go#L815-L835
I trying update label exist compute instance through UpdateInstanceRequest, but get error
rpc error: code = InvalidArgument desc = Request validation error: Unable to update selected parameters at once.
Can you take simple example? My function