diff --git a/.apigentools-info b/.apigentools-info index 579e91f95a6..c919ffb1229 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-06 16:19:13.185671", - "spec_repo_commit": "1a11ef53" + "regenerated": "2025-03-06 17:12:11.632479", + "spec_repo_commit": "9dd2b6ae" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-06 16:19:13.200872", - "spec_repo_commit": "1a11ef53" + "regenerated": "2025-03-06 17:12:11.648786", + "spec_repo_commit": "9dd2b6ae" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5d5efbeb664..081ba36b6b7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4122,6 +4122,8 @@ components: of EC2 instances, lambda functions, AMI, ECR, RDS and S3 buckets. example: arn:aws:ec2:us-east-1:727000456123:instance/i-0eabb50529b67a1ba type: string + required: + - arn type: object AwsOnDemandCreateData: description: Object for a single AWS on demand task. @@ -4219,6 +4221,11 @@ components: description: Indicates if scanning for vulnerabilities in hosts is enabled. example: true type: boolean + required: + - lambda + - sensitive_data + - vuln_containers_os + - vuln_host_os type: object AwsScanOptionsCreateData: description: Object for the scan options of a single AWS account. @@ -33982,7 +33989,9 @@ paths: permissions: - security_monitoring_findings_read post: - description: Trigger the scan of an AWS resource with a high priority. + description: Trigger the scan of an AWS resource with a high priority. Agentless + scanning must be activated for the AWS account containing the resource to + scan. operationId: CreateAwsOnDemandTask requestBody: content: @@ -34015,7 +34024,7 @@ paths: /api/v2/agentless_scanning/ondemand/aws/{task_id}: get: description: Fetch the data of a specific on demand task. - operationId: RetrieveAwsOnDemandTask + operationId: GetAwsOnDemandTask parameters: - $ref: '#/components/parameters/OnDemandTaskId' responses: @@ -53068,8 +53077,9 @@ tags: name: Action Connection - description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin your hosts, running containers, and serverless functions\u2014all without\nrequiring - teams to install Agents on every host or where Agents cannot be installed.\nGo - to https://www.datadoghq.com/blog/agentless-scanning/ to learn more." + teams to install Agents on every host or where Agents cannot be installed.\nAgentless + offers also Sensitive Data Scanning capabilities on your storage.\nGo to https://www.datadoghq.com/blog/agentless-scanning/ + to learn more." name: Agentless Scanning - description: Datadog App Builder provides a low-code solution to rapidly develop and integrate secure, customized applications into your monitoring stack that diff --git a/examples/v2/agentless-scanning/RetrieveAwsOnDemandTask.java b/examples/v2/agentless-scanning/GetAwsOnDemandTask.java similarity index 87% rename from examples/v2/agentless-scanning/RetrieveAwsOnDemandTask.java rename to examples/v2/agentless-scanning/GetAwsOnDemandTask.java index 4e64885bb55..4276aa420c1 100644 --- a/examples/v2/agentless-scanning/RetrieveAwsOnDemandTask.java +++ b/examples/v2/agentless-scanning/GetAwsOnDemandTask.java @@ -12,10 +12,10 @@ public static void main(String[] args) { try { AwsOnDemandResponse result = - apiInstance.retrieveAwsOnDemandTask("63d6b4f5-e5d0-4d90-824a-9580f05f026a"); + apiInstance.getAwsOnDemandTask("63d6b4f5-e5d0-4d90-824a-9580f05f026a"); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AgentlessScanningApi#retrieveAwsOnDemandTask"); + System.err.println("Exception when calling AgentlessScanningApi#getAwsOnDemandTask"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/src/main/java/com/datadog/api/client/v2/api/AgentlessScanningApi.java b/src/main/java/com/datadog/api/client/v2/api/AgentlessScanningApi.java index dbadff510d5..61be74f9360 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AgentlessScanningApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AgentlessScanningApi.java @@ -81,7 +81,8 @@ public CompletableFuture createAwsOnDemandTaskAsync( } /** - * Trigger the scan of an AWS resource with a high priority. + * Trigger the scan of an AWS resource with a high priority. Agentless scanning must be activated + * for the AWS account containing the resource to scan. * * @param body The definition of the on demand task. (required) * @return ApiResponse<AwsOnDemandResponse> @@ -451,26 +452,28 @@ public CompletableFuture> deleteAwsScanOptionsWithHttpInfoAsyn } /** - * Get AWS On Demand tasks. + * Get AWS On Demand task by id. * - *

See {@link #listAwsOnDemandTasksWithHttpInfo}. + *

See {@link #getAwsOnDemandTaskWithHttpInfo}. * - * @return AwsOnDemandListResponse + * @param taskId The UUID of the task. (required) + * @return AwsOnDemandResponse * @throws ApiException if fails to make API call */ - public AwsOnDemandListResponse listAwsOnDemandTasks() throws ApiException { - return listAwsOnDemandTasksWithHttpInfo().getData(); + public AwsOnDemandResponse getAwsOnDemandTask(String taskId) throws ApiException { + return getAwsOnDemandTaskWithHttpInfo(taskId).getData(); } /** - * Get AWS On Demand tasks. + * Get AWS On Demand task by id. * - *

See {@link #listAwsOnDemandTasksWithHttpInfoAsync}. + *

See {@link #getAwsOnDemandTaskWithHttpInfoAsync}. * - * @return CompletableFuture<AwsOnDemandListResponse> + * @param taskId The UUID of the task. (required) + * @return CompletableFuture<AwsOnDemandResponse> */ - public CompletableFuture listAwsOnDemandTasksAsync() { - return listAwsOnDemandTasksWithHttpInfoAsync() + public CompletableFuture getAwsOnDemandTaskAsync(String taskId) { + return getAwsOnDemandTaskWithHttpInfoAsync(taskId) .thenApply( response -> { return response.getData(); @@ -478,30 +481,41 @@ public CompletableFuture listAwsOnDemandTasksAsync() { } /** - * Fetches the most recent 1000 AWS on demand tasks. + * Fetch the data of a specific on demand task. * - * @return ApiResponse<AwsOnDemandListResponse> + * @param taskId The UUID of the task. (required) + * @return ApiResponse<AwsOnDemandResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * + * * + * * *
Response details
Status Code Description Response Headers
200 OK -
200 OK. -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listAwsOnDemandTasksWithHttpInfo() + public ApiResponse getAwsOnDemandTaskWithHttpInfo(String taskId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'taskId' is set + if (taskId == null) { + throw new ApiException( + 400, "Missing the required parameter 'taskId' when calling getAwsOnDemandTask"); + } // create path and map variables - String localVarPath = "/api/v2/agentless_scanning/ondemand/aws"; + String localVarPath = + "/api/v2/agentless_scanning/ondemand/aws/{task_id}" + .replaceAll("\\{" + "task_id" + "\\}", apiClient.escapeString(taskId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.AgentlessScanningApi.listAwsOnDemandTasks", + "v2.AgentlessScanningApi.getAwsOnDemandTask", localVarPath, new ArrayList(), localVarHeaderParams, @@ -516,21 +530,33 @@ public ApiResponse listAwsOnDemandTasksWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AWS On Demand tasks. + * Get AWS On Demand task by id. * - *

See {@link #listAwsOnDemandTasksWithHttpInfo}. + *

See {@link #getAwsOnDemandTaskWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<AwsOnDemandListResponse>> + * @param taskId The UUID of the task. (required) + * @return CompletableFuture<ApiResponse<AwsOnDemandResponse>> */ - public CompletableFuture> - listAwsOnDemandTasksWithHttpInfoAsync() { + public CompletableFuture> getAwsOnDemandTaskWithHttpInfoAsync( + String taskId) { Object localVarPostBody = null; + + // verify the required parameter 'taskId' is set + if (taskId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'taskId' when calling getAwsOnDemandTask")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/agentless_scanning/ondemand/aws"; + String localVarPath = + "/api/v2/agentless_scanning/ondemand/aws/{task_id}" + .replaceAll("\\{" + "task_id" + "\\}", apiClient.escapeString(taskId.toString())); Map localVarHeaderParams = new HashMap(); @@ -538,7 +564,7 @@ public ApiResponse listAwsOnDemandTasksWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.AgentlessScanningApi.listAwsOnDemandTasks", + "v2.AgentlessScanningApi.getAwsOnDemandTask", localVarPath, new ArrayList(), localVarHeaderParams, @@ -546,7 +572,7 @@ public ApiResponse listAwsOnDemandTasksWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -558,30 +584,30 @@ public ApiResponse listAwsOnDemandTasksWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AWS Scan Options. + * Get AWS On Demand tasks. * - *

See {@link #listAwsScanOptionsWithHttpInfo}. + *

See {@link #listAwsOnDemandTasksWithHttpInfo}. * - * @return AwsScanOptionsListResponse + * @return AwsOnDemandListResponse * @throws ApiException if fails to make API call */ - public AwsScanOptionsListResponse listAwsScanOptions() throws ApiException { - return listAwsScanOptionsWithHttpInfo().getData(); + public AwsOnDemandListResponse listAwsOnDemandTasks() throws ApiException { + return listAwsOnDemandTasksWithHttpInfo().getData(); } /** - * Get AWS Scan Options. + * Get AWS On Demand tasks. * - *

See {@link #listAwsScanOptionsWithHttpInfoAsync}. + *

See {@link #listAwsOnDemandTasksWithHttpInfoAsync}. * - * @return CompletableFuture<AwsScanOptionsListResponse> + * @return CompletableFuture<AwsOnDemandListResponse> */ - public CompletableFuture listAwsScanOptionsAsync() { - return listAwsScanOptionsWithHttpInfoAsync() + public CompletableFuture listAwsOnDemandTasksAsync() { + return listAwsOnDemandTasksWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -589,9 +615,9 @@ public CompletableFuture listAwsScanOptionsAsync() { } /** - * Fetches the scan options configured for AWS accounts. + * Fetches the most recent 1000 AWS on demand tasks. * - * @return ApiResponse<AwsScanOptionsListResponse> + * @return ApiResponse<AwsOnDemandListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -602,17 +628,17 @@ public CompletableFuture listAwsScanOptionsAsync() { * *
429 Too many requests -
*/ - public ApiResponse listAwsScanOptionsWithHttpInfo() + public ApiResponse listAwsOnDemandTasksWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/agentless_scanning/accounts/aws"; + String localVarPath = "/api/v2/agentless_scanning/ondemand/aws"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.AgentlessScanningApi.listAwsScanOptions", + "v2.AgentlessScanningApi.listAwsOnDemandTasks", localVarPath, new ArrayList(), localVarHeaderParams, @@ -627,21 +653,21 @@ public ApiResponse listAwsScanOptionsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AWS Scan Options. + * Get AWS On Demand tasks. * - *

See {@link #listAwsScanOptionsWithHttpInfo}. + *

See {@link #listAwsOnDemandTasksWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<AwsScanOptionsListResponse>> + * @return CompletableFuture<ApiResponse<AwsOnDemandListResponse>> */ - public CompletableFuture> - listAwsScanOptionsWithHttpInfoAsync() { + public CompletableFuture> + listAwsOnDemandTasksWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/agentless_scanning/accounts/aws"; + String localVarPath = "/api/v2/agentless_scanning/ondemand/aws"; Map localVarHeaderParams = new HashMap(); @@ -649,7 +675,7 @@ public ApiResponse listAwsScanOptionsWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.AgentlessScanningApi.listAwsScanOptions", + "v2.AgentlessScanningApi.listAwsOnDemandTasks", localVarPath, new ArrayList(), localVarHeaderParams, @@ -657,7 +683,7 @@ public ApiResponse listAwsScanOptionsWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -669,32 +695,30 @@ public ApiResponse listAwsScanOptionsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AWS On Demand task by id. + * Get AWS Scan Options. * - *

See {@link #retrieveAwsOnDemandTaskWithHttpInfo}. + *

See {@link #listAwsScanOptionsWithHttpInfo}. * - * @param taskId The UUID of the task. (required) - * @return AwsOnDemandResponse + * @return AwsScanOptionsListResponse * @throws ApiException if fails to make API call */ - public AwsOnDemandResponse retrieveAwsOnDemandTask(String taskId) throws ApiException { - return retrieveAwsOnDemandTaskWithHttpInfo(taskId).getData(); + public AwsScanOptionsListResponse listAwsScanOptions() throws ApiException { + return listAwsScanOptionsWithHttpInfo().getData(); } /** - * Get AWS On Demand task by id. + * Get AWS Scan Options. * - *

See {@link #retrieveAwsOnDemandTaskWithHttpInfoAsync}. + *

See {@link #listAwsScanOptionsWithHttpInfoAsync}. * - * @param taskId The UUID of the task. (required) - * @return CompletableFuture<AwsOnDemandResponse> + * @return CompletableFuture<AwsScanOptionsListResponse> */ - public CompletableFuture retrieveAwsOnDemandTaskAsync(String taskId) { - return retrieveAwsOnDemandTaskWithHttpInfoAsync(taskId) + public CompletableFuture listAwsScanOptionsAsync() { + return listAwsScanOptionsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -702,41 +726,30 @@ public CompletableFuture retrieveAwsOnDemandTaskAsync(Strin } /** - * Fetch the data of a specific on demand task. + * Fetches the scan options configured for AWS accounts. * - * @param taskId The UUID of the task. (required) - * @return ApiResponse<AwsOnDemandResponse> + * @return ApiResponse<AwsScanOptionsListResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * - * * *
Response details
Status Code Description Response Headers
200 OK. -
400 Bad Request -
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse retrieveAwsOnDemandTaskWithHttpInfo(String taskId) + public ApiResponse listAwsScanOptionsWithHttpInfo() throws ApiException { Object localVarPostBody = null; - - // verify the required parameter 'taskId' is set - if (taskId == null) { - throw new ApiException( - 400, "Missing the required parameter 'taskId' when calling retrieveAwsOnDemandTask"); - } // create path and map variables - String localVarPath = - "/api/v2/agentless_scanning/ondemand/aws/{task_id}" - .replaceAll("\\{" + "task_id" + "\\}", apiClient.escapeString(taskId.toString())); + String localVarPath = "/api/v2/agentless_scanning/accounts/aws"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.AgentlessScanningApi.retrieveAwsOnDemandTask", + "v2.AgentlessScanningApi.listAwsScanOptions", localVarPath, new ArrayList(), localVarHeaderParams, @@ -751,33 +764,21 @@ public ApiResponse retrieveAwsOnDemandTaskWithHttpInfo(Stri localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get AWS On Demand task by id. + * Get AWS Scan Options. * - *

See {@link #retrieveAwsOnDemandTaskWithHttpInfo}. + *

See {@link #listAwsScanOptionsWithHttpInfo}. * - * @param taskId The UUID of the task. (required) - * @return CompletableFuture<ApiResponse<AwsOnDemandResponse>> + * @return CompletableFuture<ApiResponse<AwsScanOptionsListResponse>> */ - public CompletableFuture> - retrieveAwsOnDemandTaskWithHttpInfoAsync(String taskId) { + public CompletableFuture> + listAwsScanOptionsWithHttpInfoAsync() { Object localVarPostBody = null; - - // verify the required parameter 'taskId' is set - if (taskId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'taskId' when calling retrieveAwsOnDemandTask")); - return result; - } // create path and map variables - String localVarPath = - "/api/v2/agentless_scanning/ondemand/aws/{task_id}" - .replaceAll("\\{" + "task_id" + "\\}", apiClient.escapeString(taskId.toString())); + String localVarPath = "/api/v2/agentless_scanning/accounts/aws"; Map localVarHeaderParams = new HashMap(); @@ -785,7 +786,7 @@ public ApiResponse retrieveAwsOnDemandTaskWithHttpInfo(Stri try { builder = apiClient.createBuilder( - "v2.AgentlessScanningApi.retrieveAwsOnDemandTask", + "v2.AgentlessScanningApi.listAwsScanOptions", localVarPath, new ArrayList(), localVarHeaderParams, @@ -793,7 +794,7 @@ public ApiResponse retrieveAwsOnDemandTaskWithHttpInfo(Stri new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -805,7 +806,7 @@ public ApiResponse retrieveAwsOnDemandTaskWithHttpInfo(Stri localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsOnDemandCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AwsOnDemandCreateAttributes.java index b6cd8e99e20..c734424b76b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsOnDemandCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsOnDemandCreateAttributes.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,6 +26,14 @@ public class AwsOnDemandCreateAttributes { public static final String JSON_PROPERTY_ARN = "arn"; private String arn; + public AwsOnDemandCreateAttributes() {} + + @JsonCreator + public AwsOnDemandCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ARN) String arn) { + this.arn = arn; + } + public AwsOnDemandCreateAttributes arn(String arn) { this.arn = arn; return this; @@ -36,9 +45,8 @@ public AwsOnDemandCreateAttributes arn(String arn) { * * @return arn */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ARN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getArn() { return arn; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsScanOptionsCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AwsScanOptionsCreateAttributes.java index 957b05cf44c..c85f35e24d6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsScanOptionsCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsScanOptionsCreateAttributes.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +40,21 @@ public class AwsScanOptionsCreateAttributes { public static final String JSON_PROPERTY_VULN_HOST_OS = "vuln_host_os"; private Boolean vulnHostOs; + public AwsScanOptionsCreateAttributes() {} + + @JsonCreator + public AwsScanOptionsCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_LAMBDA) Boolean lambda, + @JsonProperty(required = true, value = JSON_PROPERTY_SENSITIVE_DATA) Boolean sensitiveData, + @JsonProperty(required = true, value = JSON_PROPERTY_VULN_CONTAINERS_OS) + Boolean vulnContainersOs, + @JsonProperty(required = true, value = JSON_PROPERTY_VULN_HOST_OS) Boolean vulnHostOs) { + this.lambda = lambda; + this.sensitiveData = sensitiveData; + this.vulnContainersOs = vulnContainersOs; + this.vulnHostOs = vulnHostOs; + } + public AwsScanOptionsCreateAttributes lambda(Boolean lambda) { this.lambda = lambda; return this; @@ -49,9 +65,8 @@ public AwsScanOptionsCreateAttributes lambda(Boolean lambda) { * * @return lambda */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_LAMBDA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public Boolean getLambda() { return lambda; } @@ -70,9 +85,8 @@ public AwsScanOptionsCreateAttributes sensitiveData(Boolean sensitiveData) { * * @return sensitiveData */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENSITIVE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public Boolean getSensitiveData() { return sensitiveData; } @@ -91,9 +105,8 @@ public AwsScanOptionsCreateAttributes vulnContainersOs(Boolean vulnContainersOs) * * @return vulnContainersOs */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_VULN_CONTAINERS_OS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public Boolean getVulnContainersOs() { return vulnContainersOs; } @@ -112,9 +125,8 @@ public AwsScanOptionsCreateAttributes vulnHostOs(Boolean vulnHostOs) { * * @return vulnHostOs */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_VULN_HOST_OS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public Boolean getVulnHostOs() { return vulnHostOs; } diff --git a/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.freeze index 10fcf78da0d..5663378f0ab 100644 --- a/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.freeze +++ b/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.freeze @@ -1 +1 @@ -2025-03-01T20:02:10.630Z \ No newline at end of file +2025-03-06T11:57:47.413Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.json index 0227baa06f9..20684f57cff 100644 --- a/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Post_AWS_Scan_Options_returns_Conflict_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"lambda\":false,\"vuln_containers_os\":true,\"vuln_host_os\":true},\"id\":\"000000000002\",\"type\":\"aws_scan_options\"}}" + "json": "{\"data\":{\"attributes\":{\"lambda\":false,\"sensitive_data\":false,\"vuln_containers_os\":true,\"vuln_host_os\":true},\"id\":\"000000000002\",\"type\":\"aws_scan_options\"}}" }, "headers": {}, "method": "POST", @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "686a593a-4dba-37de-e65b-a2748ae8e100" + "id": "f65bb980-57f2-5b92-482f-54c273127342" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/agentless_scanning.feature b/src/test/resources/com/datadog/api/client/v2/api/agentless_scanning.feature index 28723bdadfe..5b0c5e96582 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/agentless_scanning.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/agentless_scanning.feature @@ -3,7 +3,8 @@ Feature: Agentless Scanning Datadog Agentless Scanning provides visibility into risks and vulnerabilities within your hosts, running containers, and serverless functions—all without requiring teams to install Agents on every host or - where Agents cannot be installed. Go to + where Agents cannot be installed. Agentless offers also Sensitive Data + Scanning capabilities on your storage. Go to https://www.datadoghq.com/blog/agentless-scanning/ to learn more. Background: @@ -34,21 +35,21 @@ Feature: Agentless Scanning @team:DataDog/k9-agentless Scenario: Get AWS On Demand task by id returns "Bad Request" response - Given new "RetrieveAwsOnDemandTask" request + Given new "GetAwsOnDemandTask" request And request contains "task_id" parameter with value "invalid-uuid" When the request is sent Then the response status is 400 Bad Request @team:DataDog/k9-agentless Scenario: Get AWS On Demand task by id returns "Not Found" response - Given new "RetrieveAwsOnDemandTask" request + Given new "GetAwsOnDemandTask" request And request contains "task_id" parameter with value "00000000-0000-0000-824a-000000000000" When the request is sent Then the response status is 404 Not Found @team:DataDog/k9-agentless Scenario: Get AWS On Demand task by id returns "OK." response - Given new "RetrieveAwsOnDemandTask" request + Given new "GetAwsOnDemandTask" request And request contains "task_id" parameter with value "63d6b4f5-e5d0-4d90-824a-9580f05f026a" When the request is sent Then the response status is 200 OK @@ -115,7 +116,7 @@ Feature: Agentless Scanning @team:DataDog/k9-agentless Scenario: Post AWS Scan Options returns "Conflict" response Given new "CreateAwsScanOptions" request - And body with value {"data":{"type":"aws_scan_options","id":"000000000002","attributes":{"vuln_host_os":true,"vuln_containers_os":true,"lambda":false}}} + And body with value {"data":{"type":"aws_scan_options","id":"000000000002","attributes":{"vuln_host_os":true,"vuln_containers_os":true,"sensitive_data":false,"lambda":false}}} When the request is sent Then the response status is 409 Conflict diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 051da61ffbc..89688e1e85d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -73,7 +73,7 @@ "type": "idempotent" } }, - "RetrieveAwsOnDemandTask": { + "GetAwsOnDemandTask": { "tag": "Agentless Scanning", "undo": { "type": "safe"