Giter VIP home page Giter VIP logo

Comments (5)

poundifdef avatar poundifdef commented on August 15, 2024 1

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.

apricote avatar apricote commented on August 15, 2024

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.

phm07 avatar phm07 commented on August 15, 2024

Yes, that sounds like a useful improvement to me. I'll be working on an implementation 🙂

from hcloud-go.

phm07 avatar phm07 commented on August 15, 2024

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.

apricote avatar apricote commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.