Skip to content

Commit 0807bed

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5aa96e08 of spec repo
1 parent 6ded755 commit 0807bed

File tree

8 files changed

+885
-4
lines changed

8 files changed

+885
-4
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-13 18:28:02.734157",
8-
"spec_repo_commit": "3517c947"
7+
"regenerated": "2025-01-13 22:02:33.392174",
8+
"spec_repo_commit": "5aa96e08"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-13 18:28:02.749067",
13-
"spec_repo_commit": "3517c947"
12+
"regenerated": "2025-01-13 22:02:33.407794",
13+
"spec_repo_commit": "5aa96e08"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+108
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,27 @@ components:
213213
required: true
214214
schema:
215215
type: string
216+
CustomFrameworkHandle:
217+
description: The framework handle.
218+
in: path
219+
name: handle
220+
required: true
221+
schema:
222+
type: string
223+
CustomFrameworkOrgID:
224+
description: The ID of the organization.
225+
in: path
226+
name: org_id
227+
required: true
228+
schema:
229+
type: string
230+
CustomFrameworkVersion:
231+
description: The framework version.
232+
in: path
233+
name: version
234+
required: true
235+
schema:
236+
type: string
216237
EntityID:
217238
description: UUID or Entity Ref.
218239
in: path
@@ -8375,6 +8396,54 @@ components:
83758396
$ref: '#/components/schemas/CustomDestinationResponseDefinition'
83768397
type: array
83778398
type: object
8399+
CustomFrameworkMetadata:
8400+
description: Response object for an organization's custom frameworks.
8401+
properties:
8402+
created_at:
8403+
description: Framework Creation Date
8404+
format: int64
8405+
type: integer
8406+
created_by:
8407+
description: Framework Creator
8408+
type: string
8409+
description:
8410+
description: Framework Description
8411+
type: string
8412+
handle:
8413+
description: Framework Handle
8414+
example: ''
8415+
type: string
8416+
icon_url:
8417+
description: Framework Icon URL
8418+
type: string
8419+
id:
8420+
description: Custom Framework ID
8421+
example: ''
8422+
type: string
8423+
name:
8424+
description: Framework Name
8425+
example: ''
8426+
type: string
8427+
org_id:
8428+
description: Org ID
8429+
example: 0
8430+
format: int64
8431+
type: integer
8432+
updated_at:
8433+
description: Framework Update Date
8434+
format: int64
8435+
type: integer
8436+
version:
8437+
description: Framework Version
8438+
example: ''
8439+
type: string
8440+
required:
8441+
- id
8442+
- org_id
8443+
- handle
8444+
- version
8445+
- name
8446+
type: object
83788447
DORADeploymentRequest:
83798448
description: Request to create a DORA deployment event.
83808449
properties:
@@ -9015,6 +9084,12 @@ components:
90159084
type: string
90169085
x-enum-varnames:
90179086
- APPDEFINITIONS
9087+
DeleteCustomFrameworkResponse:
9088+
description: Delete a custom framework.
9089+
properties:
9090+
data:
9091+
$ref: '#/components/schemas/CustomFrameworkMetadata'
9092+
type: object
90189093
DependencyLocation:
90199094
description: Static library vulnerability location.
90209095
properties:
@@ -40135,6 +40210,39 @@ paths:
4013540210
operator: OR
4013640211
permissions:
4013740212
- org_management
40213+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}:
40214+
delete:
40215+
description: Delete a custom framework.
40216+
operationId: DeleteCustomFramework
40217+
parameters:
40218+
- $ref: '#/components/parameters/CustomFrameworkOrgID'
40219+
- $ref: '#/components/parameters/CustomFrameworkHandle'
40220+
- $ref: '#/components/parameters/CustomFrameworkVersion'
40221+
responses:
40222+
'200':
40223+
content:
40224+
application/json:
40225+
schema:
40226+
$ref: '#/components/schemas/DeleteCustomFrameworkResponse'
40227+
description: OK
40228+
'400':
40229+
$ref: '#/components/responses/BadRequestResponse'
40230+
'429':
40231+
$ref: '#/components/responses/TooManyRequestsResponse'
40232+
'500':
40233+
$ref: '#/components/responses/BadRequestResponse'
40234+
security:
40235+
- apiKeyAuth: []
40236+
appKeyAuth: []
40237+
- AuthZ:
40238+
- security_monitoring_rules_read
40239+
summary: Delete a custom framework
40240+
tags:
40241+
- Security Monitoring
40242+
x-permission:
40243+
operator: OR
40244+
permissions:
40245+
- security_monitoring_rules_read
4013840246
/api/v2/permissions:
4013940247
get:
4014040248
description: Returns a list of all permissions, including name, description,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Delete a custom framework returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
6+
import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);
12+
13+
try {
14+
DeleteCustomFrameworkResponse result =
15+
apiInstance.deleteCustomFramework("org_id", "handle", "version");
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling SecurityMonitoringApi#deleteCustomFramework");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}

src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java

+184
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.datadog.api.client.v2.model.BulkMuteFindingsRequest;
1010
import com.datadog.api.client.v2.model.BulkMuteFindingsResponse;
1111
import com.datadog.api.client.v2.model.ConvertJobResultsToSignalsRequest;
12+
import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse;
1213
import com.datadog.api.client.v2.model.Finding;
1314
import com.datadog.api.client.v2.model.FindingEvaluation;
1415
import com.datadog.api.client.v2.model.FindingStatus;
@@ -1101,6 +1102,189 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression
11011102
new GenericType<SecurityMonitoringSuppressionResponse>() {});
11021103
}
11031104

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&lt;DeleteCustomFrameworkResponse&gt;
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&lt;DeleteCustomFrameworkResponse&gt;
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&lt;ApiResponse&lt;DeleteCustomFrameworkResponse&gt;&gt;
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+
11041288
/**
11051289
* Delete an existing job.
11061290
*

0 commit comments

Comments
 (0)