Skip to content

Commit 1f8fa5b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 48a18d90 of spec repo
1 parent ac9e634 commit 1f8fa5b

File tree

10 files changed

+594
-53
lines changed

10 files changed

+594
-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-13 20:56:07.964724",
8+
"spec_repo_commit": "48a18d90"
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-13 20:56:07.980362",
13+
"spec_repo_commit": "48a18d90"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 92 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+
CustomFrameworksOrgID:
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
@@ -8375,6 +8382,51 @@ components:
83758382
$ref: '#/components/schemas/CustomDestinationResponseDefinition'
83768383
type: array
83778384
type: object
8385+
CustomFrameworkMetadata:
8386+
description: Response object for an organization's custom frameworks.
8387+
properties:
8388+
created_at:
8389+
description: Framework Creation Date
8390+
format: int64
8391+
type: integer
8392+
created_by:
8393+
description: Framework Creator
8394+
type: string
8395+
description:
8396+
description: Framework Description
8397+
type: string
8398+
handle:
8399+
description: Framework Handle
8400+
example: ''
8401+
type: string
8402+
id:
8403+
description: Custom Framework ID
8404+
example: ''
8405+
type: string
8406+
name:
8407+
description: Framework Name
8408+
example: ''
8409+
type: string
8410+
org_id:
8411+
description: Org ID
8412+
example: 0
8413+
format: int64
8414+
type: integer
8415+
updated_at:
8416+
description: Framework Update Date
8417+
format: int64
8418+
type: integer
8419+
version:
8420+
description: Framework Version
8421+
example: ''
8422+
type: string
8423+
required:
8424+
- id
8425+
- org_id
8426+
- handle
8427+
- version
8428+
- name
8429+
type: object
83788430
DORADeploymentRequest:
83798431
description: Request to create a DORA deployment event.
83808432
properties:
@@ -23390,6 +23442,15 @@ components:
2339023442
x-enum-varnames:
2339123443
- REQUIRE
2339223444
- SUPPRESS
23445+
SecurityMonitoringListCustomFrameworksResponse:
23446+
description: List of historical jobs.
23447+
properties:
23448+
data:
23449+
description: Array containing the list of custom frameworks.
23450+
items:
23451+
$ref: '#/components/schemas/CustomFrameworkMetadata'
23452+
type: array
23453+
type: object
2339323454
SecurityMonitoringListRulesResponse:
2339423455
description: List of rules.
2339523456
properties:
@@ -40135,6 +40196,37 @@ paths:
4013540196
operator: OR
4013640197
permissions:
4013740198
- org_management
40199+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks:
40200+
get:
40201+
description: List custom frameworks.
40202+
operationId: ListCustomFrameworks
40203+
parameters:
40204+
- $ref: '#/components/parameters/CustomFrameworksOrgID'
40205+
responses:
40206+
'200':
40207+
content:
40208+
application/json:
40209+
schema:
40210+
$ref: '#/components/schemas/SecurityMonitoringListCustomFrameworksResponse'
40211+
description: OK
40212+
'400':
40213+
$ref: '#/components/responses/BadRequestResponse'
40214+
'429':
40215+
$ref: '#/components/responses/TooManyRequestsResponse'
40216+
'500':
40217+
$ref: '#/components/responses/BadRequestResponse'
40218+
security:
40219+
- apiKeyAuth: []
40220+
appKeyAuth: []
40221+
- AuthZ:
40222+
- security_monitoring_rules_read
40223+
summary: List custom frameworks
40224+
tags:
40225+
- Security Monitoring
40226+
x-permission:
40227+
operator: OR
40228+
permissions:
40229+
- security_monitoring_rules_read
4013840230
/api/v2/permissions:
4013940231
get:
4014040232
description: Returns a list of all permissions, including name, description,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List custom frameworks returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5+
p api_instance.list_custom_frameworks("org_id")

features/scenarios_model_mapping.rb

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,55 +1726,8 @@
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.ListCustomFrameworks" => {
1730+
"org_id" => "String",
17781731
},
17791732
"v2.ListFindings" => {
17801733
"page_limit" => "Integer",
@@ -1964,6 +1917,56 @@
19641917
"v2.CancelHistoricalJob" => {
19651918
"job_id" => "String",
19661919
},
1920+
"v2.ListRoles" => {
1921+
"page_size" => "Integer",
1922+
"page_number" => "Integer",
1923+
"sort" => "RolesSort",
1924+
"filter" => "String",
1925+
"filter_id" => "String",
1926+
},
1927+
"v2.CreateRole" => {
1928+
"body" => "RoleCreateRequest",
1929+
},
1930+
"v2.DeleteRole" => {
1931+
"role_id" => "String",
1932+
},
1933+
"v2.GetRole" => {
1934+
"role_id" => "String",
1935+
},
1936+
"v2.UpdateRole" => {
1937+
"role_id" => "String",
1938+
"body" => "RoleUpdateRequest",
1939+
},
1940+
"v2.CloneRole" => {
1941+
"role_id" => "String",
1942+
"body" => "RoleCloneRequest",
1943+
},
1944+
"v2.RemovePermissionFromRole" => {
1945+
"role_id" => "String",
1946+
"body" => "RelationshipToPermission",
1947+
},
1948+
"v2.ListRolePermissions" => {
1949+
"role_id" => "String",
1950+
},
1951+
"v2.AddPermissionToRole" => {
1952+
"role_id" => "String",
1953+
"body" => "RelationshipToPermission",
1954+
},
1955+
"v2.RemoveUserFromRole" => {
1956+
"role_id" => "String",
1957+
"body" => "RelationshipToUser",
1958+
},
1959+
"v2.ListRoleUsers" => {
1960+
"role_id" => "String",
1961+
"page_size" => "Integer",
1962+
"page_number" => "Integer",
1963+
"sort" => "String",
1964+
"filter" => "String",
1965+
},
1966+
"v2.AddUserToRole" => {
1967+
"role_id" => "String",
1968+
"body" => "RelationshipToUser",
1969+
},
19671970
"v2.ListPowerpacks" => {
19681971
"page_limit" => "Integer",
19691972
"page_offset" => "Integer",

features/v2/security_monitoring.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,20 @@ Feature: Security Monitoring
572572
When the request is sent
573573
Then the response status is 200 OK
574574

575+
@generated @skip @team:DataDog/k9-cloud-security-platform
576+
Scenario: List custom frameworks returns "Bad Request" response
577+
Given new "ListCustomFrameworks" request
578+
And request contains "org_id" parameter from "REPLACE.ME"
579+
When the request is sent
580+
Then the response status is 400 Bad Request
581+
582+
@generated @skip @team:DataDog/k9-cloud-security-platform
583+
Scenario: List custom frameworks returns "OK" response
584+
Given new "ListCustomFrameworks" request
585+
And request contains "org_id" parameter from "REPLACE.ME"
586+
When the request is sent
587+
Then the response status is 200 OK
588+
575589
@generated @skip @team:DataDog/cloud-security-posture-management
576590
Scenario: List findings returns "Bad Request: The server cannot process the request due to invalid syntax in the request." response
577591
Given operation "ListFindings" enabled

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+
"ListCustomFrameworks": {
1655+
"tag": "Security Monitoring",
1656+
"undo": {
1657+
"type": "safe"
1658+
}
1659+
},
16541660
"ListPermissions": {
16551661
"tag": "Roles",
16561662
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,7 @@ def overrides
13731373
"v2.custom_destination_update_request" => "CustomDestinationUpdateRequest",
13741374
"v2.custom_destination_update_request_attributes" => "CustomDestinationUpdateRequestAttributes",
13751375
"v2.custom_destination_update_request_definition" => "CustomDestinationUpdateRequestDefinition",
1376+
"v2.custom_framework_metadata" => "CustomFrameworkMetadata",
13761377
"v2.cvss" => "CVSS",
13771378
"v2.dashboard_list_add_items_request" => "DashboardListAddItemsRequest",
13781379
"v2.dashboard_list_add_items_response" => "DashboardListAddItemsResponse",
@@ -2370,6 +2371,7 @@ def overrides
23702371
"v2.security_filter_update_request" => "SecurityFilterUpdateRequest",
23712372
"v2.security_monitoring_filter" => "SecurityMonitoringFilter",
23722373
"v2.security_monitoring_filter_action" => "SecurityMonitoringFilterAction",
2374+
"v2.security_monitoring_list_custom_frameworks_response" => "SecurityMonitoringListCustomFrameworksResponse",
23732375
"v2.security_monitoring_list_rules_response" => "SecurityMonitoringListRulesResponse",
23742376
"v2.security_monitoring_reference_table" => "SecurityMonitoringReferenceTable",
23752377
"v2.security_monitoring_rule_case" => "SecurityMonitoringRuleCase",

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,71 @@ def get_security_monitoring_suppression_with_http_info(suppression_id, opts = {}
13971397
return data, status_code, headers
13981398
end
13991399

1400+
# List custom frameworks.
1401+
#
1402+
# @see #list_custom_frameworks_with_http_info
1403+
def list_custom_frameworks(org_id, opts = {})
1404+
data, _status_code, _headers = list_custom_frameworks_with_http_info(org_id, opts)
1405+
data
1406+
end
1407+
1408+
# List custom frameworks.
1409+
#
1410+
# List custom frameworks.
1411+
#
1412+
# @param org_id [String] The ID of the organization.
1413+
# @param opts [Hash] the optional parameters
1414+
# @return [Array<(SecurityMonitoringListCustomFrameworksResponse, Integer, Hash)>] SecurityMonitoringListCustomFrameworksResponse data, response status code and response headers
1415+
def list_custom_frameworks_with_http_info(org_id, opts = {})
1416+
1417+
if @api_client.config.debugging
1418+
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_custom_frameworks ...'
1419+
end
1420+
# verify the required parameter 'org_id' is set
1421+
if @api_client.config.client_side_validation && org_id.nil?
1422+
fail ArgumentError, "Missing the required parameter 'org_id' when calling SecurityMonitoringAPI.list_custom_frameworks"
1423+
end
1424+
# resource path
1425+
local_var_path = '/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks'.sub('{org_id}', CGI.escape(org_id.to_s).gsub('%2F', '/'))
1426+
1427+
# query parameters
1428+
query_params = opts[:query_params] || {}
1429+
1430+
# header parameters
1431+
header_params = opts[:header_params] || {}
1432+
# HTTP header 'Accept' (if needed)
1433+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1434+
1435+
# form parameters
1436+
form_params = opts[:form_params] || {}
1437+
1438+
# http body (model)
1439+
post_body = opts[:debug_body]
1440+
1441+
# return_type
1442+
return_type = opts[:debug_return_type] || 'SecurityMonitoringListCustomFrameworksResponse'
1443+
1444+
# auth_names
1445+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1446+
1447+
new_options = opts.merge(
1448+
:operation => :list_custom_frameworks,
1449+
:header_params => header_params,
1450+
:query_params => query_params,
1451+
:form_params => form_params,
1452+
:body => post_body,
1453+
:auth_names => auth_names,
1454+
:return_type => return_type,
1455+
:api_version => "V2"
1456+
)
1457+
1458+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1459+
if @api_client.config.debugging
1460+
@api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_custom_frameworks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1461+
end
1462+
return data, status_code, headers
1463+
end
1464+
14001465
# List findings.
14011466
#
14021467
# @see #list_findings_with_http_info

0 commit comments

Comments
 (0)