From 1a4160f456a0f750c3777bfb14b16cc912955c50 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 18 Dec 2025 17:08:31 +0000 Subject: [PATCH 1/2] Generate sqlserverflex --- services/sqlserverflex/api_default.go | 17 ++++++++++++----- services/sqlserverflex/api_default_test.go | 7 +++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/services/sqlserverflex/api_default.go b/services/sqlserverflex/api_default.go index 896fa5f5d..6fb845534 100644 --- a/services/sqlserverflex/api_default.go +++ b/services/sqlserverflex/api_default.go @@ -367,21 +367,23 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The UUID of the project. @param instanceId The UUID of the instance. + @param region The region which should be addressed @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. @return ApiListMetricsRequest */ - ListMetrics(ctx context.Context, projectId string, instanceId string, metric string) ApiListMetricsRequest + ListMetrics(ctx context.Context, projectId string, instanceId string, region string, metric string) ApiListMetricsRequest /* ListMetricsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The UUID of the project. @param instanceId The UUID of the instance. + @param region The region which should be addressed @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. @return ListMetricsResponse */ - ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string) (*ListMetricsResponse, error) + ListMetricsExecute(ctx context.Context, projectId string, instanceId string, region string, metric string) (*ListMetricsResponse, error) /* ListRestoreJobs List current running restore jobs List all currently running restore jobs which are available for a specific instance @@ -3284,6 +3286,7 @@ type ListMetricsRequest struct { apiService *DefaultApiService projectId string instanceId string + region string metric string granularity *string period *string @@ -3336,9 +3339,10 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/instances/{instanceId}/metrics/{metric}" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(ParameterValueToString(r.metric, "metric")), -1) localVarHeaderParams := make(map[string]string) @@ -3463,25 +3467,28 @@ Returns a metric for an instance. The metric will only be for the master pod if @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The UUID of the project. @param instanceId The UUID of the instance. + @param region The region which should be addressed @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. @return ApiListMetricsRequest */ -func (a *APIClient) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string) ApiListMetricsRequest { +func (a *APIClient) ListMetrics(ctx context.Context, projectId string, instanceId string, region string, metric string) ApiListMetricsRequest { return ListMetricsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, metric: metric, } } -func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string) (*ListMetricsResponse, error) { +func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, region string, metric string) (*ListMetricsResponse, error) { r := ListMetricsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, metric: metric, } return r.Execute() diff --git a/services/sqlserverflex/api_default_test.go b/services/sqlserverflex/api_default_test.go index b0ad3bad5..0babfe365 100644 --- a/services/sqlserverflex/api_default_test.go +++ b/services/sqlserverflex/api_default_test.go @@ -943,11 +943,13 @@ func Test_sqlserverflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListMetrics", func(t *testing.T) { - _apiUrlPath := "/v2/projects/{projectId}/instances/{instanceId}/metrics/{metric}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) metricValue := "metric-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"metric"+"}", url.PathEscape(ParameterValueToString(metricValue, "metric")), -1) @@ -988,10 +990,11 @@ func Test_sqlserverflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue metric := metricValue var granularity string - resp, reqErr := apiClient.ListMetrics(context.Background(), projectId, instanceId, metric).Granularity(granularity).Execute() + resp, reqErr := apiClient.ListMetrics(context.Background(), projectId, instanceId, region, metric).Granularity(granularity).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) From a3a4b8f6fd100efbdfa0d920821005ac8402db26 Mon Sep 17 00:00:00 2001 From: Marcel Jacek Date: Fri, 19 Dec 2025 11:38:29 +0100 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 2 ++ services/sqlserverflex/CHANGELOG.md | 3 +++ services/sqlserverflex/VERSION | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55863519b..a47804566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ - Bump STACKIT SDK core module from `v0.20.0` to `v0.20.1` - [v0.1.0](services/logs/CHANGELOG.md#v010) - **New:** API for logs service +- `sqlserverflex`: [v1.4.0](services/sqlserverflex/CHANGELOG.md#v140) + - **Breaking change:** Add region parameter in `ListMetrics` method. Previously the method failed, because the region parameter was missing ## Release (2025-12-05) - `alb`: diff --git a/services/sqlserverflex/CHANGELOG.md b/services/sqlserverflex/CHANGELOG.md index cbbe1fa28..357a0bf54 100644 --- a/services/sqlserverflex/CHANGELOG.md +++ b/services/sqlserverflex/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.4.0 +- **Breaking change:** Add region parameter in `ListMetrics` method. Previously the method failed, because the region parameter was missing + ## v1.3.4 - Bump STACKIT SDK core module from `v0.20.0` to `v0.20.1` diff --git a/services/sqlserverflex/VERSION b/services/sqlserverflex/VERSION index 2f933838e..ec7b96782 100644 --- a/services/sqlserverflex/VERSION +++ b/services/sqlserverflex/VERSION @@ -1 +1 @@ -v1.3.4 \ No newline at end of file +v1.4.0 \ No newline at end of file