Skip to content

Commit 4d288e4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 898cd727 of spec repo
1 parent ac9e634 commit 4d288e4

File tree

11 files changed

+820
-53
lines changed

11 files changed

+820
-53
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-01-13 18:28:06.332663",
8-
"spec_repo_commit": "3517c947"
7+
"regenerated": "2025-01-14 17:10:33.313404",
8+
"spec_repo_commit": "898cd727"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-13 18:28:06.347841",
13-
"spec_repo_commit": "3517c947"
12+
"regenerated": "2025-01-14 17:10:33.328377",
13+
"spec_repo_commit": "898cd727"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ components:
213213
required: true
214214
schema:
215215
type: string
216+
CustomFrameworkOrgID:
217+
description: The ID of the organization.
218+
in: path
219+
name: org_id
220+
required: true
221+
schema:
222+
type: string
216223
EntityID:
217224
description: UUID or Entity Ref.
218225
in: path
@@ -7145,6 +7152,44 @@ components:
71457152
type: string
71467153
x-enum-varnames:
71477154
- APPDEFINITIONS
7155+
CreateCustomFrameworkRequest:
7156+
description: Create a custom framework.
7157+
properties:
7158+
description:
7159+
description: Framework Description
7160+
type: string
7161+
handle:
7162+
description: Framework Handle
7163+
example: ''
7164+
type: string
7165+
icon_url:
7166+
description: Framework Icon URL
7167+
type: string
7168+
id:
7169+
description: Custom Framework ID
7170+
type: string
7171+
name:
7172+
description: Framework Name
7173+
example: ''
7174+
type: string
7175+
requirements:
7176+
description: Framework Requirements
7177+
items:
7178+
$ref: '#/components/schemas/FrameworkRequirement'
7179+
type: array
7180+
user_email:
7181+
description: Framework Creator
7182+
type: string
7183+
version:
7184+
description: Framework Version
7185+
example: ''
7186+
type: string
7187+
required:
7188+
- handle
7189+
- version
7190+
- name
7191+
- requirements
7192+
type: object
71487193
CreateDataDeletionRequestBody:
71497194
description: Object needed to create a data deletion request.
71507195
properties:
@@ -11936,6 +11981,40 @@ components:
1193611981
order:
1193711982
$ref: '#/components/schemas/QuerySortOrder'
1193811983
type: object
11984+
FrameworkControl:
11985+
description: Framework Control.
11986+
properties:
11987+
name:
11988+
description: Control Name.
11989+
example: ''
11990+
type: string
11991+
rule_ids:
11992+
description: Rule IDs.
11993+
example:
11994+
- ''
11995+
items:
11996+
type: string
11997+
type: array
11998+
required:
11999+
- name
12000+
- rule_ids
12001+
type: object
12002+
FrameworkRequirement:
12003+
description: Framework Requirement.
12004+
properties:
12005+
controls:
12006+
description: Requirement Controls.
12007+
items:
12008+
$ref: '#/components/schemas/FrameworkControl'
12009+
type: array
12010+
name:
12011+
description: Requirement Name.
12012+
example: ''
12013+
type: string
12014+
required:
12015+
- name
12016+
- controls
12017+
type: object
1193912018
FullAPIKey:
1194012019
description: Datadog API key.
1194112020
properties:
@@ -30263,6 +30342,12 @@ components:
3026330342
scheme: bearer
3026430343
type: http
3026530344
x-env-name: DD_BEARER_TOKEN
30345+
userAuth:
30346+
description: Your Datadog User ID.
30347+
in: header
30348+
name: X-Datadog-UserId
30349+
type: http
30350+
x-env-name: X_Datadog_UserId
3026630351
info:
3026730352
contact:
3026830353
@@ -40135,6 +40220,43 @@ paths:
4013540220
operator: OR
4013640221
permissions:
4013740222
- org_management
40223+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks:
40224+
post:
40225+
description: Create a custom framework.
40226+
operationId: CreateCustomFramework
40227+
parameters:
40228+
- $ref: '#/components/parameters/CustomFrameworkOrgID'
40229+
requestBody:
40230+
content:
40231+
application/json:
40232+
schema:
40233+
$ref: '#/components/schemas/CreateCustomFrameworkRequest'
40234+
required: true
40235+
responses:
40236+
'200':
40237+
description: OK
40238+
'400':
40239+
$ref: '#/components/responses/BadRequestResponse'
40240+
'429':
40241+
$ref: '#/components/responses/TooManyRequestsResponse'
40242+
'500':
40243+
$ref: '#/components/responses/BadRequestResponse'
40244+
security:
40245+
- apiKeyAuth: []
40246+
appKeyAuth: []
40247+
userAuth: []
40248+
- AuthZ:
40249+
- security_monitoring_rules_read
40250+
- security_monitoring_rules_write
40251+
summary: Create a custom framework
40252+
tags:
40253+
- Security Monitoring
40254+
x-codegen-request-body-name: body
40255+
x-permission:
40256+
operator: AND
40257+
permissions:
40258+
- security_monitoring_rules_read
40259+
- security_monitoring_rules_write
4013840260
/api/v2/permissions:
4013940261
get:
4014040262
description: Returns a list of all permissions, including name, description,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Create a custom framework returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5+
6+
body = DatadogAPIClient::V2::CreateCustomFrameworkRequest.new({
7+
handle: "",
8+
name: "",
9+
requirements: [
10+
DatadogAPIClient::V2::FrameworkRequirement.new({
11+
controls: [
12+
DatadogAPIClient::V2::FrameworkControl.new({
13+
name: "",
14+
rule_ids: [
15+
"",
16+
],
17+
}),
18+
],
19+
name: "",
20+
}),
21+
],
22+
version: "",
23+
})
24+
p api_instance.create_custom_framework("org_id", body)

features/scenarios_model_mapping.rb

Lines changed: 53 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,55 +1726,9 @@
17261726
"v2.UploadIdPMetadata" => {
17271727
"idp_file" => "File",
17281728
},
1729-
"v2.ListRoles" => {
1730-
"page_size" => "Integer",
1731-
"page_number" => "Integer",
1732-
"sort" => "RolesSort",
1733-
"filter" => "String",
1734-
"filter_id" => "String",
1735-
},
1736-
"v2.CreateRole" => {
1737-
"body" => "RoleCreateRequest",
1738-
},
1739-
"v2.DeleteRole" => {
1740-
"role_id" => "String",
1741-
},
1742-
"v2.GetRole" => {
1743-
"role_id" => "String",
1744-
},
1745-
"v2.UpdateRole" => {
1746-
"role_id" => "String",
1747-
"body" => "RoleUpdateRequest",
1748-
},
1749-
"v2.CloneRole" => {
1750-
"role_id" => "String",
1751-
"body" => "RoleCloneRequest",
1752-
},
1753-
"v2.RemovePermissionFromRole" => {
1754-
"role_id" => "String",
1755-
"body" => "RelationshipToPermission",
1756-
},
1757-
"v2.ListRolePermissions" => {
1758-
"role_id" => "String",
1759-
},
1760-
"v2.AddPermissionToRole" => {
1761-
"role_id" => "String",
1762-
"body" => "RelationshipToPermission",
1763-
},
1764-
"v2.RemoveUserFromRole" => {
1765-
"role_id" => "String",
1766-
"body" => "RelationshipToUser",
1767-
},
1768-
"v2.ListRoleUsers" => {
1769-
"role_id" => "String",
1770-
"page_size" => "Integer",
1771-
"page_number" => "Integer",
1772-
"sort" => "String",
1773-
"filter" => "String",
1774-
},
1775-
"v2.AddUserToRole" => {
1776-
"role_id" => "String",
1777-
"body" => "RelationshipToUser",
1729+
"v2.CreateCustomFramework" => {
1730+
"org_id" => "String",
1731+
"body" => "CreateCustomFrameworkRequest",
17781732
},
17791733
"v2.ListFindings" => {
17801734
"page_limit" => "Integer",
@@ -1964,6 +1918,56 @@
19641918
"v2.CancelHistoricalJob" => {
19651919
"job_id" => "String",
19661920
},
1921+
"v2.ListRoles" => {
1922+
"page_size" => "Integer",
1923+
"page_number" => "Integer",
1924+
"sort" => "RolesSort",
1925+
"filter" => "String",
1926+
"filter_id" => "String",
1927+
},
1928+
"v2.CreateRole" => {
1929+
"body" => "RoleCreateRequest",
1930+
},
1931+
"v2.DeleteRole" => {
1932+
"role_id" => "String",
1933+
},
1934+
"v2.GetRole" => {
1935+
"role_id" => "String",
1936+
},
1937+
"v2.UpdateRole" => {
1938+
"role_id" => "String",
1939+
"body" => "RoleUpdateRequest",
1940+
},
1941+
"v2.CloneRole" => {
1942+
"role_id" => "String",
1943+
"body" => "RoleCloneRequest",
1944+
},
1945+
"v2.RemovePermissionFromRole" => {
1946+
"role_id" => "String",
1947+
"body" => "RelationshipToPermission",
1948+
},
1949+
"v2.ListRolePermissions" => {
1950+
"role_id" => "String",
1951+
},
1952+
"v2.AddPermissionToRole" => {
1953+
"role_id" => "String",
1954+
"body" => "RelationshipToPermission",
1955+
},
1956+
"v2.RemoveUserFromRole" => {
1957+
"role_id" => "String",
1958+
"body" => "RelationshipToUser",
1959+
},
1960+
"v2.ListRoleUsers" => {
1961+
"role_id" => "String",
1962+
"page_size" => "Integer",
1963+
"page_number" => "Integer",
1964+
"sort" => "String",
1965+
"filter" => "String",
1966+
},
1967+
"v2.AddUserToRole" => {
1968+
"role_id" => "String",
1969+
"body" => "RelationshipToUser",
1970+
},
19671971
"v2.ListPowerpacks" => {
19681972
"page_limit" => "Integer",
19691973
"page_offset" => "Integer",

features/v2/security_monitoring.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,22 @@ Feature: Security Monitoring
171171
And the response "message" is equal to "ddd"
172172
And the response "options.complianceRuleOptions.resourceType" is equal to "gcp_compute_disk"
173173

174+
@generated @skip @team:DataDog/k9-cloud-security-platform
175+
Scenario: Create a custom framework returns "Bad Request" response
176+
Given new "CreateCustomFramework" request
177+
And request contains "org_id" parameter from "REPLACE.ME"
178+
And body with value {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rule_ids": [""]}], "name": ""}], "version": ""}
179+
When the request is sent
180+
Then the response status is 400 Bad Request
181+
182+
@generated @skip @team:DataDog/k9-cloud-security-platform
183+
Scenario: Create a custom framework returns "OK" response
184+
Given new "CreateCustomFramework" request
185+
And request contains "org_id" parameter from "REPLACE.ME"
186+
And body with value {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rule_ids": [""]}], "name": ""}], "version": ""}
187+
When the request is sent
188+
Then the response status is 200 OK
189+
174190
@team:DataDog/k9-cloud-security-platform
175191
Scenario: Create a detection rule returns "Bad Request" response
176192
Given new "CreateSecurityMonitoringRule" request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,12 @@
16511651
"type": "idempotent"
16521652
}
16531653
},
1654+
"CreateCustomFramework": {
1655+
"tag": "Security Monitoring",
1656+
"undo": {
1657+
"type": "idempotent"
1658+
}
1659+
},
16541660
"ListPermissions": {
16551661
"tag": "Roles",
16561662
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ def overrides
12921292
"v2.create_app_response" => "CreateAppResponse",
12931293
"v2.create_app_response_data" => "CreateAppResponseData",
12941294
"v2.create_app_response_data_type" => "CreateAppResponseDataType",
1295+
"v2.create_custom_framework_request" => "CreateCustomFrameworkRequest",
12951296
"v2.create_data_deletion_request_body" => "CreateDataDeletionRequestBody",
12961297
"v2.create_data_deletion_request_body_attributes" => "CreateDataDeletionRequestBodyAttributes",
12971298
"v2.create_data_deletion_request_body_data" => "CreateDataDeletionRequestBodyData",
@@ -1599,6 +1600,8 @@ def overrides
15991600
"v2.finding_type" => "FindingType",
16001601
"v2.finding_vulnerability_type" => "FindingVulnerabilityType",
16011602
"v2.formula_limit" => "FormulaLimit",
1603+
"v2.framework_control" => "FrameworkControl",
1604+
"v2.framework_requirement" => "FrameworkRequirement",
16021605
"v2.full_api_key" => "FullAPIKey",
16031606
"v2.full_api_key_attributes" => "FullAPIKeyAttributes",
16041607
"v2.full_application_key" => "FullApplicationKey",

0 commit comments

Comments
 (0)