Skip to content

Commit 579640d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f17d35ab of spec repo
1 parent 96121e4 commit 579640d

File tree

13 files changed

+610
-4
lines changed

13 files changed

+610
-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-17 15:50:59.257797",
8-
"spec_repo_commit": "b82d3677"
7+
"regenerated": "2024-12-18 15:44:46.578664",
8+
"spec_repo_commit": "f17d35ab"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-17 15:50:59.273162",
13-
"spec_repo_commit": "b82d3677"
12+
"regenerated": "2024-12-18 15:44:46.593812",
13+
"spec_repo_commit": "f17d35ab"
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.
@@ -46530,6 +46599,11 @@ tags:
4653046599
externalDocs:
4653146600
url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection
4653246601
name: AWS Logs Integration
46602+
- description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin
46603+
your hosts, running containers, and serverless functions\u2014all without\nrequiring
46604+
teams to install agents on every host or where agents cannot be installed.\nGo
46605+
to https://www.datadoghq.com/blog/agentless-scanning/ to learn more"
46606+
name: Agentless Scanning
4653346607
- description: Deploy and disable apps in App Builder.
4653446608
name: App Deployment
4653546609
- description: Create, read, update, and delete apps in App Builder.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2024-12-18T15:40:11.636Z

cassettes/features/v2/agentless_scanning/Get-AWS-Scan-Options-returns-OK-response.yml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get AWS Scan Options returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CSMAgentsAPI.new
5+
p api_instance.list_aws_scan_options()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@endpoint(agentless-scanning) @endpoint(agentless-scanning-v2)
2+
Feature: Agentless Scanning
3+
Datadog Agentless Scanning provides visibility into risks and
4+
vulnerabilities within your hosts, running containers, and serverless
5+
functions—all without requiring teams to install agents on every host or
6+
where agents cannot be installed. Go to
7+
https://www.datadoghq.com/blog/agentless-scanning/ to learn more
8+
9+
@team:DataDog/k9-cloud-security-platform
10+
Scenario: Get AWS Scan Options returns "OK" response
11+
Given a valid "apiKeyAuth" key in the system
12+
And a valid "appKeyAuth" key in the system
13+
And an instance of "CSMAgents" API
14+
And new "ListAwsScanOptions" request
15+
When the request is sent
16+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"ListAwsScanOptions": {
3+
"tag": "Agentless Scanning",
4+
"undo": {
5+
"type": "safe"
6+
}
7+
},
28
"ListAPIKeys": {
39
"tag": "Key Management",
410
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,10 @@ def overrides
10331033
"v2.aws_regions_include_all" => "AWSRegionsIncludeAll",
10341034
"v2.aws_regions_include_only" => "AWSRegionsIncludeOnly",
10351035
"v2.aws_resources_config" => "AWSResourcesConfig",
1036+
"v2.aws_scan_options_attributes" => "AwsScanOptionsAttributes",
1037+
"v2.aws_scan_options_data" => "AwsScanOptionsData",
1038+
"v2.aws_scan_options_response" => "AwsScanOptionsResponse",
1039+
"v2.aws_scan_options_type" => "AwsScanOptionsType",
10361040
"v2.aws_traces_config" => "AWSTracesConfig",
10371041
"v2.azure_uc_config" => "AzureUCConfig",
10381042
"v2.azure_uc_config_pair" => "AzureUCConfigPair",
@@ -2782,6 +2786,7 @@ def overrides
27822786
"v1.usage_metering_api" => "UsageMeteringAPI",
27832787
"v1.users_api" => "UsersAPI",
27842788
"v1.webhooks_integration_api" => "WebhooksIntegrationAPI",
2789+
"v2.agentless_scanning_api" => "AgentlessScanningAPI",
27852790
"v2.api_management_api" => "APIManagementAPI",
27862791
"v2.apm_retention_filters_api" => "APMRetentionFiltersAPI",
27872792
"v2.app_deployment_api" => "AppDeploymentAPI",
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'cgi'
17+
18+
module DatadogAPIClient::V2
19+
class AgentlessScanningAPI
20+
attr_accessor :api_client
21+
22+
def initialize(api_client = DatadogAPIClient::APIClient.default)
23+
@api_client = api_client
24+
end
25+
26+
# Get AWS Scan Options.
27+
#
28+
# @see #list_aws_scan_options_with_http_info
29+
def list_aws_scan_options(opts = {})
30+
data, _status_code, _headers = list_aws_scan_options_with_http_info(opts)
31+
data
32+
end
33+
34+
# Get AWS Scan Options.
35+
#
36+
# Fetches the scan options configured for AWS accounts.
37+
#
38+
# @param opts [Hash] the optional parameters
39+
# @return [Array<(AwsScanOptionsResponse, Integer, Hash)>] AwsScanOptionsResponse data, response status code and response headers
40+
def list_aws_scan_options_with_http_info(opts = {})
41+
42+
if @api_client.config.debugging
43+
@api_client.config.logger.debug 'Calling API: AgentlessScanningAPI.list_aws_scan_options ...'
44+
end
45+
# resource path
46+
local_var_path = '/api/v2/agentless_scanning/accounts/aws'
47+
48+
# query parameters
49+
query_params = opts[:query_params] || {}
50+
51+
# header parameters
52+
header_params = opts[:header_params] || {}
53+
# HTTP header 'Accept' (if needed)
54+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55+
56+
# form parameters
57+
form_params = opts[:form_params] || {}
58+
59+
# http body (model)
60+
post_body = opts[:debug_body]
61+
62+
# return_type
63+
return_type = opts[:debug_return_type] || 'AwsScanOptionsResponse'
64+
65+
# auth_names
66+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
67+
68+
new_options = opts.merge(
69+
:operation => :list_aws_scan_options,
70+
:header_params => header_params,
71+
:query_params => query_params,
72+
:form_params => form_params,
73+
:body => post_body,
74+
:auth_names => auth_names,
75+
:return_type => return_type,
76+
:api_version => "V2"
77+
)
78+
79+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
80+
if @api_client.config.debugging
81+
@api_client.config.logger.debug "API called: AgentlessScanningAPI#list_aws_scan_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82+
end
83+
return data, status_code, headers
84+
end
85+
end
86+
end

0 commit comments

Comments
 (0)