|
284 | 284 | } |
285 | 285 | }, |
286 | 286 | "schemas": { |
| 287 | + "CloneResponse": { |
| 288 | + "properties": { |
| 289 | + "id": { |
| 290 | + "$ref": "#/components/schemas/instance.id" |
| 291 | + } |
| 292 | + }, |
| 293 | + "required": [ |
| 294 | + "id" |
| 295 | + ], |
| 296 | + "type": "object" |
| 297 | + }, |
287 | 298 | "CreateDatabaseResponse": { |
288 | 299 | "properties": { |
289 | 300 | "id": { |
|
432 | 443 | }, |
433 | 444 | "GetInstanceResponse": { |
434 | 445 | "properties": { |
| 446 | + "acl": { |
| 447 | + "$ref": "#/components/schemas/acl" |
| 448 | + }, |
435 | 449 | "backupSchedule": { |
436 | 450 | "$ref": "#/components/schemas/backup.schedule" |
437 | 451 | }, |
|
1020 | 1034 | "example": "AUTOMATED", |
1021 | 1035 | "type": "string" |
1022 | 1036 | }, |
| 1037 | + "clone.instanceOverrides": { |
| 1038 | + "properties": { |
| 1039 | + "performanceClass": { |
| 1040 | + "$ref": "#/components/schemas/clone.storage.class" |
| 1041 | + }, |
| 1042 | + "size": { |
| 1043 | + "$ref": "#/components/schemas/clone.storage.size" |
| 1044 | + } |
| 1045 | + }, |
| 1046 | + "required": [ |
| 1047 | + "size", |
| 1048 | + "performanceClass" |
| 1049 | + ], |
| 1050 | + "type": "object" |
| 1051 | + }, |
| 1052 | + "clone.pointInTime": { |
| 1053 | + "description": "the time for the point in time recovery it will be calculated between first backup and last backup", |
| 1054 | + "example": "2023-12-30T23:25:05Z", |
| 1055 | + "format": "date-time", |
| 1056 | + "type": "string" |
| 1057 | + }, |
| 1058 | + "clone.storage.class": { |
| 1059 | + "description": "The storage class for the storage.", |
| 1060 | + "example": "premium-perf12-stackit", |
| 1061 | + "type": "string" |
| 1062 | + }, |
| 1063 | + "clone.storage.size": { |
| 1064 | + "description": "The storage size in Gigabytes.", |
| 1065 | + "example": 10, |
| 1066 | + "format": "uint64", |
| 1067 | + "type": "integer" |
| 1068 | + }, |
| 1069 | + "cloneRequestPayload": { |
| 1070 | + "properties": { |
| 1071 | + "instanceOverrides": { |
| 1072 | + "$ref": "#/components/schemas/clone.instanceOverrides" |
| 1073 | + }, |
| 1074 | + "pointInTime": { |
| 1075 | + "$ref": "#/components/schemas/clone.pointInTime" |
| 1076 | + } |
| 1077 | + }, |
| 1078 | + "required": [ |
| 1079 | + "pointInTime", |
| 1080 | + "instanceOverrides" |
| 1081 | + ], |
| 1082 | + "type": "object" |
| 1083 | + }, |
1023 | 1084 | "createDatabaseRequestPayload": { |
1024 | 1085 | "properties": { |
1025 | 1086 | "name": { |
|
1049 | 1110 | "$ref": "#/components/schemas/instance.name" |
1050 | 1111 | }, |
1051 | 1112 | "network": { |
1052 | | - "$ref": "#/components/schemas/instance.network" |
| 1113 | + "$ref": "#/components/schemas/instance.network.create" |
1053 | 1114 | }, |
1054 | 1115 | "replicas": { |
1055 | 1116 | "$ref": "#/components/schemas/replicas" |
|
1390 | 1451 | ], |
1391 | 1452 | "type": "string" |
1392 | 1453 | }, |
1393 | | - "instance.network.opt": { |
| 1454 | + "instance.network.create": { |
1394 | 1455 | "description": "The access configuration of the instance", |
1395 | 1456 | "properties": { |
1396 | 1457 | "accessScope": { |
1397 | 1458 | "$ref": "#/components/schemas/instance.network.accessScope" |
1398 | 1459 | }, |
| 1460 | + "acl": { |
| 1461 | + "$ref": "#/components/schemas/acl" |
| 1462 | + } |
| 1463 | + }, |
| 1464 | + "required": [ |
| 1465 | + "acl" |
| 1466 | + ], |
| 1467 | + "type": "object" |
| 1468 | + }, |
| 1469 | + "instance.network.opt": { |
| 1470 | + "description": "The access configuration of the instance", |
| 1471 | + "properties": { |
1399 | 1472 | "acl": { |
1400 | 1473 | "$ref": "#/components/schemas/acl.opt" |
1401 | | - }, |
1402 | | - "instanceAddress": { |
1403 | | - "example": "10.0.0.2", |
1404 | | - "type": "string" |
1405 | | - }, |
1406 | | - "routerAddress": { |
1407 | | - "example": "10.0.0.1", |
1408 | | - "type": "string" |
1409 | 1474 | } |
1410 | 1475 | }, |
1411 | 1476 | "type": "object" |
1412 | 1477 | }, |
| 1478 | + "instance.network.update": { |
| 1479 | + "description": "The access configuration of the instance", |
| 1480 | + "properties": { |
| 1481 | + "acl": { |
| 1482 | + "$ref": "#/components/schemas/acl" |
| 1483 | + } |
| 1484 | + }, |
| 1485 | + "required": [ |
| 1486 | + "acl" |
| 1487 | + ], |
| 1488 | + "type": "object" |
| 1489 | + }, |
1413 | 1490 | "instance.sort": { |
1414 | 1491 | "enum": [ |
1415 | 1492 | "index.desc", |
|
1644 | 1721 | "$ref": "#/components/schemas/instance.name.opt" |
1645 | 1722 | }, |
1646 | 1723 | "network": { |
1647 | | - "$ref": "#/components/schemas/instance.network" |
| 1724 | + "$ref": "#/components/schemas/instance.network.opt" |
1648 | 1725 | }, |
1649 | 1726 | "replicas": { |
1650 | 1727 | "$ref": "#/components/schemas/replicas.opt" |
|
1673 | 1750 | "$ref": "#/components/schemas/instance.name" |
1674 | 1751 | }, |
1675 | 1752 | "network": { |
1676 | | - "$ref": "#/components/schemas/instance.network" |
| 1753 | + "$ref": "#/components/schemas/instance.network.update" |
1677 | 1754 | }, |
1678 | 1755 | "replicas": { |
1679 | 1756 | "$ref": "#/components/schemas/replicas" |
|
3179 | 3256 | } |
3180 | 3257 | } |
3181 | 3258 | }, |
| 3259 | + "/v3alpha1/projects/{projectId}/regions/{region}/instances/{instanceId}/clone": { |
| 3260 | + "post": { |
| 3261 | + "description": "Clone Instance", |
| 3262 | + "operationId": "cloneRequest", |
| 3263 | + "parameters": [ |
| 3264 | + { |
| 3265 | + "$ref": "#/components/parameters/project" |
| 3266 | + }, |
| 3267 | + { |
| 3268 | + "$ref": "#/components/parameters/region" |
| 3269 | + }, |
| 3270 | + { |
| 3271 | + "$ref": "#/components/parameters/instance" |
| 3272 | + } |
| 3273 | + ], |
| 3274 | + "requestBody": { |
| 3275 | + "content": { |
| 3276 | + "application/json": { |
| 3277 | + "schema": { |
| 3278 | + "$ref": "#/components/schemas/cloneRequestPayload" |
| 3279 | + } |
| 3280 | + } |
| 3281 | + }, |
| 3282 | + "description": "The request body with the parameters for cloning an instance by a point in time into a new instance." |
| 3283 | + }, |
| 3284 | + "responses": { |
| 3285 | + "202": { |
| 3286 | + "content": { |
| 3287 | + "application/json": { |
| 3288 | + "schema": { |
| 3289 | + "$ref": "#/components/schemas/CloneResponse" |
| 3290 | + } |
| 3291 | + } |
| 3292 | + }, |
| 3293 | + "description": "Accepted: The request was accepted" |
| 3294 | + }, |
| 3295 | + "400": { |
| 3296 | + "content": { |
| 3297 | + "application/json": { |
| 3298 | + "examples": { |
| 3299 | + "badRequestError": { |
| 3300 | + "$ref": "#/components/examples/badRequestError" |
| 3301 | + } |
| 3302 | + }, |
| 3303 | + "schema": { |
| 3304 | + "$ref": "#/components/schemas/Error" |
| 3305 | + } |
| 3306 | + } |
| 3307 | + }, |
| 3308 | + "description": "Bad Request" |
| 3309 | + }, |
| 3310 | + "401": { |
| 3311 | + "content": { |
| 3312 | + "application/json": { |
| 3313 | + "examples": { |
| 3314 | + "unauthorizedError": { |
| 3315 | + "$ref": "#/components/examples/unauthorizedError" |
| 3316 | + } |
| 3317 | + }, |
| 3318 | + "schema": { |
| 3319 | + "$ref": "#/components/schemas/Error" |
| 3320 | + } |
| 3321 | + } |
| 3322 | + }, |
| 3323 | + "description": "User is not allowed to perform this operation or credentials are not correct" |
| 3324 | + }, |
| 3325 | + "403": { |
| 3326 | + "content": { |
| 3327 | + "application/json": { |
| 3328 | + "examples": { |
| 3329 | + "forbiddenError": { |
| 3330 | + "$ref": "#/components/examples/forbiddenError" |
| 3331 | + } |
| 3332 | + }, |
| 3333 | + "schema": { |
| 3334 | + "$ref": "#/components/schemas/Error" |
| 3335 | + } |
| 3336 | + } |
| 3337 | + }, |
| 3338 | + "description": "Forbidden: No access for the requested resource." |
| 3339 | + }, |
| 3340 | + "404": { |
| 3341 | + "content": { |
| 3342 | + "application/json": { |
| 3343 | + "examples": { |
| 3344 | + "notFoundError": { |
| 3345 | + "$ref": "#/components/examples/notFoundError" |
| 3346 | + } |
| 3347 | + }, |
| 3348 | + "schema": { |
| 3349 | + "$ref": "#/components/schemas/Error" |
| 3350 | + } |
| 3351 | + } |
| 3352 | + }, |
| 3353 | + "description": "Not found: The requested resource was not found." |
| 3354 | + }, |
| 3355 | + "422": { |
| 3356 | + "content": { |
| 3357 | + "application/json": { |
| 3358 | + "schema": { |
| 3359 | + "$ref": "#/components/schemas/ValidationError" |
| 3360 | + } |
| 3361 | + } |
| 3362 | + }, |
| 3363 | + "description": "Request failed due to body validation" |
| 3364 | + }, |
| 3365 | + "500": { |
| 3366 | + "content": { |
| 3367 | + "application/json": { |
| 3368 | + "examples": { |
| 3369 | + "internalServerError": { |
| 3370 | + "$ref": "#/components/examples/internalServerError" |
| 3371 | + } |
| 3372 | + }, |
| 3373 | + "schema": { |
| 3374 | + "$ref": "#/components/schemas/Error" |
| 3375 | + } |
| 3376 | + } |
| 3377 | + }, |
| 3378 | + "description": "Internal Server Error: An internal occurred while processing the request. Please contact the support or try again later." |
| 3379 | + }, |
| 3380 | + "501": { |
| 3381 | + "content": { |
| 3382 | + "application/json": { |
| 3383 | + "examples": { |
| 3384 | + "notImplementedError": { |
| 3385 | + "$ref": "#/components/examples/notImplementedError" |
| 3386 | + } |
| 3387 | + }, |
| 3388 | + "schema": { |
| 3389 | + "$ref": "#/components/schemas/Error" |
| 3390 | + } |
| 3391 | + } |
| 3392 | + }, |
| 3393 | + "description": "Endpoint not implemented yet" |
| 3394 | + } |
| 3395 | + }, |
| 3396 | + "summary": "Clone Instance", |
| 3397 | + "x-stackit-authorization": { |
| 3398 | + "actions": [ |
| 3399 | + "postgres-flex.instance.clone" |
| 3400 | + ], |
| 3401 | + "resource-id": "projectId", |
| 3402 | + "resource-id-type": "dynamic", |
| 3403 | + "resource-type": "project" |
| 3404 | + } |
| 3405 | + } |
| 3406 | + }, |
3182 | 3407 | "/v3alpha1/projects/{projectId}/regions/{region}/instances/{instanceId}/collations": { |
3183 | 3408 | "get": { |
3184 | 3409 | "description": "Get available collations for an instance", |
|
0 commit comments