Skip to content

Commit c708219

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ccbf738c of spec repo
1 parent 58c0283 commit c708219

10 files changed

+755
-5
lines changed

.apigentools-info

+4-4
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:01.901832",
8-
"spec_repo_commit": "3517c947"
7+
"regenerated": "2025-01-13 21:37:19.703137",
8+
"spec_repo_commit": "ccbf738c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-13 18:28:01.916682",
13-
"spec_repo_commit": "3517c947"
12+
"regenerated": "2025-01-13 21:37:19.718202",
13+
"spec_repo_commit": "ccbf738c"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+108
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,27 @@ components:
213213
required: true
214214
schema:
215215
type: string
216+
CustomFrameworkHandle:
217+
description: The framework handle.
218+
in: path
219+
name: handle
220+
required: true
221+
schema:
222+
type: string
223+
CustomFrameworkOrgID:
224+
description: The ID of the organization.
225+
in: path
226+
name: org_id
227+
required: true
228+
schema:
229+
type: string
230+
CustomFrameworkVersion:
231+
description: The framework version.
232+
in: path
233+
name: version
234+
required: true
235+
schema:
236+
type: string
216237
EntityID:
217238
description: UUID or Entity Ref.
218239
in: path
@@ -8375,6 +8396,54 @@ components:
83758396
$ref: '#/components/schemas/CustomDestinationResponseDefinition'
83768397
type: array
83778398
type: object
8399+
CustomFrameworkMetadata:
8400+
description: Response object for an organization's custom frameworks.
8401+
properties:
8402+
created_at:
8403+
description: Framework Creation Date
8404+
format: int64
8405+
type: integer
8406+
created_by:
8407+
description: Framework Creator
8408+
type: string
8409+
description:
8410+
description: Framework Description
8411+
type: string
8412+
handle:
8413+
description: Framework Handle
8414+
example: ''
8415+
type: string
8416+
icon_url:
8417+
description: Framework Icon URL
8418+
type: string
8419+
id:
8420+
description: Custom Framework ID
8421+
example: ''
8422+
type: string
8423+
name:
8424+
description: Framework Name
8425+
example: ''
8426+
type: string
8427+
org_id:
8428+
description: Org ID
8429+
example: 0
8430+
format: int64
8431+
type: integer
8432+
updated_at:
8433+
description: Framework Update Date
8434+
format: int64
8435+
type: integer
8436+
version:
8437+
description: Framework Version
8438+
example: ''
8439+
type: string
8440+
required:
8441+
- id
8442+
- org_id
8443+
- handle
8444+
- version
8445+
- name
8446+
type: object
83788447
DORADeploymentRequest:
83798448
description: Request to create a DORA deployment event.
83808449
properties:
@@ -9015,6 +9084,12 @@ components:
90159084
type: string
90169085
x-enum-varnames:
90179086
- APPDEFINITIONS
9087+
DeleteCustomFrameworkResponse:
9088+
description: Delete a custom framework.
9089+
properties:
9090+
data:
9091+
$ref: '#/components/schemas/CustomFrameworkMetadata'
9092+
type: object
90189093
DependencyLocation:
90199094
description: Static library vulnerability location.
90209095
properties:
@@ -40135,6 +40210,39 @@ paths:
4013540210
operator: OR
4013640211
permissions:
4013740212
- org_management
40213+
/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}:
40214+
get:
40215+
description: Delete a custom framework.
40216+
operationId: DeleteCustomFramework
40217+
parameters:
40218+
- $ref: '#/components/parameters/CustomFrameworkOrgID'
40219+
- $ref: '#/components/parameters/CustomFrameworkHandle'
40220+
- $ref: '#/components/parameters/CustomFrameworkVersion'
40221+
responses:
40222+
'200':
40223+
content:
40224+
application/json:
40225+
schema:
40226+
$ref: '#/components/schemas/DeleteCustomFrameworkResponse'
40227+
description: OK
40228+
'400':
40229+
$ref: '#/components/responses/BadRequestResponse'
40230+
'429':
40231+
$ref: '#/components/responses/TooManyRequestsResponse'
40232+
'500':
40233+
$ref: '#/components/responses/BadRequestResponse'
40234+
security:
40235+
- apiKeyAuth: []
40236+
appKeyAuth: []
40237+
- AuthZ:
40238+
- security_monitoring_rules_read
40239+
summary: Delete a custom framework
40240+
tags:
40241+
- Security Monitoring
40242+
x-permission:
40243+
operator: OR
40244+
permissions:
40245+
- security_monitoring_rules_read
4013840246
/api/v2/permissions:
4013940247
get:
4014040248
description: Returns a list of all permissions, including name, description,

api/datadogV2/api_security_monitoring.go

+73
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,79 @@ func (a *SecurityMonitoringApi) CreateSecurityMonitoringSuppression(ctx _context
529529
return localVarReturnValue, localVarHTTPResponse, nil
530530
}
531531

532+
// DeleteCustomFramework Delete a custom framework.
533+
// Delete a custom framework.
534+
func (a *SecurityMonitoringApi) DeleteCustomFramework(ctx _context.Context, orgId string, handle string, version string) (DeleteCustomFrameworkResponse, *_nethttp.Response, error) {
535+
var (
536+
localVarHTTPMethod = _nethttp.MethodGet
537+
localVarPostBody interface{}
538+
localVarReturnValue DeleteCustomFrameworkResponse
539+
)
540+
541+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.DeleteCustomFramework")
542+
if err != nil {
543+
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
544+
}
545+
546+
localVarPath := localBasePath + "/api/v2/orgs/{org_id}/cloud_security_management/custom_frameworks/{handle}/{version}"
547+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{org_id}", _neturl.PathEscape(datadog.ParameterToString(orgId, "")))
548+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{handle}", _neturl.PathEscape(datadog.ParameterToString(handle, "")))
549+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{version}", _neturl.PathEscape(datadog.ParameterToString(version, "")))
550+
551+
localVarHeaderParams := make(map[string]string)
552+
localVarQueryParams := _neturl.Values{}
553+
localVarFormParams := _neturl.Values{}
554+
localVarHeaderParams["Accept"] = "application/json"
555+
556+
datadog.SetAuthKeys(
557+
ctx,
558+
&localVarHeaderParams,
559+
[2]string{"apiKeyAuth", "DD-API-KEY"},
560+
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
561+
)
562+
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
563+
if err != nil {
564+
return localVarReturnValue, nil, err
565+
}
566+
567+
localVarHTTPResponse, err := a.Client.CallAPI(req)
568+
if err != nil || localVarHTTPResponse == nil {
569+
return localVarReturnValue, localVarHTTPResponse, err
570+
}
571+
572+
localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
573+
if err != nil {
574+
return localVarReturnValue, localVarHTTPResponse, err
575+
}
576+
577+
if localVarHTTPResponse.StatusCode >= 300 {
578+
newErr := datadog.GenericOpenAPIError{
579+
ErrorBody: localVarBody,
580+
ErrorMessage: localVarHTTPResponse.Status,
581+
}
582+
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 429 || localVarHTTPResponse.StatusCode == 500 {
583+
var v APIErrorResponse
584+
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
585+
if err != nil {
586+
return localVarReturnValue, localVarHTTPResponse, newErr
587+
}
588+
newErr.ErrorModel = v
589+
}
590+
return localVarReturnValue, localVarHTTPResponse, newErr
591+
}
592+
593+
err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
594+
if err != nil {
595+
newErr := datadog.GenericOpenAPIError{
596+
ErrorBody: localVarBody,
597+
ErrorMessage: err.Error(),
598+
}
599+
return localVarReturnValue, localVarHTTPResponse, newErr
600+
}
601+
602+
return localVarReturnValue, localVarHTTPResponse, nil
603+
}
604+
532605
// DeleteHistoricalJob Delete an existing job.
533606
// Delete an existing job.
534607
func (a *SecurityMonitoringApi) DeleteHistoricalJob(ctx _context.Context, jobId string) (*_nethttp.Response, error) {

api/datadogV2/doc.go

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@
300300
// - [SecurityMonitoringApi.CreateSecurityFilter]
301301
// - [SecurityMonitoringApi.CreateSecurityMonitoringRule]
302302
// - [SecurityMonitoringApi.CreateSecurityMonitoringSuppression]
303+
// - [SecurityMonitoringApi.DeleteCustomFramework]
303304
// - [SecurityMonitoringApi.DeleteHistoricalJob]
304305
// - [SecurityMonitoringApi.DeleteSecurityFilter]
305306
// - [SecurityMonitoringApi.DeleteSecurityMonitoringRule]

0 commit comments

Comments
 (0)