|
121 | 121 | "type": "string" |
122 | 122 | } |
123 | 123 | }, |
| 124 | + "ruleFilters": { |
| 125 | + "description": "Filtering criteria for the export", |
| 126 | + "explode": true, |
| 127 | + "in": "query", |
| 128 | + "name": "filters", |
| 129 | + "schema": { |
| 130 | + "properties": { |
| 131 | + "direction": { |
| 132 | + "type": "string" |
| 133 | + }, |
| 134 | + "etherType": { |
| 135 | + "type": "string" |
| 136 | + }, |
| 137 | + "instanceName": { |
| 138 | + "type": "string" |
| 139 | + }, |
| 140 | + "portRange": { |
| 141 | + "type": "string" |
| 142 | + }, |
| 143 | + "product": { |
| 144 | + "type": "string" |
| 145 | + }, |
| 146 | + "protocol": { |
| 147 | + "type": "string" |
| 148 | + }, |
| 149 | + "sourceIP": { |
| 150 | + "type": "string" |
| 151 | + } |
| 152 | + }, |
| 153 | + "type": "object" |
| 154 | + }, |
| 155 | + "style": "form" |
| 156 | + }, |
124 | 157 | "securityGroupId": { |
125 | 158 | "description": "The UUID of the group.", |
126 | 159 | "in": "query", |
|
1007 | 1040 | } |
1008 | 1041 | } |
1009 | 1042 | }, |
| 1043 | + "/v1beta/projects/{projectId}/regions/{regionId}/rules/export": { |
| 1044 | + "get": { |
| 1045 | + "description": "Returns a CSV file containing the rules for a specific project", |
| 1046 | + "operationId": "v1beta-export-rules", |
| 1047 | + "parameters": [ |
| 1048 | + { |
| 1049 | + "$ref": "#/components/parameters/projectId" |
| 1050 | + }, |
| 1051 | + { |
| 1052 | + "$ref": "#/components/parameters/regionId" |
| 1053 | + }, |
| 1054 | + { |
| 1055 | + "$ref": "#/components/parameters/ruleFilters" |
| 1056 | + } |
| 1057 | + ], |
| 1058 | + "responses": { |
| 1059 | + "200": { |
| 1060 | + "content": { |
| 1061 | + "text/csv": { |
| 1062 | + "schema": { |
| 1063 | + "format": "binary", |
| 1064 | + "type": "string" |
| 1065 | + } |
| 1066 | + } |
| 1067 | + }, |
| 1068 | + "description": "Successful CSV file download" |
| 1069 | + }, |
| 1070 | + "400": { |
| 1071 | + "content": { |
| 1072 | + "application/json": { |
| 1073 | + "schema": { |
| 1074 | + "$ref": "#/components/schemas/ErrorResponse" |
| 1075 | + } |
| 1076 | + } |
| 1077 | + }, |
| 1078 | + "description": "Bad request" |
| 1079 | + }, |
| 1080 | + "401": { |
| 1081 | + "content": { |
| 1082 | + "application/json": { |
| 1083 | + "schema": { |
| 1084 | + "$ref": "#/components/schemas/ErrorResponse" |
| 1085 | + } |
| 1086 | + } |
| 1087 | + }, |
| 1088 | + "description": "Unauthorized" |
| 1089 | + }, |
| 1090 | + "403": { |
| 1091 | + "content": { |
| 1092 | + "application/json": { |
| 1093 | + "schema": { |
| 1094 | + "$ref": "#/components/schemas/ErrorResponse" |
| 1095 | + } |
| 1096 | + } |
| 1097 | + }, |
| 1098 | + "description": "Forbidden access. You are not allowed to get rules from this project." |
| 1099 | + }, |
| 1100 | + "404": { |
| 1101 | + "content": { |
| 1102 | + "application/json": { |
| 1103 | + "schema": { |
| 1104 | + "$ref": "#/components/schemas/ErrorResponse" |
| 1105 | + } |
| 1106 | + } |
| 1107 | + }, |
| 1108 | + "description": "Project not found." |
| 1109 | + }, |
| 1110 | + "500": { |
| 1111 | + "content": { |
| 1112 | + "application/json": { |
| 1113 | + "schema": { |
| 1114 | + "$ref": "#/components/schemas/ErrorResponse" |
| 1115 | + } |
| 1116 | + } |
| 1117 | + }, |
| 1118 | + "description": "Service is not available." |
| 1119 | + } |
| 1120 | + }, |
| 1121 | + "summary": "Export rules as CSV", |
| 1122 | + "x-stackit-authorization": { |
| 1123 | + "actions": [ |
| 1124 | + "ufw.instance.list" |
| 1125 | + ], |
| 1126 | + "resource-id": "projectId", |
| 1127 | + "resource-id-type": "dynamic", |
| 1128 | + "resource-type": "project" |
| 1129 | + } |
| 1130 | + } |
| 1131 | + }, |
1010 | 1132 | "/v1beta/projects/{projectId}/regions/{regionId}/services/{serviceId}": { |
1011 | 1133 | "get": { |
1012 | 1134 | "description": "Get a list of available instances per service that are stored in the project.", |
|
0 commit comments