Comments (5)
Thank you for the follow-up! You're correct, I only went off the documentation because the fields are marked as required. I had not tried submitting JSON for just that one field.
from hcloud-go.
This seems to be specific to the LoadBalancerClient#UpdateService
call, I could not find any other update call in the API that requires so many fields to be set, instead of just replacing what was given.
I think it would be a nice addition to implement that in hcloud-go
. What do you think @pauhull?
Edit: API Docs reference for "LB Update Service"
from hcloud-go.
Yes, that sounds like a useful improvement to me. I'll be working on an implementation 🙂
from hcloud-go.
I've double checked the issue and can't reproduce it on my side. I am able to update a service's certificates using the following code:
lb, _, _ := client.LoadBalancer.GetByName(context.Background(), "load-balancer-1")
client.LoadBalancer.UpdateService(context.Background(), lb, 443, LoadBalancerUpdateServiceOpts{
HTTP: &LoadBalancerUpdateServiceOptsHTTP{
Certificates: []*Certificate{
{
ID: cid,
},
},
},
})
Other fields, like the ones you mentioned, do not seem to be affected by that. Did you try leaving them out, and if so, was there any unexpected behavior? Or did you just go off the documenation because the fields are marked as required in there?
from hcloud-go.
We have updated the docs and it will go out with the next deployment. Thank you for reporting this :)
from hcloud-go.
Related Issues (20)
- feat: Return action from Server.Delete
- feat: WaitForAction with Exponential Backoff
- CloudQuery Source Plugin? HOT 1
- Dependency Dashboard
- No password when rebuilding from image HOT 2
- feat: Make sure all Clients have .AllWithOpts method
- refactor: duplicate implementation for .All & .AllWithOpts
- Breaking Change: ID fields will become int64 HOT 2
- Action Required: Fix Renovate Configuration HOT 4
- fix: panic when multiple hcloud-go Client with Instrumentation are registered
- Hetzner API request: ability to know if server count limit has been reached HOT 2
- Retry transient HTTP Errors HOT 6
- Using pointers for basic types HOT 4
- Add testing package to provide test utils to downstream projects HOT 1
- Search matches only whole words HOT 1
- Release-please doesn't autodetect the target branch HOT 1
- func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {<a href="https://app.codacy.com/gh/Sarakbe/Sarakbe/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/5068d703d736450398603dc8f435b9f5"/></a>
- API of add/remove target to/from load balancer is inconsistent with console UI HOT 1
- A way to get the project ID HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hcloud-go.