Skip to content

Commit f407778

Browse files
committed
Region Adjustment
- Update CHANGELOG - adapted examples and waiters
1 parent 126e386 commit f407778

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4019
-3231
lines changed

examples/loadbalancer/loadbalancer.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"os"
77

8-
"github.com/stackitcloud/stackit-sdk-go/core/config"
98
"github.com/stackitcloud/stackit-sdk-go/core/utils"
109
"github.com/stackitcloud/stackit-sdk-go/services/loadbalancer"
1110
)
@@ -14,17 +13,18 @@ func main() {
1413
// Specify the project ID
1514
projectId := "PROJECT_ID"
1615

16+
// Specify the region
17+
region := "REGION"
18+
1719
// Create a new API client, that uses default authentication and configuration
18-
loadbalancerClient, err := loadbalancer.NewAPIClient(
19-
config.WithRegion("eu01"),
20-
)
20+
loadbalancerClient, err := loadbalancer.NewAPIClient()
2121
if err != nil {
2222
fmt.Fprintf(os.Stderr, "Creating API client: %v\n", err)
2323
os.Exit(1)
2424
}
2525

2626
// List the load balancer instances for your project
27-
listInstancesResp, err := loadbalancerClient.ListLoadBalancers(context.Background(), projectId).Execute()
27+
listInstancesResp, err := loadbalancerClient.ListLoadBalancers(context.Background(), projectId, region).Execute()
2828
if err != nil {
2929
fmt.Fprintf(os.Stderr, "Error when calling `ListLoadBalancers`: %v\n", err)
3030
os.Exit(1)
@@ -69,7 +69,7 @@ func main() {
6969
},
7070
},
7171
}
72-
createLoadBalancerRes, err := loadbalancerClient.CreateLoadBalancer(context.Background(), projectId).CreateLoadBalancerPayload(createLoadBalancerPayload).XRequestID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Execute()
72+
createLoadBalancerRes, err := loadbalancerClient.CreateLoadBalancer(context.Background(), projectId, region).CreateLoadBalancerPayload(createLoadBalancerPayload).XRequestID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Execute()
7373
if err != nil {
7474
fmt.Fprintf(os.Stderr, "Error when calling `CreateLoadBalancer`: %v\n", err)
7575
os.Exit(1)

services/loadbalancer/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v1.0.0 (2025-03-14)
2+
- **Breaking Change:** The region is no longer specified within the client configuration. Instead, the region must be passed as a parameter to any region-specific request.
3+
- **Breaking Change:** Remove deprecated API methods `DisableService` and `EnableService`. They are no longer required because the service automatically enables and disable.
4+
- **Breaking Change:** Remove WaitHandler `EnableServiceWaitHandler` for `EnableService`.
5+
16
## v0.18.0 (2025-02-21)
27
- **New:** Minimal go version is now Go 1.21
38

0 commit comments

Comments
 (0)