|
9 | 9 | import com.datadog.api.client.v2.model.BulkMuteFindingsRequest;
|
10 | 10 | import com.datadog.api.client.v2.model.BulkMuteFindingsResponse;
|
11 | 11 | import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest;
|
| 12 | +import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse; |
12 | 13 | import com.datadog.api.client.v2.model.Finding;
|
13 | 14 | import com.datadog.api.client.v2.model.FindingEvaluation;
|
14 | 15 | import com.datadog.api.client.v2.model.FindingStatus;
|
@@ -1101,6 +1102,189 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression
|
1101 | 1102 | new GenericType<SecurityMonitoringSuppressionResponse>() {});
|
1102 | 1103 | }
|
1103 | 1104 |
|
| 1105 | + /** |
| 1106 | + * Delete a custom framework. |
| 1107 | + * |
| 1108 | + * <p>See {@link #deleteCustomFrameworkWithHttpInfo}. |
| 1109 | + * |
| 1110 | + * @param orgId The ID of the organization. (required) |
| 1111 | + * @param handle The framework handle. (required) |
| 1112 | + * @param version The framework version. (required) |
| 1113 | + * @return DeleteCustomFrameworkResponse |
| 1114 | + * @throws ApiException if fails to make API call |
| 1115 | + */ |
| 1116 | + public DeleteCustomFrameworkResponse deleteCustomFramework( |
| 1117 | + String orgId, String handle, String version) throws ApiException { |
| 1118 | + return deleteCustomFrameworkWithHttpInfo(orgId, handle, version).getData(); |
| 1119 | + } |
| 1120 | + |
| 1121 | + /** |
| 1122 | + * Delete a custom framework. |
| 1123 | + * |
| 1124 | + * <p>See {@link #deleteCustomFrameworkWithHttpInfoAsync}. |
| 1125 | + * |
| 1126 | + * @param orgId The ID of the organization. (required) |
| 1127 | + * @param handle The framework handle. (required) |
| 1128 | + * @param version The framework version. (required) |
| 1129 | + * @return CompletableFuture<DeleteCustomFrameworkResponse> |
| 1130 | + */ |
| 1131 | + public CompletableFuture<DeleteCustomFrameworkResponse> deleteCustomFrameworkAsync( |
| 1132 | + String orgId, String handle, String version) { |
| 1133 | + return deleteCustomFrameworkWithHttpInfoAsync(orgId, handle, version) |
| 1134 | + .thenApply( |
| 1135 | + response -> { |
| 1136 | + return response.getData(); |
| 1137 | + }); |
| 1138 | + } |
| 1139 | + |
| 1140 | + /** |
| 1141 | + * Delete a custom framework. |
| 1142 | + * |
| 1143 | + * @param orgId The ID of the organization. (required) |
| 1144 | + * @param handle The framework handle. (required) |
| 1145 | + * @param version The framework version. (required) |
| 1146 | + * @return ApiResponse<DeleteCustomFrameworkResponse> |
| 1147 | + * @throws ApiException if fails to make API call |
| 1148 | + * @http.response.details |
| 1149 | + * <table border="1"> |
| 1150 | + * <caption>Response details</caption> |
| 1151 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 1152 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 1153 | + * <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr> |
| 1154 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 1155 | + * <tr><td> 500 </td><td> Bad Request </td><td> - </td></tr> |
| 1156 | + * </table> |
| 1157 | + */ |
| 1158 | + public ApiResponse<DeleteCustomFrameworkResponse> deleteCustomFrameworkWithHttpInfo( |
| 1159 | + String orgId, String handle, String version) throws ApiException { |
| 1160 | + Object localVarPostBody = null; |
| 1161 | + |
| 1162 | + // verify the required parameter 'orgId' is set |
| 1163 | + if (orgId == null) { |
| 1164 | + throw new ApiException( |
| 1165 | + 400, "Missing the required parameter 'orgId' when calling deleteCustomFramework"); |
| 1166 | + } |
| 1167 | + |
| 1168 | + // verify the required parameter 'handle' is set |
| 1169 | + if (handle == null) { |
| 1170 | + throw new ApiException( |
| 1171 | + 400, "Missing the required parameter 'handle' when calling deleteCustomFramework"); |
| 1172 | + } |
| 1173 | + |
| 1174 | + // verify the required parameter 'version' is set |
| 1175 | + if (version == null) { |
| 1176 | + throw new ApiException( |
| 1177 | + 400, "Missing the required parameter 'version' when calling deleteCustomFramework"); |
| 1178 | + } |
| 1179 | + // create path and map variables |
| 1180 | + String localVarPath = |
| 1181 | + "/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}" |
| 1182 | + .replaceAll("\\{" + "org_id" + "\\}", apiClient.escapeString(orgId.toString())) |
| 1183 | + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) |
| 1184 | + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); |
| 1185 | + |
| 1186 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 1187 | + |
| 1188 | + Invocation.Builder builder = |
| 1189 | + apiClient.createBuilder( |
| 1190 | + "v2.SecurityMonitoringApi.deleteCustomFramework", |
| 1191 | + localVarPath, |
| 1192 | + new ArrayList<Pair>(), |
| 1193 | + localVarHeaderParams, |
| 1194 | + new HashMap<String, String>(), |
| 1195 | + new String[] {"application/json"}, |
| 1196 | + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); |
| 1197 | + return apiClient.invokeAPI( |
| 1198 | + "DELETE", |
| 1199 | + builder, |
| 1200 | + localVarHeaderParams, |
| 1201 | + new String[] {}, |
| 1202 | + localVarPostBody, |
| 1203 | + new HashMap<String, Object>(), |
| 1204 | + false, |
| 1205 | + new GenericType<DeleteCustomFrameworkResponse>() {}); |
| 1206 | + } |
| 1207 | + |
| 1208 | + /** |
| 1209 | + * Delete a custom framework. |
| 1210 | + * |
| 1211 | + * <p>See {@link #deleteCustomFrameworkWithHttpInfo}. |
| 1212 | + * |
| 1213 | + * @param orgId The ID of the organization. (required) |
| 1214 | + * @param handle The framework handle. (required) |
| 1215 | + * @param version The framework version. (required) |
| 1216 | + * @return CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> |
| 1217 | + */ |
| 1218 | + public CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> |
| 1219 | + deleteCustomFrameworkWithHttpInfoAsync(String orgId, String handle, String version) { |
| 1220 | + Object localVarPostBody = null; |
| 1221 | + |
| 1222 | + // verify the required parameter 'orgId' is set |
| 1223 | + if (orgId == null) { |
| 1224 | + CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> result = |
| 1225 | + new CompletableFuture<>(); |
| 1226 | + result.completeExceptionally( |
| 1227 | + new ApiException( |
| 1228 | + 400, "Missing the required parameter 'orgId' when calling deleteCustomFramework")); |
| 1229 | + return result; |
| 1230 | + } |
| 1231 | + |
| 1232 | + // verify the required parameter 'handle' is set |
| 1233 | + if (handle == null) { |
| 1234 | + CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> result = |
| 1235 | + new CompletableFuture<>(); |
| 1236 | + result.completeExceptionally( |
| 1237 | + new ApiException( |
| 1238 | + 400, "Missing the required parameter 'handle' when calling deleteCustomFramework")); |
| 1239 | + return result; |
| 1240 | + } |
| 1241 | + |
| 1242 | + // verify the required parameter 'version' is set |
| 1243 | + if (version == null) { |
| 1244 | + CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> result = |
| 1245 | + new CompletableFuture<>(); |
| 1246 | + result.completeExceptionally( |
| 1247 | + new ApiException( |
| 1248 | + 400, "Missing the required parameter 'version' when calling deleteCustomFramework")); |
| 1249 | + return result; |
| 1250 | + } |
| 1251 | + // create path and map variables |
| 1252 | + String localVarPath = |
| 1253 | + "/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}" |
| 1254 | + .replaceAll("\\{" + "org_id" + "\\}", apiClient.escapeString(orgId.toString())) |
| 1255 | + .replaceAll("\\{" + "handle" + "\\}", apiClient.escapeString(handle.toString())) |
| 1256 | + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); |
| 1257 | + |
| 1258 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 1259 | + |
| 1260 | + Invocation.Builder builder; |
| 1261 | + try { |
| 1262 | + builder = |
| 1263 | + apiClient.createBuilder( |
| 1264 | + "v2.SecurityMonitoringApi.deleteCustomFramework", |
| 1265 | + localVarPath, |
| 1266 | + new ArrayList<Pair>(), |
| 1267 | + localVarHeaderParams, |
| 1268 | + new HashMap<String, String>(), |
| 1269 | + new String[] {"application/json"}, |
| 1270 | + new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"}); |
| 1271 | + } catch (ApiException ex) { |
| 1272 | + CompletableFuture<ApiResponse<DeleteCustomFrameworkResponse>> result = |
| 1273 | + new CompletableFuture<>(); |
| 1274 | + result.completeExceptionally(ex); |
| 1275 | + return result; |
| 1276 | + } |
| 1277 | + return apiClient.invokeAPIAsync( |
| 1278 | + "DELETE", |
| 1279 | + builder, |
| 1280 | + localVarHeaderParams, |
| 1281 | + new String[] {}, |
| 1282 | + localVarPostBody, |
| 1283 | + new HashMap<String, Object>(), |
| 1284 | + false, |
| 1285 | + new GenericType<DeleteCustomFrameworkResponse>() {}); |
| 1286 | + } |
| 1287 | + |
1104 | 1288 | /**
|
1105 | 1289 | * Delete an existing job.
|
1106 | 1290 | *
|
|
0 commit comments