Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
- `v1api`: New package which can be used for communication with the logs v1 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`
- `sqlserverflex`: [v1.5.0](services/sqlserverflex/CHANGELOG.md#v150)
- **Feature:** Introduction of multi API version support for the sqlserverflex SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the sqlserverflex v1 API
- `v2api`: New package which can be used for communication with the sqlserverflex v1 API
- `v3alpha1api`: New package which can be used for communication with the sqlserverflex v3 alpha1 API
- `v3beta1api`: New package which can be used for communication with the sqlserverflex v3 beta1 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`

## Release (2026-02-20)
- `core`: [v0.21.1](core/CHANGELOG.md#v0211)
Expand Down
9 changes: 7 additions & 2 deletions examples/sqlserverflex/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ module github.com/stackitcloud/stackit-sdk-go/examples/sqlserverflex

go 1.21

require github.com/stackitcloud/stackit-sdk-go/core v0.21.1
// This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub.
replace github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex => ../../services/sqlserverflex

require (
github.com/stackitcloud/stackit-sdk-go/core v0.22.0
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3
)

require (
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3
)
6 changes: 2 additions & 4 deletions examples/sqlserverflex/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts=
github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3 h1:AQrcr+qeIuZob+3TT2q1L4WOPtpsu5SEpkTnOUHDqfE=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.4.3/go.mod h1:8BBGC69WFXWWmKgzSjgE4HvsI7pEgO0RN2cASwuPJ18=
github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c=
github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
20 changes: 10 additions & 10 deletions examples/sqlserverflex/sqlserverflex.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"

"github.com/stackitcloud/stackit-sdk-go/core/utils"
"github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex"
"github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/wait"
sqlserverflex "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v2api"
"github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v2api/wait"
)

func main() {
Expand All @@ -30,41 +30,41 @@ func main() {
}

// Get the SQLServer Flex instances for your project
getInstancesResp, err := sqlserverflexClient.ListInstances(ctx, projectId, region).Execute()
getInstancesResp, err := sqlserverflexClient.DefaultAPI.ListInstances(ctx, projectId, region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ListInstances`: %v\n", err)
os.Exit(1)
}
items := *getInstancesResp.Items
items := getInstancesResp.Items
fmt.Printf("Number of instances: %v\n", len(items))

// Create an instance
createInstancePayload := sqlserverflex.CreateInstancePayload{
Name: utils.Ptr("my-instance"),
FlavorId: utils.Ptr(flavorId),
Name: "my-instance",
FlavorId: flavorId,
Version: utils.Ptr(version),
}
instance, err := sqlserverflexClient.CreateInstance(ctx, projectId, region).CreateInstancePayload(createInstancePayload).Execute()
instance, err := sqlserverflexClient.DefaultAPI.CreateInstance(ctx, projectId, region).CreateInstancePayload(createInstancePayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error creating SQL Server Flex instance: %v\n", err)
}
instanceId := *instance.Id

_, err = wait.CreateInstanceWaitHandler(ctx, sqlserverflexClient, projectId, instanceId, region).WaitWithContext(ctx)
_, err = wait.CreateInstanceWaitHandler(ctx, sqlserverflexClient.DefaultAPI, projectId, instanceId, region).WaitWithContext(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when waiting for SQL Server Flex instance creation: %v\n", err)
}

fmt.Printf("Created SQL Server Flex instance \"%s\".\n", instanceId)

// Delete an instance
err = sqlserverflexClient.DeleteInstance(ctx, projectId, instanceId, region).Execute()
err = sqlserverflexClient.DefaultAPI.DeleteInstance(ctx, projectId, instanceId, region).Execute()

if err != nil {
fmt.Fprintf(os.Stderr, "Error deleting SQL Server Flex instance: %v\n", err)
}

_, err = wait.DeleteInstanceWaitHandler(ctx, sqlserverflexClient, projectId, instanceId, region).WaitWithContext(ctx)
_, err = wait.DeleteInstanceWaitHandler(ctx, sqlserverflexClient.DefaultAPI, projectId, instanceId, region).WaitWithContext(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when waiting for SQL Server Flex instance deletion: %v\n", err)
}
Expand Down
9 changes: 9 additions & 0 deletions services/sqlserverflex/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## v1.5.0
- **Feature:** Introduction of multi API version support for the sqlserverflex SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
- `v1api`: New package which can be used for communication with the sqlserverflex v1 API
- `v2api`: New package which can be used for communication with the sqlserverflex v1 API
- `v3alpha1api`: New package which can be used for communication with the sqlserverflex v3 alpha1 API
- `v3beta1api`: New package which can be used for communication with the sqlserverflex v3 beta1 API
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new packages for the available API versions instead.
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`

## v1.4.3
- Bump STACKIT SDK core module from `v0.21.0` to `v0.21.1`

Expand Down
2 changes: 1 addition & 1 deletion services/sqlserverflex/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.3
v1.5.0
Loading
Loading