From bac95e069a49e3313e48bd86b311a366fad813be Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 15 Jan 2025 18:49:23 +0000 Subject: [PATCH] Regenerate client from commit a3b4c237 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 165 +++++++++++ api/datadog/configuration.go | 24 +- api/datadogV2/api_security_monitoring.go | 146 ++++++++++ api/datadogV2/doc.go | 2 + .../model_create_custom_framework_request.go | 267 ++++++++++++++++++ api/datadogV2/model_framework_control.go | 133 +++++++++ api/datadogV2/model_framework_requirement.go | 133 +++++++++ .../model_update_custom_framework_request.go | 267 ++++++++++++++++++ .../CreateCustomFramework.go | 44 +++ .../UpdateCustomFramework.go | 44 +++ tests/scenarios/api_mappings.go | 2 +- .../features/v2/security_monitoring.feature | 36 +++ tests/scenarios/features/v2/undo.json | 12 + 14 files changed, 1267 insertions(+), 16 deletions(-) create mode 100644 api/datadogV2/model_create_custom_framework_request.go create mode 100644 api/datadogV2/model_framework_control.go create mode 100644 api/datadogV2/model_framework_requirement.go create mode 100644 api/datadogV2/model_update_custom_framework_request.go create mode 100644 examples/v2/security-monitoring/CreateCustomFramework.go create mode 100644 examples/v2/security-monitoring/UpdateCustomFramework.go diff --git a/.apigentools-info b/.apigentools-info index fcd97eca18b..ad21001118b 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-15 09:47:04.878488", - "spec_repo_commit": "21b02fc5" + "regenerated": "2025-01-15 18:48:05.798959", + "spec_repo_commit": "a3b4c237" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-15 09:47:04.893742", - "spec_repo_commit": "21b02fc5" + "regenerated": "2025-01-15 18:48:05.814622", + "spec_repo_commit": "a3b4c237" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 77866cbe38e..70d08d2f5ee 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -297,6 +297,20 @@ components: required: false schema: $ref: '#/components/schemas/RelationType' + FrameworkHandle: + description: The framework handle + in: path + name: handle + required: true + schema: + type: string + FrameworkVersion: + description: The framework version + in: path + name: version + required: true + schema: + type: string GCPSTSServiceAccountID: description: Your GCP STS enabled service account's unique ID. in: path @@ -7145,6 +7159,10 @@ components: type: string x-enum-varnames: - APPDEFINITIONS + CreateCustomFrameworkRequest: + $ref: '#/components/schemas/FrameworkData' + description: Create a custom framework. + type: object CreateDataDeletionRequestBody: description: Object needed to create a data deletion request. properties: @@ -11936,6 +11954,72 @@ components: order: $ref: '#/components/schemas/QuerySortOrder' type: object + FrameworkControl: + description: Framework Control. + properties: + name: + description: Control Name. + example: '' + type: string + rule_ids: + description: Rule IDs. + example: + - '' + items: + type: string + type: array + required: + - name + - rule_ids + type: object + FrameworkData: + description: Framework Data. + properties: + description: + description: Framework Description + type: string + handle: + description: Framework Handle + example: '' + type: string + icon_url: + description: Framework Icon URL + type: string + name: + description: Framework Name + example: '' + type: string + requirements: + description: Framework Requirements + items: + $ref: '#/components/schemas/FrameworkRequirement' + type: array + version: + description: Framework Version + example: '' + type: string + required: + - handle + - version + - name + - requirements + type: object + FrameworkRequirement: + description: Framework Requirement. + properties: + controls: + description: Requirement Controls. + items: + $ref: '#/components/schemas/FrameworkControl' + type: array + name: + description: Requirement Name. + example: '' + type: string + required: + - name + - controls + type: object FullAPIKey: description: Datadog API key. properties: @@ -28953,6 +29037,10 @@ components: deployment: $ref: '#/components/schemas/DeploymentRelationship' type: object + UpdateCustomFrameworkRequest: + $ref: '#/components/schemas/FrameworkData' + description: Update a custom framework. + type: object UpdateOpenAPIResponse: description: Response for `UpdateOpenAPI`. properties: @@ -33028,6 +33116,83 @@ paths: operator: OR permissions: - ci_visibility_read + /api/v2/cloud_security_management/custom_frameworks: + post: + description: Create a custom framework. + operationId: CreateCustomFramework + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCustomFrameworkRequest' + required: true + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + $ref: '#/components/responses/BadRequestResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + - security_monitoring_rules_write + summary: Create a custom framework + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - security_monitoring_rules_read + - security_monitoring_rules_write + x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. + + Please check the documentation regularly for updates.' + /api/v2/cloud_security_management/custom_frameworks/{handle}/{version}: + put: + description: Update a custom framework. + operationId: UpdateCustomFramework + parameters: + - $ref: '#/components/parameters/FrameworkHandle' + - $ref: '#/components/parameters/FrameworkVersion' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomFrameworkRequest' + required: true + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + $ref: '#/components/responses/BadRequestResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + - security_monitoring_rules_write + summary: Update a custom framework + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - security_monitoring_rules_read + - security_monitoring_rules_write + x-unstable: '**Note**: This endpoint is in beta and may be subject to changes. + + Please check the documentation regularly for updates.' /api/v2/container_images: get: description: Get all Container Images for your organization. diff --git a/api/datadog/configuration.go b/api/datadog/configuration.go index 8e859608f58..b9bd77c8367 100644 --- a/api/datadog/configuration.go +++ b/api/datadog/configuration.go @@ -336,6 +336,19 @@ func NewConfiguration() *Configuration { "v2.GetApp": false, "v2.ListApps": false, "v2.UpdateApp": false, + "v2.CancelHistoricalJob": false, + "v2.ConvertJobResultToSignal": false, + "v2.CreateCustomFramework": false, + "v2.DeleteHistoricalJob": false, + "v2.GetFinding": false, + "v2.GetHistoricalJob": false, + "v2.ListFindings": false, + "v2.ListHistoricalJobs": false, + "v2.ListVulnerabilities": false, + "v2.ListVulnerableAssets": false, + "v2.MuteFindings": false, + "v2.RunHistoricalJob": false, + "v2.UpdateCustomFramework": false, "v2.GetActiveBillingDimensions": false, "v2.GetBillingDimensionMapping": false, "v2.GetMonthlyCostAttribution": false, @@ -375,17 +388,6 @@ func NewConfiguration() *Configuration { "v2.ListAWSNamespaces": false, "v2.UpdateAWSAccount": false, "v2.ListAWSLogsServices": false, - "v2.CancelHistoricalJob": false, - "v2.ConvertJobResultToSignal": false, - "v2.DeleteHistoricalJob": false, - "v2.GetFinding": false, - "v2.GetHistoricalJob": false, - "v2.ListFindings": false, - "v2.ListHistoricalJobs": false, - "v2.ListVulnerabilities": false, - "v2.ListVulnerableAssets": false, - "v2.MuteFindings": false, - "v2.RunHistoricalJob": false, "v2.CreateScorecardOutcomesBatch": false, "v2.CreateScorecardRule": false, "v2.DeleteScorecardRule": false, diff --git a/api/datadogV2/api_security_monitoring.go b/api/datadogV2/api_security_monitoring.go index 0a550b7cd5d..b4d4995e83d 100644 --- a/api/datadogV2/api_security_monitoring.go +++ b/api/datadogV2/api_security_monitoring.go @@ -307,6 +307,78 @@ func (a *SecurityMonitoringApi) ConvertSecurityMonitoringRuleFromJSONToTerraform return localVarReturnValue, localVarHTTPResponse, nil } +// CreateCustomFramework Create a custom framework. +// Create a custom framework. +func (a *SecurityMonitoringApi) CreateCustomFramework(ctx _context.Context, body CreateCustomFrameworkRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + ) + + operationId := "v2.CreateCustomFramework" + isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId) + if !isOperationEnabled { + return nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + if isOperationEnabled && a.Client.Cfg.Debug { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.CreateCustomFramework") + if err != nil { + return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/cloud_security_management/custom_frameworks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "*/*" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 429 || localVarHTTPResponse.StatusCode == 500 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + // CreateSecurityFilter Create a security filter. // Create a security filter. // @@ -3739,6 +3811,80 @@ func (a *SecurityMonitoringApi) TestSecurityMonitoringRule(ctx _context.Context, return localVarReturnValue, localVarHTTPResponse, nil } +// UpdateCustomFramework Update a custom framework. +// Update a custom framework. +func (a *SecurityMonitoringApi) UpdateCustomFramework(ctx _context.Context, handle string, version string, body UpdateCustomFrameworkRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + ) + + operationId := "v2.UpdateCustomFramework" + isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId) + if !isOperationEnabled { + return nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} + } + if isOperationEnabled && a.Client.Cfg.Debug { + _log.Printf("WARNING: Using unstable operation '%s'", operationId) + } + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.UpdateCustomFramework") + if err != nil { + return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/cloud_security_management/custom_frameworks/{handle}/{version}" + localVarPath = datadog.ReplacePathParameter(localVarPath, "{handle}", _neturl.PathEscape(datadog.ParameterToString(handle, ""))) + localVarPath = datadog.ReplacePathParameter(localVarPath, "{version}", _neturl.PathEscape(datadog.ParameterToString(version, ""))) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "*/*" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 429 || localVarHTTPResponse.StatusCode == 500 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + // UpdateSecurityFilter Update a security filter. // Update a specific security filter. // Returns the security filter object when the request is successful. diff --git a/api/datadogV2/doc.go b/api/datadogV2/doc.go index a920f1407e2..3dd3b561525 100644 --- a/api/datadogV2/doc.go +++ b/api/datadogV2/doc.go @@ -297,6 +297,7 @@ // - [SecurityMonitoringApi.ConvertExistingSecurityMonitoringRule] // - [SecurityMonitoringApi.ConvertJobResultToSignal] // - [SecurityMonitoringApi.ConvertSecurityMonitoringRuleFromJSONToTerraform] +// - [SecurityMonitoringApi.CreateCustomFramework] // - [SecurityMonitoringApi.CreateSecurityFilter] // - [SecurityMonitoringApi.CreateSecurityMonitoringRule] // - [SecurityMonitoringApi.CreateSecurityMonitoringSuppression] @@ -326,6 +327,7 @@ // - [SecurityMonitoringApi.SearchSecurityMonitoringSignals] // - [SecurityMonitoringApi.TestExistingSecurityMonitoringRule] // - [SecurityMonitoringApi.TestSecurityMonitoringRule] +// - [SecurityMonitoringApi.UpdateCustomFramework] // - [SecurityMonitoringApi.UpdateSecurityFilter] // - [SecurityMonitoringApi.UpdateSecurityMonitoringRule] // - [SecurityMonitoringApi.UpdateSecurityMonitoringSuppression] diff --git a/api/datadogV2/model_create_custom_framework_request.go b/api/datadogV2/model_create_custom_framework_request.go new file mode 100644 index 00000000000..f04a1619ef0 --- /dev/null +++ b/api/datadogV2/model_create_custom_framework_request.go @@ -0,0 +1,267 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// CreateCustomFrameworkRequest Framework Data. +type CreateCustomFrameworkRequest struct { + // Framework Description + Description *string `json:"description,omitempty"` + // Framework Handle + Handle string `json:"handle"` + // Framework Icon URL + IconUrl *string `json:"icon_url,omitempty"` + // Framework Name + Name string `json:"name"` + // Framework Requirements + Requirements []FrameworkRequirement `json:"requirements"` + // Framework Version + Version string `json:"version"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewCreateCustomFrameworkRequest instantiates a new CreateCustomFrameworkRequest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewCreateCustomFrameworkRequest(handle string, name string, requirements []FrameworkRequirement, version string) *CreateCustomFrameworkRequest { + this := CreateCustomFrameworkRequest{} + this.Handle = handle + this.Name = name + this.Requirements = requirements + this.Version = version + return &this +} + +// NewCreateCustomFrameworkRequestWithDefaults instantiates a new CreateCustomFrameworkRequest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewCreateCustomFrameworkRequestWithDefaults() *CreateCustomFrameworkRequest { + this := CreateCustomFrameworkRequest{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateCustomFrameworkRequest) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomFrameworkRequest) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateCustomFrameworkRequest) HasDescription() bool { + return o != nil && o.Description != nil +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateCustomFrameworkRequest) SetDescription(v string) { + o.Description = &v +} + +// GetHandle returns the Handle field value. +func (o *CreateCustomFrameworkRequest) GetHandle() string { + if o == nil { + var ret string + return ret + } + return o.Handle +} + +// GetHandleOk returns a tuple with the Handle field value +// and a boolean to check if the value has been set. +func (o *CreateCustomFrameworkRequest) GetHandleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Handle, true +} + +// SetHandle sets field value. +func (o *CreateCustomFrameworkRequest) SetHandle(v string) { + o.Handle = v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *CreateCustomFrameworkRequest) GetIconUrl() string { + if o == nil || o.IconUrl == nil { + var ret string + return ret + } + return *o.IconUrl +} + +// GetIconUrlOk returns a tuple with the IconUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomFrameworkRequest) GetIconUrlOk() (*string, bool) { + if o == nil || o.IconUrl == nil { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *CreateCustomFrameworkRequest) HasIconUrl() bool { + return o != nil && o.IconUrl != nil +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *CreateCustomFrameworkRequest) SetIconUrl(v string) { + o.IconUrl = &v +} + +// GetName returns the Name field value. +func (o *CreateCustomFrameworkRequest) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateCustomFrameworkRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *CreateCustomFrameworkRequest) SetName(v string) { + o.Name = v +} + +// GetRequirements returns the Requirements field value. +func (o *CreateCustomFrameworkRequest) GetRequirements() []FrameworkRequirement { + if o == nil { + var ret []FrameworkRequirement + return ret + } + return o.Requirements +} + +// GetRequirementsOk returns a tuple with the Requirements field value +// and a boolean to check if the value has been set. +func (o *CreateCustomFrameworkRequest) GetRequirementsOk() (*[]FrameworkRequirement, bool) { + if o == nil { + return nil, false + } + return &o.Requirements, true +} + +// SetRequirements sets field value. +func (o *CreateCustomFrameworkRequest) SetRequirements(v []FrameworkRequirement) { + o.Requirements = v +} + +// GetVersion returns the Version field value. +func (o *CreateCustomFrameworkRequest) GetVersion() string { + if o == nil { + var ret string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CreateCustomFrameworkRequest) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value. +func (o *CreateCustomFrameworkRequest) SetVersion(v string) { + o.Version = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o CreateCustomFrameworkRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + toSerialize["handle"] = o.Handle + if o.IconUrl != nil { + toSerialize["icon_url"] = o.IconUrl + } + toSerialize["name"] = o.Name + toSerialize["requirements"] = o.Requirements + toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *CreateCustomFrameworkRequest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Description *string `json:"description,omitempty"` + Handle *string `json:"handle"` + IconUrl *string `json:"icon_url,omitempty"` + Name *string `json:"name"` + Requirements *[]FrameworkRequirement `json:"requirements"` + Version *string `json:"version"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Handle == nil { + return fmt.Errorf("required field handle missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.Requirements == nil { + return fmt.Errorf("required field requirements missing") + } + if all.Version == nil { + return fmt.Errorf("required field version missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"description", "handle", "icon_url", "name", "requirements", "version"}) + } else { + return err + } + o.Description = all.Description + o.Handle = *all.Handle + o.IconUrl = all.IconUrl + o.Name = *all.Name + o.Requirements = *all.Requirements + o.Version = *all.Version + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/api/datadogV2/model_framework_control.go b/api/datadogV2/model_framework_control.go new file mode 100644 index 00000000000..dcf4e431f89 --- /dev/null +++ b/api/datadogV2/model_framework_control.go @@ -0,0 +1,133 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// FrameworkControl Framework Control. +type FrameworkControl struct { + // Control Name. + Name string `json:"name"` + // Rule IDs. + RuleIds []string `json:"rule_ids"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewFrameworkControl instantiates a new FrameworkControl object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewFrameworkControl(name string, ruleIds []string) *FrameworkControl { + this := FrameworkControl{} + this.Name = name + this.RuleIds = ruleIds + return &this +} + +// NewFrameworkControlWithDefaults instantiates a new FrameworkControl object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewFrameworkControlWithDefaults() *FrameworkControl { + this := FrameworkControl{} + return &this +} + +// GetName returns the Name field value. +func (o *FrameworkControl) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FrameworkControl) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *FrameworkControl) SetName(v string) { + o.Name = v +} + +// GetRuleIds returns the RuleIds field value. +func (o *FrameworkControl) GetRuleIds() []string { + if o == nil { + var ret []string + return ret + } + return o.RuleIds +} + +// GetRuleIdsOk returns a tuple with the RuleIds field value +// and a boolean to check if the value has been set. +func (o *FrameworkControl) GetRuleIdsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.RuleIds, true +} + +// SetRuleIds sets field value. +func (o *FrameworkControl) SetRuleIds(v []string) { + o.RuleIds = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o FrameworkControl) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["name"] = o.Name + toSerialize["rule_ids"] = o.RuleIds + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *FrameworkControl) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Name *string `json:"name"` + RuleIds *[]string `json:"rule_ids"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.RuleIds == nil { + return fmt.Errorf("required field rule_ids missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"name", "rule_ids"}) + } else { + return err + } + o.Name = *all.Name + o.RuleIds = *all.RuleIds + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/api/datadogV2/model_framework_requirement.go b/api/datadogV2/model_framework_requirement.go new file mode 100644 index 00000000000..b91ef0f60f8 --- /dev/null +++ b/api/datadogV2/model_framework_requirement.go @@ -0,0 +1,133 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// FrameworkRequirement Framework Requirement. +type FrameworkRequirement struct { + // Requirement Controls. + Controls []FrameworkControl `json:"controls"` + // Requirement Name. + Name string `json:"name"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewFrameworkRequirement instantiates a new FrameworkRequirement object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewFrameworkRequirement(controls []FrameworkControl, name string) *FrameworkRequirement { + this := FrameworkRequirement{} + this.Controls = controls + this.Name = name + return &this +} + +// NewFrameworkRequirementWithDefaults instantiates a new FrameworkRequirement object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewFrameworkRequirementWithDefaults() *FrameworkRequirement { + this := FrameworkRequirement{} + return &this +} + +// GetControls returns the Controls field value. +func (o *FrameworkRequirement) GetControls() []FrameworkControl { + if o == nil { + var ret []FrameworkControl + return ret + } + return o.Controls +} + +// GetControlsOk returns a tuple with the Controls field value +// and a boolean to check if the value has been set. +func (o *FrameworkRequirement) GetControlsOk() (*[]FrameworkControl, bool) { + if o == nil { + return nil, false + } + return &o.Controls, true +} + +// SetControls sets field value. +func (o *FrameworkRequirement) SetControls(v []FrameworkControl) { + o.Controls = v +} + +// GetName returns the Name field value. +func (o *FrameworkRequirement) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FrameworkRequirement) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *FrameworkRequirement) SetName(v string) { + o.Name = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o FrameworkRequirement) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["controls"] = o.Controls + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *FrameworkRequirement) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Controls *[]FrameworkControl `json:"controls"` + Name *string `json:"name"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Controls == nil { + return fmt.Errorf("required field controls missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"controls", "name"}) + } else { + return err + } + o.Controls = *all.Controls + o.Name = *all.Name + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/api/datadogV2/model_update_custom_framework_request.go b/api/datadogV2/model_update_custom_framework_request.go new file mode 100644 index 00000000000..629e3716054 --- /dev/null +++ b/api/datadogV2/model_update_custom_framework_request.go @@ -0,0 +1,267 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// UpdateCustomFrameworkRequest Framework Data. +type UpdateCustomFrameworkRequest struct { + // Framework Description + Description *string `json:"description,omitempty"` + // Framework Handle + Handle string `json:"handle"` + // Framework Icon URL + IconUrl *string `json:"icon_url,omitempty"` + // Framework Name + Name string `json:"name"` + // Framework Requirements + Requirements []FrameworkRequirement `json:"requirements"` + // Framework Version + Version string `json:"version"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewUpdateCustomFrameworkRequest instantiates a new UpdateCustomFrameworkRequest object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewUpdateCustomFrameworkRequest(handle string, name string, requirements []FrameworkRequirement, version string) *UpdateCustomFrameworkRequest { + this := UpdateCustomFrameworkRequest{} + this.Handle = handle + this.Name = name + this.Requirements = requirements + this.Version = version + return &this +} + +// NewUpdateCustomFrameworkRequestWithDefaults instantiates a new UpdateCustomFrameworkRequest object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewUpdateCustomFrameworkRequestWithDefaults() *UpdateCustomFrameworkRequest { + this := UpdateCustomFrameworkRequest{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateCustomFrameworkRequest) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCustomFrameworkRequest) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateCustomFrameworkRequest) HasDescription() bool { + return o != nil && o.Description != nil +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateCustomFrameworkRequest) SetDescription(v string) { + o.Description = &v +} + +// GetHandle returns the Handle field value. +func (o *UpdateCustomFrameworkRequest) GetHandle() string { + if o == nil { + var ret string + return ret + } + return o.Handle +} + +// GetHandleOk returns a tuple with the Handle field value +// and a boolean to check if the value has been set. +func (o *UpdateCustomFrameworkRequest) GetHandleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Handle, true +} + +// SetHandle sets field value. +func (o *UpdateCustomFrameworkRequest) SetHandle(v string) { + o.Handle = v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *UpdateCustomFrameworkRequest) GetIconUrl() string { + if o == nil || o.IconUrl == nil { + var ret string + return ret + } + return *o.IconUrl +} + +// GetIconUrlOk returns a tuple with the IconUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCustomFrameworkRequest) GetIconUrlOk() (*string, bool) { + if o == nil || o.IconUrl == nil { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *UpdateCustomFrameworkRequest) HasIconUrl() bool { + return o != nil && o.IconUrl != nil +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *UpdateCustomFrameworkRequest) SetIconUrl(v string) { + o.IconUrl = &v +} + +// GetName returns the Name field value. +func (o *UpdateCustomFrameworkRequest) GetName() string { + if o == nil { + var ret string + return ret + } + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateCustomFrameworkRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value. +func (o *UpdateCustomFrameworkRequest) SetName(v string) { + o.Name = v +} + +// GetRequirements returns the Requirements field value. +func (o *UpdateCustomFrameworkRequest) GetRequirements() []FrameworkRequirement { + if o == nil { + var ret []FrameworkRequirement + return ret + } + return o.Requirements +} + +// GetRequirementsOk returns a tuple with the Requirements field value +// and a boolean to check if the value has been set. +func (o *UpdateCustomFrameworkRequest) GetRequirementsOk() (*[]FrameworkRequirement, bool) { + if o == nil { + return nil, false + } + return &o.Requirements, true +} + +// SetRequirements sets field value. +func (o *UpdateCustomFrameworkRequest) SetRequirements(v []FrameworkRequirement) { + o.Requirements = v +} + +// GetVersion returns the Version field value. +func (o *UpdateCustomFrameworkRequest) GetVersion() string { + if o == nil { + var ret string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *UpdateCustomFrameworkRequest) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value. +func (o *UpdateCustomFrameworkRequest) SetVersion(v string) { + o.Version = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o UpdateCustomFrameworkRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + toSerialize["handle"] = o.Handle + if o.IconUrl != nil { + toSerialize["icon_url"] = o.IconUrl + } + toSerialize["name"] = o.Name + toSerialize["requirements"] = o.Requirements + toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *UpdateCustomFrameworkRequest) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Description *string `json:"description,omitempty"` + Handle *string `json:"handle"` + IconUrl *string `json:"icon_url,omitempty"` + Name *string `json:"name"` + Requirements *[]FrameworkRequirement `json:"requirements"` + Version *string `json:"version"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Handle == nil { + return fmt.Errorf("required field handle missing") + } + if all.Name == nil { + return fmt.Errorf("required field name missing") + } + if all.Requirements == nil { + return fmt.Errorf("required field requirements missing") + } + if all.Version == nil { + return fmt.Errorf("required field version missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"description", "handle", "icon_url", "name", "requirements", "version"}) + } else { + return err + } + o.Description = all.Description + o.Handle = *all.Handle + o.IconUrl = all.IconUrl + o.Name = *all.Name + o.Requirements = *all.Requirements + o.Version = *all.Version + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/examples/v2/security-monitoring/CreateCustomFramework.go b/examples/v2/security-monitoring/CreateCustomFramework.go new file mode 100644 index 00000000000..228139ba2dc --- /dev/null +++ b/examples/v2/security-monitoring/CreateCustomFramework.go @@ -0,0 +1,44 @@ +// Create a custom framework returns "OK" response + +package main + +import ( + "context" + "fmt" + "os" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" + "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" +) + +func main() { + body := datadogV2.CreateCustomFrameworkRequest{ + Handle: "", + Name: "", + Requirements: []datadogV2.FrameworkRequirement{ + { + Controls: []datadogV2.FrameworkControl{ + { + Name: "", + RuleIds: []string{ + "", + }, + }, + }, + Name: "", + }, + }, + Version: "", + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("v2.CreateCustomFramework", true) + apiClient := datadog.NewAPIClient(configuration) + api := datadogV2.NewSecurityMonitoringApi(apiClient) + r, err := api.CreateCustomFramework(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.CreateCustomFramework`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} diff --git a/examples/v2/security-monitoring/UpdateCustomFramework.go b/examples/v2/security-monitoring/UpdateCustomFramework.go new file mode 100644 index 00000000000..3b7df658091 --- /dev/null +++ b/examples/v2/security-monitoring/UpdateCustomFramework.go @@ -0,0 +1,44 @@ +// Update a custom framework returns "OK" response + +package main + +import ( + "context" + "fmt" + "os" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" + "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" +) + +func main() { + body := datadogV2.UpdateCustomFrameworkRequest{ + Handle: "", + Name: "", + Requirements: []datadogV2.FrameworkRequirement{ + { + Controls: []datadogV2.FrameworkControl{ + { + Name: "", + RuleIds: []string{ + "", + }, + }, + }, + Name: "", + }, + }, + Version: "", + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + configuration.SetUnstableOperationEnabled("v2.UpdateCustomFramework", true) + apiClient := datadog.NewAPIClient(configuration) + api := datadogV2.NewSecurityMonitoringApi(apiClient) + r, err := api.UpdateCustomFramework(ctx, "handle", "version", body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.UpdateCustomFramework`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} diff --git a/tests/scenarios/api_mappings.go b/tests/scenarios/api_mappings.go index c3c2a878343..ab6042f06d0 100644 --- a/tests/scenarios/api_mappings.go +++ b/tests/scenarios/api_mappings.go @@ -56,6 +56,7 @@ var apiMappings = map[string]map[string]reflect.Value{ "SoftwareCatalogApi": reflect.ValueOf(datadogV2.NewSoftwareCatalogApi), "CIVisibilityPipelinesApi": reflect.ValueOf(datadogV2.NewCIVisibilityPipelinesApi), "CIVisibilityTestsApi": reflect.ValueOf(datadogV2.NewCIVisibilityTestsApi), + "SecurityMonitoringApi": reflect.ValueOf(datadogV2.NewSecurityMonitoringApi), "ContainerImagesApi": reflect.ValueOf(datadogV2.NewContainerImagesApi), "ContainersApi": reflect.ValueOf(datadogV2.NewContainersApi), "CloudCostManagementApi": reflect.ValueOf(datadogV2.NewCloudCostManagementApi), @@ -88,7 +89,6 @@ var apiMappings = map[string]map[string]reflect.Value{ "NetworkDeviceMonitoringApi": reflect.ValueOf(datadogV2.NewNetworkDeviceMonitoringApi), "OrganizationsApi": reflect.ValueOf(datadogV2.NewOrganizationsApi), "RolesApi": reflect.ValueOf(datadogV2.NewRolesApi), - "SecurityMonitoringApi": reflect.ValueOf(datadogV2.NewSecurityMonitoringApi), "PowerpackApi": reflect.ValueOf(datadogV2.NewPowerpackApi), "ProcessesApi": reflect.ValueOf(datadogV2.NewProcessesApi), "CSMThreatsApi": reflect.ValueOf(datadogV2.NewCSMThreatsApi), diff --git a/tests/scenarios/features/v2/security_monitoring.feature b/tests/scenarios/features/v2/security_monitoring.feature index 362378f6349..c00fa9d0a41 100644 --- a/tests/scenarios/features/v2/security_monitoring.feature +++ b/tests/scenarios/features/v2/security_monitoring.feature @@ -171,6 +171,22 @@ Feature: Security Monitoring And the response "message" is equal to "ddd" And the response "options.complianceRuleOptions.resourceType" is equal to "gcp_compute_disk" + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Create a custom framework returns "Bad Request" response + Given operation "CreateCustomFramework" enabled + And new "CreateCustomFramework" request + And body with value {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rule_ids": [""]}], "name": ""}], "version": ""} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Create a custom framework returns "OK" response + Given operation "CreateCustomFramework" enabled + And new "CreateCustomFramework" request + And body with value {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rule_ids": [""]}], "name": ""}], "version": ""} + When the request is sent + Then the response status is 200 OK + @team:DataDog/k9-cloud-security-platform Scenario: Create a detection rule returns "Bad Request" response Given new "CreateSecurityMonitoringRule" request @@ -827,6 +843,26 @@ Feature: Security Monitoring And the response "name" is equal to "{{ unique }}_cloud_updated" And the response "id" has the same value as "cloud_configuration_rule.id" + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Update a custom framework returns "Bad Request" response + Given operation "UpdateCustomFramework" enabled + And new "UpdateCustomFramework" request + And request contains "handle" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + And body with value {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rule_ids": [""]}], "name": ""}], "version": ""} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-security-platform + Scenario: Update a custom framework returns "OK" response + Given operation "UpdateCustomFramework" enabled + And new "UpdateCustomFramework" request + And request contains "handle" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + And body with value {"handle": "", "name": "", "requirements": [{"controls": [{"name": "", "rule_ids": [""]}], "name": ""}], "version": ""} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Update a security filter returns "Bad Request" response Given new "UpdateSecurityFilter" request diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index d6c6e9de87c..154e3c46f15 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -439,6 +439,18 @@ "type": "safe" } }, + "CreateCustomFramework": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "UpdateCustomFramework": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "ListContainerImages": { "tag": "Container Images", "undo": {