|
179 | 179 | },
|
180 | 180 | "type": "object"
|
181 | 181 | },
|
| 182 | + "DataPoint": { |
| 183 | + "properties": { |
| 184 | + "timestamp": { |
| 185 | + "type": "string" |
| 186 | + }, |
| 187 | + "value": { |
| 188 | + "type": "number" |
| 189 | + } |
| 190 | + }, |
| 191 | + "type": "object" |
| 192 | + }, |
182 | 193 | "Database": {
|
183 | 194 | "properties": {
|
184 | 195 | "id": {
|
|
304 | 315 | },
|
305 | 316 | "type": "object"
|
306 | 317 | },
|
| 318 | + "Host": { |
| 319 | + "properties": { |
| 320 | + "hostMetrics": { |
| 321 | + "items": { |
| 322 | + "$ref": "#/components/schemas/HostMetric" |
| 323 | + }, |
| 324 | + "type": "array" |
| 325 | + }, |
| 326 | + "id": { |
| 327 | + "type": "string" |
| 328 | + } |
| 329 | + }, |
| 330 | + "type": "object" |
| 331 | + }, |
| 332 | + "HostMetric": { |
| 333 | + "properties": { |
| 334 | + "datapoints": { |
| 335 | + "items": { |
| 336 | + "$ref": "#/components/schemas/DataPoint" |
| 337 | + }, |
| 338 | + "type": "array" |
| 339 | + }, |
| 340 | + "name": { |
| 341 | + "type": "string" |
| 342 | + }, |
| 343 | + "units": { |
| 344 | + "type": "string" |
| 345 | + } |
| 346 | + }, |
| 347 | + "type": "object" |
| 348 | + }, |
307 | 349 | "Instance": {
|
308 | 350 | "properties": {
|
309 | 351 | "acl": {
|
|
416 | 458 | },
|
417 | 459 | "type": "object"
|
418 | 460 | },
|
| 461 | + "ListMetricsResponse": { |
| 462 | + "properties": { |
| 463 | + "hosts": { |
| 464 | + "items": { |
| 465 | + "$ref": "#/components/schemas/Host" |
| 466 | + }, |
| 467 | + "type": "array" |
| 468 | + } |
| 469 | + }, |
| 470 | + "type": "object" |
| 471 | + }, |
419 | 472 | "ListRestoreJobsResponse": {
|
420 | 473 | "properties": {
|
421 | 474 | "runningRestores": {
|
|
2316 | 2369 | }
|
2317 | 2370 | }
|
2318 | 2371 | },
|
| 2372 | + "/v1/projects/{projectId}/instances/{instanceId}/metrics/{metric}": { |
| 2373 | + "get": { |
| 2374 | + "description": "Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in max-connections and disk-use. If you provide start time, you have to provide end time as well and vice versa.", |
| 2375 | + "operationId": "ListMetrics", |
| 2376 | + "parameters": [ |
| 2377 | + { |
| 2378 | + "description": "The UUID of the project.", |
| 2379 | + "explode": false, |
| 2380 | + "in": "path", |
| 2381 | + "name": "projectId", |
| 2382 | + "required": true, |
| 2383 | + "schema": { |
| 2384 | + "type": "string" |
| 2385 | + }, |
| 2386 | + "style": "simple" |
| 2387 | + }, |
| 2388 | + { |
| 2389 | + "description": "The UUID of the instance.", |
| 2390 | + "explode": false, |
| 2391 | + "in": "path", |
| 2392 | + "name": "instanceId", |
| 2393 | + "required": true, |
| 2394 | + "schema": { |
| 2395 | + "type": "string" |
| 2396 | + }, |
| 2397 | + "style": "simple" |
| 2398 | + }, |
| 2399 | + { |
| 2400 | + "description": "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'.", |
| 2401 | + "explode": false, |
| 2402 | + "in": "path", |
| 2403 | + "name": "metric", |
| 2404 | + "required": true, |
| 2405 | + "schema": { |
| 2406 | + "type": "string" |
| 2407 | + }, |
| 2408 | + "style": "simple" |
| 2409 | + }, |
| 2410 | + { |
| 2411 | + "description": "The granularity in ISO8601 e.g. 5 minutes are 'PT5M'.", |
| 2412 | + "explode": true, |
| 2413 | + "in": "query", |
| 2414 | + "name": "granularity", |
| 2415 | + "required": true, |
| 2416 | + "schema": { |
| 2417 | + "type": "string" |
| 2418 | + }, |
| 2419 | + "style": "form" |
| 2420 | + }, |
| 2421 | + { |
| 2422 | + "description": "The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used.", |
| 2423 | + "explode": true, |
| 2424 | + "in": "query", |
| 2425 | + "name": "period", |
| 2426 | + "schema": { |
| 2427 | + "type": "string" |
| 2428 | + }, |
| 2429 | + "style": "form" |
| 2430 | + }, |
| 2431 | + { |
| 2432 | + "description": "The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used.", |
| 2433 | + "explode": true, |
| 2434 | + "in": "query", |
| 2435 | + "name": "start", |
| 2436 | + "schema": { |
| 2437 | + "type": "string" |
| 2438 | + }, |
| 2439 | + "style": "form" |
| 2440 | + }, |
| 2441 | + { |
| 2442 | + "description": "The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'.", |
| 2443 | + "explode": true, |
| 2444 | + "in": "query", |
| 2445 | + "name": "end", |
| 2446 | + "schema": { |
| 2447 | + "type": "string" |
| 2448 | + }, |
| 2449 | + "style": "form" |
| 2450 | + } |
| 2451 | + ], |
| 2452 | + "responses": { |
| 2453 | + "200": { |
| 2454 | + "content": { |
| 2455 | + "application/json": { |
| 2456 | + "schema": { |
| 2457 | + "$ref": "#/components/schemas/ListMetricsResponse" |
| 2458 | + } |
| 2459 | + } |
| 2460 | + }, |
| 2461 | + "description": "OK" |
| 2462 | + }, |
| 2463 | + "400": { |
| 2464 | + "content": { |
| 2465 | + "application/json": { |
| 2466 | + "schema": { |
| 2467 | + "$ref": "#/components/schemas/instance.Error" |
| 2468 | + } |
| 2469 | + } |
| 2470 | + }, |
| 2471 | + "description": "Bad Request" |
| 2472 | + }, |
| 2473 | + "405": { |
| 2474 | + "content": { |
| 2475 | + "application/json": { |
| 2476 | + "schema": { |
| 2477 | + "$ref": "#/components/schemas/instance.Error" |
| 2478 | + } |
| 2479 | + } |
| 2480 | + }, |
| 2481 | + "description": "Method Not Allowed" |
| 2482 | + }, |
| 2483 | + "500": { |
| 2484 | + "content": { |
| 2485 | + "application/json": { |
| 2486 | + "schema": { |
| 2487 | + "$ref": "#/components/schemas/instance.Error" |
| 2488 | + } |
| 2489 | + } |
| 2490 | + }, |
| 2491 | + "description": "Internal Server Error" |
| 2492 | + } |
| 2493 | + }, |
| 2494 | + "security": [ |
| 2495 | + { |
| 2496 | + "BearerAuth": [] |
| 2497 | + } |
| 2498 | + ], |
| 2499 | + "summary": "Get Metric", |
| 2500 | + "x-stackit-authorization": { |
| 2501 | + "actions": [ |
| 2502 | + "sqlserver-flex.metric.list" |
| 2503 | + ], |
| 2504 | + "resource-id": "projectId", |
| 2505 | + "resource-id-type": "dynamic", |
| 2506 | + "resource-type": "project" |
| 2507 | + } |
| 2508 | + } |
| 2509 | + }, |
2319 | 2510 | "/v1/projects/{projectId}/instances/{instanceId}/restores": {
|
2320 | 2511 | "get": {
|
2321 | 2512 | "description": "List all currently running restore jobs which are available for a specific instance",
|
|
0 commit comments