feat: new APIs for traffic pricings [release-1.x] #496
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The API has been updated to provide a better insight and more flexibility for displaying the pricing of traffic for servers and load balancers.
In addition to the new fields, the old fields are deprecated and will be set to
null
in the API on 2024-08-05.As far as we could tell they are not widely used in Open Source code, please check if you are using them in any private code. Some linters automatically check for deprecated fields, if you use
golangci-lint
this is provided by thestaticcheck
linter.You can learn more about this change in our changelog.
Upgrading
Server Type Included Traffic
If you were using the field
hcloud.ServerType.IncludedTraffic
, you can now get the information throughhcloud.ServerType.Pricings
:Traffic Prices
If you were using the field
hcloud.Pricing.Traffic
, you can now get the information throughhcloud.Pricing.ServerTypes
orhcloud.Pricing.LoadBalancerTypes
:release-please Info
BEGIN_COMMIT_OVERRIDE
feat(server-type): new traffic price fields
feat(load-balancer-type): new traffic price fields
feat(pricing): mark traffic field as deprecated
feat(server-type): mark included traffic field as deprecated
END_COMMIT_OVERRIDE