|
33 | 33 | } |
34 | 34 | }, |
35 | 35 | "schemas": { |
36 | | - "CreateLockResponse": { |
37 | | - "properties": { |
38 | | - "lockId": { |
39 | | - "type": "string" |
40 | | - } |
41 | | - }, |
42 | | - "type": "object" |
43 | | - }, |
44 | 36 | "CreateResourcePoolPayload": { |
45 | 37 | "properties": { |
46 | 38 | "availabilityZone": { |
|
257 | 249 | }, |
258 | 250 | "type": "object" |
259 | 251 | }, |
260 | | - "DeleteLockResponse": { |
261 | | - "type": "object" |
262 | | - }, |
263 | 252 | "DeleteResourcePoolResponse": { |
264 | 253 | "type": "object" |
265 | 254 | }, |
|
272 | 261 | "DeleteShareResponse": { |
273 | 262 | "type": "object" |
274 | 263 | }, |
| 264 | + "DisableLockResponse": { |
| 265 | + "type": "object" |
| 266 | + }, |
| 267 | + "EnableLockResponse": { |
| 268 | + "type": "object" |
| 269 | + }, |
275 | 270 | "Error": { |
276 | 271 | "properties": { |
277 | 272 | "error_description": { |
|
293 | 288 | ], |
294 | 289 | "type": "object" |
295 | 290 | }, |
| 291 | + "GetLockResponse": { |
| 292 | + "properties": { |
| 293 | + "lockId": { |
| 294 | + "description": "Whether the lock is enabled for the project", |
| 295 | + "type": "string" |
| 296 | + } |
| 297 | + }, |
| 298 | + "type": "object" |
| 299 | + }, |
296 | 300 | "GetResourcePoolResponse": { |
297 | 301 | "properties": { |
298 | 302 | "resourcePool": { |
|
939 | 943 | }, |
940 | 944 | "type": "object" |
941 | 945 | }, |
| 946 | + "UpdateResourcePoolSnapshotPayload": { |
| 947 | + "properties": { |
| 948 | + "comment": { |
| 949 | + "description": "(optional) A comment to add more information about a snapshot", |
| 950 | + "nullable": true, |
| 951 | + "type": "string" |
| 952 | + }, |
| 953 | + "name": { |
| 954 | + "description": "(optional) name of the Resource Pool Snapshot", |
| 955 | + "nullable": true, |
| 956 | + "type": "string" |
| 957 | + } |
| 958 | + }, |
| 959 | + "type": "object" |
| 960 | + }, |
| 961 | + "UpdateResourcePoolSnapshotResponse": { |
| 962 | + "properties": { |
| 963 | + "resourcePoolSnapshot": { |
| 964 | + "allOf": [ |
| 965 | + { |
| 966 | + "$ref": "#/components/schemas/ResourcePoolSnapshot" |
| 967 | + } |
| 968 | + ], |
| 969 | + "description": "Updated Resource Pool Snapshot" |
| 970 | + } |
| 971 | + }, |
| 972 | + "type": "object" |
| 973 | + }, |
942 | 974 | "UpdateShareExportPolicyBody_Rule": { |
943 | 975 | "properties": { |
944 | 976 | "description": { |
|
2011 | 2043 | "resource-id-type": "dynamic", |
2012 | 2044 | "resource-type": "project" |
2013 | 2045 | } |
| 2046 | + }, |
| 2047 | + "patch": { |
| 2048 | + "description": "Updates a Snapshot from a Resource Pool in a project.", |
| 2049 | + "operationId": "UpdateResourcePoolSnapshot", |
| 2050 | + "parameters": [ |
| 2051 | + { |
| 2052 | + "in": "path", |
| 2053 | + "name": "projectId", |
| 2054 | + "required": true, |
| 2055 | + "schema": { |
| 2056 | + "type": "string" |
| 2057 | + } |
| 2058 | + }, |
| 2059 | + { |
| 2060 | + "in": "path", |
| 2061 | + "name": "region", |
| 2062 | + "required": true, |
| 2063 | + "schema": { |
| 2064 | + "type": "string" |
| 2065 | + } |
| 2066 | + }, |
| 2067 | + { |
| 2068 | + "in": "path", |
| 2069 | + "name": "resourcePoolId", |
| 2070 | + "required": true, |
| 2071 | + "schema": { |
| 2072 | + "type": "string" |
| 2073 | + } |
| 2074 | + }, |
| 2075 | + { |
| 2076 | + "in": "path", |
| 2077 | + "name": "snapshotName", |
| 2078 | + "required": true, |
| 2079 | + "schema": { |
| 2080 | + "type": "string" |
| 2081 | + } |
| 2082 | + } |
| 2083 | + ], |
| 2084 | + "requestBody": { |
| 2085 | + "content": { |
| 2086 | + "application/json": { |
| 2087 | + "schema": { |
| 2088 | + "$ref": "#/components/schemas/UpdateResourcePoolSnapshotPayload" |
| 2089 | + } |
| 2090 | + } |
| 2091 | + }, |
| 2092 | + "required": true |
| 2093 | + }, |
| 2094 | + "responses": { |
| 2095 | + "200": { |
| 2096 | + "content": { |
| 2097 | + "application/json": { |
| 2098 | + "schema": { |
| 2099 | + "$ref": "#/components/schemas/UpdateResourcePoolSnapshotResponse" |
| 2100 | + } |
| 2101 | + } |
| 2102 | + }, |
| 2103 | + "description": "OK" |
| 2104 | + }, |
| 2105 | + "400": { |
| 2106 | + "$ref": "#/components/responses/ValidationError" |
| 2107 | + }, |
| 2108 | + "401": { |
| 2109 | + "$ref": "#/components/responses/UnauthorizedError" |
| 2110 | + }, |
| 2111 | + "500": { |
| 2112 | + "$ref": "#/components/responses/InternalServerError" |
| 2113 | + } |
| 2114 | + }, |
| 2115 | + "summary": "Update Resource Pool Snapshot", |
| 2116 | + "x-stackit-authorization": { |
| 2117 | + "actions": [ |
| 2118 | + "file-storage.resource-pool.snapshot.update" |
| 2119 | + ], |
| 2120 | + "resource-id": "projectId", |
| 2121 | + "resource-id-type": "dynamic", |
| 2122 | + "resource-type": "project" |
| 2123 | + } |
2014 | 2124 | } |
2015 | 2125 | }, |
2016 | 2126 | "/v1/projects/{projectId}/regions/{region}/shareExportPolicies": { |
|
2530 | 2640 | }, |
2531 | 2641 | "/v1/regions/{region}/project/{projectId}/locks": { |
2532 | 2642 | "delete": { |
2533 | | - "description": "Delete Lock", |
2534 | | - "operationId": "DeleteLock", |
| 2643 | + "description": "Clean up locks for a project so that it can be deleted successfully.", |
| 2644 | + "operationId": "DisableLock", |
2535 | 2645 | "parameters": [ |
2536 | 2646 | { |
2537 | 2647 | "in": "path", |
|
2555 | 2665 | "content": { |
2556 | 2666 | "application/json": { |
2557 | 2667 | "schema": { |
2558 | | - "$ref": "#/components/schemas/DeleteLockResponse" |
| 2668 | + "$ref": "#/components/schemas/DisableLockResponse" |
2559 | 2669 | } |
2560 | 2670 | } |
2561 | 2671 | }, |
|
2581 | 2691 | "resource-type": "project" |
2582 | 2692 | } |
2583 | 2693 | }, |
| 2694 | + "get": { |
| 2695 | + "description": "Get lock status for a project.", |
| 2696 | + "operationId": "GetLock", |
| 2697 | + "parameters": [ |
| 2698 | + { |
| 2699 | + "in": "path", |
| 2700 | + "name": "region", |
| 2701 | + "required": true, |
| 2702 | + "schema": { |
| 2703 | + "type": "string" |
| 2704 | + } |
| 2705 | + }, |
| 2706 | + { |
| 2707 | + "in": "path", |
| 2708 | + "name": "projectId", |
| 2709 | + "required": true, |
| 2710 | + "schema": { |
| 2711 | + "type": "string" |
| 2712 | + } |
| 2713 | + } |
| 2714 | + ], |
| 2715 | + "responses": { |
| 2716 | + "200": { |
| 2717 | + "content": { |
| 2718 | + "application/json": { |
| 2719 | + "schema": { |
| 2720 | + "$ref": "#/components/schemas/GetLockResponse" |
| 2721 | + } |
| 2722 | + } |
| 2723 | + }, |
| 2724 | + "description": "OK" |
| 2725 | + } |
| 2726 | + }, |
| 2727 | + "x-stackit-authorization": { |
| 2728 | + "actions": [ |
| 2729 | + "file-storage.resource-pool.create" |
| 2730 | + ], |
| 2731 | + "resource-id": "projectId", |
| 2732 | + "resource-id-type": "dynamic", |
| 2733 | + "resource-type": "project" |
| 2734 | + } |
| 2735 | + }, |
2584 | 2736 | "post": { |
2585 | | - "description": "Create Lock", |
2586 | | - "operationId": "CreateLock", |
| 2737 | + "description": "Enable Lock for a project. Necessary for immutable snapshots and to prevent accidental deletion of resources.", |
| 2738 | + "operationId": "EnableLock", |
2587 | 2739 | "parameters": [ |
2588 | 2740 | { |
2589 | 2741 | "in": "path", |
|
2607 | 2759 | "content": { |
2608 | 2760 | "application/json": { |
2609 | 2761 | "schema": { |
2610 | | - "$ref": "#/components/schemas/CreateLockResponse" |
| 2762 | + "$ref": "#/components/schemas/EnableLockResponse" |
2611 | 2763 | } |
2612 | 2764 | } |
2613 | 2765 | }, |
|
0 commit comments