Skip to content

Commit d4b1e37

Browse files
Merge master into datadog-api-spec/test/oliver/create-types-for-app-builder-queries-explicitly
2 parents c2c9466 + 3530714 commit d4b1e37

File tree

43 files changed

+2103
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2103
-25
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": "2025-02-28 17:49:25.584527",
8-
"spec_repo_commit": "59e6a448"
7+
"regenerated": "2025-03-03 16:04:32.690016",
8+
"spec_repo_commit": "c17ef1e9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-28 17:49:25.599678",
13-
"spec_repo_commit": "59e6a448"
12+
"regenerated": "2025-03-03 16:04:32.705460",
13+
"spec_repo_commit": "c17ef1e9"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 165 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ components:
162162
required: true
163163
schema:
164164
type: string
165+
AwsAccountId:
166+
description: The ID of an AWS account.
167+
example: '123456789012'
168+
in: path
169+
name: account_id
170+
required: true
171+
schema:
172+
type: string
165173
CaseIDPathParameter:
166174
description: Case's UUID or key
167175
example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504
@@ -1742,6 +1750,10 @@ components:
17421750
type: string
17431751
type: array
17441752
type: object
1753+
AccountId:
1754+
description: The ID of the AWS account.
1755+
example: '184366314700'
1756+
type: string
17451757
ActionConnectionAttributes:
17461758
description: The definition of `ActionConnectionAttributes` object.
17471759
properties:
@@ -2879,6 +2891,10 @@ components:
28792891
type: string
28802892
x-enum-varnames:
28812893
- AUTHN_MAPPINGS
2894+
AwsAccountId:
2895+
description: The ID of an AWS account.
2896+
example: '123456789012'
2897+
type: string
28822898
AwsCURConfig:
28832899
description: AWS CUR config.
28842900
properties:
@@ -3104,6 +3120,28 @@ components:
31043120
example: true
31053121
type: boolean
31063122
type: object
3123+
AwsScanOptionsCreateData:
3124+
description: Object for the scan options of a single AWS account.
3125+
properties:
3126+
attributes:
3127+
$ref: '#/components/schemas/AwsScanOptionsAttributes'
3128+
id:
3129+
$ref: '#/components/schemas/AwsAccountId'
3130+
type:
3131+
$ref: '#/components/schemas/AwsScanOptionsType'
3132+
required:
3133+
- id
3134+
- attributes
3135+
- type
3136+
type: object
3137+
AwsScanOptionsCreateRequest:
3138+
description: Request object that includes the scan options to create.
3139+
properties:
3140+
data:
3141+
$ref: '#/components/schemas/AwsScanOptionsCreateData'
3142+
required:
3143+
- data
3144+
type: object
31073145
AwsScanOptionsData:
31083146
description: Single AWS Scan Options entry.
31093147
properties:
@@ -3116,7 +3154,7 @@ components:
31163154
type:
31173155
$ref: '#/components/schemas/AwsScanOptionsType'
31183156
type: object
3119-
AwsScanOptionsResponse:
3157+
AwsScanOptionsListResponse:
31203158
description: Response object that includes a list of AWS scan options.
31213159
properties:
31223160
data:
@@ -3125,6 +3163,12 @@ components:
31253163
$ref: '#/components/schemas/AwsScanOptionsData'
31263164
type: array
31273165
type: object
3166+
AwsScanOptionsResponse:
3167+
description: Response object that includes the scan options of an AWS account.
3168+
properties:
3169+
data:
3170+
$ref: '#/components/schemas/AwsScanOptionsData'
3171+
type: object
31283172
AwsScanOptionsType:
31293173
default: aws_scan_options
31303174
description: The type of the resource. The value should always be `aws_scan_options`.
@@ -3134,6 +3178,48 @@ components:
31343178
type: string
31353179
x-enum-varnames:
31363180
- AWS_SCAN_OPTIONS
3181+
AwsScanOptionsUpdateAttributes:
3182+
description: Attributes for the AWS scan options to update.
3183+
properties:
3184+
lambda:
3185+
description: Indicates if scanning of Lambda functions is enabled.
3186+
example: true
3187+
type: boolean
3188+
sensitive_data:
3189+
description: Indicates if scanning for sensitive data is enabled.
3190+
example: false
3191+
type: boolean
3192+
vuln_containers_os:
3193+
description: Indicates if scanning for vulnerabilities in containers is
3194+
enabled.
3195+
example: true
3196+
type: boolean
3197+
vuln_host_os:
3198+
description: Indicates if scanning for vulnerabilities in hosts is enabled.
3199+
example: true
3200+
type: boolean
3201+
type: object
3202+
AwsScanOptionsUpdateData:
3203+
description: Object for the scan options of a single AWS account.
3204+
properties:
3205+
attributes:
3206+
$ref: '#/components/schemas/AwsScanOptionsUpdateAttributes'
3207+
id:
3208+
$ref: '#/components/schemas/AccountId'
3209+
type:
3210+
$ref: '#/components/schemas/AwsScanOptionsType'
3211+
required:
3212+
- attributes
3213+
- type
3214+
type: object
3215+
AwsScanOptionsUpdateRequest:
3216+
description: Request object that includes the scan options to update.
3217+
properties:
3218+
data:
3219+
$ref: '#/components/schemas/AwsScanOptionsUpdateData'
3220+
required:
3221+
- data
3222+
type: object
31373223
AzureUCConfig:
31383224
description: Azure config.
31393225
properties:
@@ -32639,7 +32725,7 @@ paths:
3263932725
content:
3264032726
application/json:
3264132727
schema:
32642-
$ref: '#/components/schemas/AwsScanOptionsResponse'
32728+
$ref: '#/components/schemas/AwsScanOptionsListResponse'
3264332729
description: OK
3264432730
'403':
3264532731
$ref: '#/components/responses/NotAuthorizedResponse'
@@ -32648,6 +32734,82 @@ paths:
3264832734
summary: Get AWS Scan Options
3264932735
tags:
3265032736
- Agentless Scanning
32737+
post:
32738+
description: Activate Agentless scan options for an AWS account.
32739+
operationId: CreateAwsScanOptions
32740+
requestBody:
32741+
content:
32742+
application/json:
32743+
schema:
32744+
$ref: '#/components/schemas/AwsScanOptionsCreateRequest'
32745+
description: The definition of the new scan options.
32746+
required: true
32747+
responses:
32748+
'201':
32749+
content:
32750+
application/json:
32751+
schema:
32752+
$ref: '#/components/schemas/AwsScanOptionsResponse'
32753+
description: Agentless scan options enabled successfully.
32754+
'400':
32755+
$ref: '#/components/responses/BadRequestResponse'
32756+
'403':
32757+
$ref: '#/components/responses/NotAuthorizedResponse'
32758+
'409':
32759+
$ref: '#/components/responses/ConflictResponse'
32760+
'429':
32761+
$ref: '#/components/responses/TooManyRequestsResponse'
32762+
summary: Post AWS Scan Options
32763+
tags:
32764+
- Agentless Scanning
32765+
x-codegen-request-body-name: body
32766+
/api/v2/agentless_scanning/accounts/aws/{account_id}:
32767+
delete:
32768+
description: Delete Agentless scan options for an AWS account.
32769+
operationId: DeleteAwsScanOptions
32770+
parameters:
32771+
- $ref: '#/components/parameters/AwsAccountId'
32772+
responses:
32773+
'204':
32774+
description: No Content
32775+
'400':
32776+
$ref: '#/components/responses/BadRequestResponse'
32777+
'403':
32778+
$ref: '#/components/responses/NotAuthorizedResponse'
32779+
'404':
32780+
$ref: '#/components/responses/NotFoundResponse'
32781+
'429':
32782+
$ref: '#/components/responses/TooManyRequestsResponse'
32783+
summary: Delete AWS Scan Options
32784+
tags:
32785+
- Agentless Scanning
32786+
patch:
32787+
description: Update the Agentless scan options for an activated account.
32788+
operationId: UpdateAwsScanOptions
32789+
parameters:
32790+
- $ref: '#/components/parameters/AwsAccountId'
32791+
requestBody:
32792+
content:
32793+
application/json:
32794+
schema:
32795+
$ref: '#/components/schemas/AwsScanOptionsUpdateRequest'
32796+
description: New definition of the scan options.
32797+
required: true
32798+
responses:
32799+
'204':
32800+
description: No Content
32801+
'400':
32802+
$ref: '#/components/responses/BadRequestResponse'
32803+
'403':
32804+
$ref: '#/components/responses/NotAuthorizedResponse'
32805+
'404':
32806+
$ref: '#/components/responses/NotFoundResponse'
32807+
'429':
32808+
$ref: '#/components/responses/TooManyRequestsResponse'
32809+
summary: Patch AWS Scan Options
32810+
tags:
32811+
- Agentless Scanning
32812+
x-codegen-request-body-name: body
3265132813
/api/v2/api_keys:
3265232814
get:
3265332815
description: List all API keys available for your account.
@@ -51408,7 +51570,7 @@ tags:
5140851570
- description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin
5140951571
your hosts, running containers, and serverless functions\u2014all without\nrequiring
5141051572
teams to install Agents on every host or where Agents cannot be installed.\nGo
51411-
to https://www.datadoghq.com/blog/agentless-scanning/ to learn more"
51573+
to https://www.datadoghq.com/blog/agentless-scanning/ to learn more."
5141251574
name: Agentless Scanning
5141351575
- description: Datadog App Builder provides a low-code solution to rapidly develop
5141451576
and integrate secure, customized applications into your monitoring stack that
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Post AWS Scan Options returns "Agentless scan options enabled successfully."
2+
// response
3+
use datadog_api_client::datadog;
4+
use datadog_api_client::datadogV2::api_agentless_scanning::AgentlessScanningAPI;
5+
use datadog_api_client::datadogV2::model::AwsScanOptionsAttributes;
6+
use datadog_api_client::datadogV2::model::AwsScanOptionsCreateData;
7+
use datadog_api_client::datadogV2::model::AwsScanOptionsCreateRequest;
8+
use datadog_api_client::datadogV2::model::AwsScanOptionsType;
9+
10+
#[tokio::main]
11+
async fn main() {
12+
let body = AwsScanOptionsCreateRequest::new(AwsScanOptionsCreateData::new(
13+
AwsScanOptionsAttributes::new()
14+
.lambda(true)
15+
.sensitive_data(false)
16+
.vuln_containers_os(true)
17+
.vuln_host_os(true),
18+
"000000000003".to_string(),
19+
AwsScanOptionsType::AWS_SCAN_OPTIONS,
20+
));
21+
let configuration = datadog::Configuration::new();
22+
let api = AgentlessScanningAPI::with_config(configuration);
23+
let resp = api.create_aws_scan_options(body).await;
24+
if let Ok(value) = resp {
25+
println!("{:#?}", value);
26+
} else {
27+
println!("{:#?}", resp.unwrap_err());
28+
}
29+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Delete AWS Scan Options returns "No Content" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_agentless_scanning::AgentlessScanningAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let configuration = datadog::Configuration::new();
8+
let api = AgentlessScanningAPI::with_config(configuration);
9+
let resp = api.delete_aws_scan_options("account_id".to_string()).await;
10+
if let Ok(value) = resp {
11+
println!("{:#?}", value);
12+
} else {
13+
println!("{:#?}", resp.unwrap_err());
14+
}
15+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Patch AWS Scan Options returns "No Content" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_agentless_scanning::AgentlessScanningAPI;
4+
use datadog_api_client::datadogV2::model::AwsScanOptionsType;
5+
use datadog_api_client::datadogV2::model::AwsScanOptionsUpdateAttributes;
6+
use datadog_api_client::datadogV2::model::AwsScanOptionsUpdateData;
7+
use datadog_api_client::datadogV2::model::AwsScanOptionsUpdateRequest;
8+
9+
#[tokio::main]
10+
async fn main() {
11+
let body = AwsScanOptionsUpdateRequest::new(
12+
AwsScanOptionsUpdateData::new(
13+
AwsScanOptionsUpdateAttributes::new()
14+
.lambda(false)
15+
.vuln_containers_os(true)
16+
.vuln_host_os(true),
17+
AwsScanOptionsType::AWS_SCAN_OPTIONS,
18+
)
19+
.id("000000000002".to_string()),
20+
);
21+
let configuration = datadog::Configuration::new();
22+
let api = AgentlessScanningAPI::with_config(configuration);
23+
let resp = api
24+
.update_aws_scan_options("000000000002".to_string(), body)
25+
.await;
26+
if let Ok(value) = resp {
27+
println!("{:#?}", value);
28+
} else {
29+
println!("{:#?}", resp.unwrap_err());
30+
}
31+
}

0 commit comments

Comments
 (0)