Skip to content

Commit 8c24991

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e2cc2df0 of spec repo
1 parent eae2a0d commit 8c24991

File tree

12 files changed

+926
-4
lines changed

12 files changed

+926
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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": "2024-12-18 19:23:44.640997",
8-
"spec_repo_commit": "3f22290a"
7+
"regenerated": "2024-12-19 11:45:57.400197",
8+
"spec_repo_commit": "e2cc2df0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-18 19:23:44.656520",
13-
"spec_repo_commit": "3f22290a"
12+
"regenerated": "2024-12-19 11:45:57.416813",
13+
"spec_repo_commit": "e2cc2df0"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2615,6 +2615,57 @@ components:
26152615
$ref: '#/components/schemas/AwsCURConfig'
26162616
type: array
26172617
type: object
2618+
AwsScanOptionsAttributes:
2619+
description: Attributes for the AWS scan options.
2620+
properties:
2621+
lambda:
2622+
description: Indicates if scanning of Lambda functions is enabled.
2623+
example: true
2624+
type: boolean
2625+
sensitive_data:
2626+
description: Indicates if scanning for sensitive data is enabled.
2627+
example: false
2628+
type: boolean
2629+
vuln_containers_os:
2630+
description: Indicates if scanning for vulnerabilities in containers is
2631+
enabled.
2632+
example: true
2633+
type: boolean
2634+
vuln_host_os:
2635+
description: Indicates if scanning for vulnerabilities in hosts is enabled.
2636+
example: true
2637+
type: boolean
2638+
type: object
2639+
AwsScanOptionsData:
2640+
description: Single AWS Scan Options entry.
2641+
properties:
2642+
attributes:
2643+
$ref: '#/components/schemas/AwsScanOptionsAttributes'
2644+
id:
2645+
description: The ID of the AWS account.
2646+
example: '184366314700'
2647+
type: string
2648+
type:
2649+
$ref: '#/components/schemas/AwsScanOptionsType'
2650+
type: object
2651+
AwsScanOptionsResponse:
2652+
description: Response object that includes a list of AWS scan options.
2653+
properties:
2654+
data:
2655+
description: A list of AWS scan options.
2656+
items:
2657+
$ref: '#/components/schemas/AwsScanOptionsData'
2658+
type: array
2659+
type: object
2660+
AwsScanOptionsType:
2661+
default: aws_scan_options
2662+
description: The type of the resource. The value should always be `aws_scan_options`.
2663+
enum:
2664+
- aws_scan_options
2665+
example: aws_scan_options
2666+
type: string
2667+
x-enum-varnames:
2668+
- AWS_SCAN_OPTIONS
26182669
AzureUCConfig:
26192670
description: Azure config.
26202671
properties:
@@ -29269,6 +29320,24 @@ info:
2926929320
version: '1.0'
2927029321
openapi: 3.0.0
2927129322
paths:
29323+
/api/v2/agentless_scanning/accounts/aws:
29324+
get:
29325+
description: Fetches the scan options configured for AWS accounts.
29326+
operationId: ListAwsScanOptions
29327+
responses:
29328+
'200':
29329+
content:
29330+
application/json:
29331+
schema:
29332+
$ref: '#/components/schemas/AwsScanOptionsResponse'
29333+
description: OK
29334+
'403':
29335+
$ref: '#/components/responses/NotAuthorizedResponse'
29336+
'429':
29337+
$ref: '#/components/responses/TooManyRequestsResponse'
29338+
summary: Get AWS Scan Options
29339+
tags:
29340+
- Agentless Scanning
2927229341
/api/v2/api_keys:
2927329342
get:
2927429343
description: List all API keys available for your account.
@@ -46531,6 +46600,11 @@ tags:
4653146600
externalDocs:
4653246601
url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection
4653346602
name: AWS Logs Integration
46603+
- description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin
46604+
your hosts, running containers, and serverless functions\u2014all without\nrequiring
46605+
teams to install Agents on every host or where Agents cannot be installed.\nGo
46606+
to https://www.datadoghq.com/blog/agentless-scanning/ to learn more"
46607+
name: Agentless Scanning
4653446608
- description: Deploy and disable apps in App Builder.
4653546609
name: App Deployment
4653646610
- description: Create, read, update, and delete apps in App Builder.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Get AWS Scan Options 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.AgentlessScanningApi;
6+
import com.datadog.api.client.v2.model.AwsScanOptionsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
AgentlessScanningApi apiInstance = new AgentlessScanningApi(defaultClient);
12+
13+
try {
14+
AwsScanOptionsResponse result = apiInstance.listAwsScanOptions();
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling AgentlessScanningApi#listAwsScanOptions");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
package com.datadog.api.client.v2.api;
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.ApiResponse;
6+
import com.datadog.api.client.Pair;
7+
import com.datadog.api.client.v2.model.AwsScanOptionsResponse;
8+
import jakarta.ws.rs.client.Invocation;
9+
import jakarta.ws.rs.core.GenericType;
10+
import java.util.ArrayList;
11+
import java.util.HashMap;
12+
import java.util.Map;
13+
import java.util.concurrent.CompletableFuture;
14+
15+
@jakarta.annotation.Generated(
16+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
17+
public class AgentlessScanningApi {
18+
private ApiClient apiClient;
19+
20+
public AgentlessScanningApi() {
21+
this(ApiClient.getDefaultApiClient());
22+
}
23+
24+
public AgentlessScanningApi(ApiClient apiClient) {
25+
this.apiClient = apiClient;
26+
}
27+
28+
/**
29+
* Get the API client.
30+
*
31+
* @return API client
32+
*/
33+
public ApiClient getApiClient() {
34+
return apiClient;
35+
}
36+
37+
/**
38+
* Set the API client.
39+
*
40+
* @param apiClient an instance of API client
41+
*/
42+
public void setApiClient(ApiClient apiClient) {
43+
this.apiClient = apiClient;
44+
}
45+
46+
/**
47+
* Get AWS Scan Options.
48+
*
49+
* <p>See {@link #listAwsScanOptionsWithHttpInfo}.
50+
*
51+
* @return AwsScanOptionsResponse
52+
* @throws ApiException if fails to make API call
53+
*/
54+
public AwsScanOptionsResponse listAwsScanOptions() throws ApiException {
55+
return listAwsScanOptionsWithHttpInfo().getData();
56+
}
57+
58+
/**
59+
* Get AWS Scan Options.
60+
*
61+
* <p>See {@link #listAwsScanOptionsWithHttpInfoAsync}.
62+
*
63+
* @return CompletableFuture&lt;AwsScanOptionsResponse&gt;
64+
*/
65+
public CompletableFuture<AwsScanOptionsResponse> listAwsScanOptionsAsync() {
66+
return listAwsScanOptionsWithHttpInfoAsync()
67+
.thenApply(
68+
response -> {
69+
return response.getData();
70+
});
71+
}
72+
73+
/**
74+
* Fetches the scan options configured for AWS accounts.
75+
*
76+
* @return ApiResponse&lt;AwsScanOptionsResponse&gt;
77+
* @throws ApiException if fails to make API call
78+
* @http.response.details
79+
* <table border="1">
80+
* <caption>Response details</caption>
81+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
82+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
83+
* <tr><td> 403 </td><td> Not Authorized </td><td> - </td></tr>
84+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
85+
* </table>
86+
*/
87+
public ApiResponse<AwsScanOptionsResponse> listAwsScanOptionsWithHttpInfo() throws ApiException {
88+
Object localVarPostBody = null;
89+
// create path and map variables
90+
String localVarPath = "/api/v2/agentless_scanning/accounts/aws";
91+
92+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
93+
94+
Invocation.Builder builder =
95+
apiClient.createBuilder(
96+
"v2.AgentlessScanningApi.listAwsScanOptions",
97+
localVarPath,
98+
new ArrayList<Pair>(),
99+
localVarHeaderParams,
100+
new HashMap<String, String>(),
101+
new String[] {"application/json"},
102+
new String[] {"apiKeyAuth", "appKeyAuth"});
103+
return apiClient.invokeAPI(
104+
"GET",
105+
builder,
106+
localVarHeaderParams,
107+
new String[] {},
108+
localVarPostBody,
109+
new HashMap<String, Object>(),
110+
false,
111+
new GenericType<AwsScanOptionsResponse>() {});
112+
}
113+
114+
/**
115+
* Get AWS Scan Options.
116+
*
117+
* <p>See {@link #listAwsScanOptionsWithHttpInfo}.
118+
*
119+
* @return CompletableFuture&lt;ApiResponse&lt;AwsScanOptionsResponse&gt;&gt;
120+
*/
121+
public CompletableFuture<ApiResponse<AwsScanOptionsResponse>>
122+
listAwsScanOptionsWithHttpInfoAsync() {
123+
Object localVarPostBody = null;
124+
// create path and map variables
125+
String localVarPath = "/api/v2/agentless_scanning/accounts/aws";
126+
127+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
128+
129+
Invocation.Builder builder;
130+
try {
131+
builder =
132+
apiClient.createBuilder(
133+
"v2.AgentlessScanningApi.listAwsScanOptions",
134+
localVarPath,
135+
new ArrayList<Pair>(),
136+
localVarHeaderParams,
137+
new HashMap<String, String>(),
138+
new String[] {"application/json"},
139+
new String[] {"apiKeyAuth", "appKeyAuth"});
140+
} catch (ApiException ex) {
141+
CompletableFuture<ApiResponse<AwsScanOptionsResponse>> result = new CompletableFuture<>();
142+
result.completeExceptionally(ex);
143+
return result;
144+
}
145+
return apiClient.invokeAPIAsync(
146+
"GET",
147+
builder,
148+
localVarHeaderParams,
149+
new String[] {},
150+
localVarPostBody,
151+
new HashMap<String, Object>(),
152+
false,
153+
new GenericType<AwsScanOptionsResponse>() {});
154+
}
155+
}

0 commit comments

Comments
 (0)