Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86566,6 +86566,10 @@ components:
type: integer
creator:
$ref: "#/components/schemas/SecurityMonitoringUser"
description:
description: A description of the critical asset.
example: Production database servers handling PII
type: string
enabled:
description: Whether the critical asset is enabled.
example: true
Expand Down Expand Up @@ -86610,6 +86614,10 @@ components:
SecurityMonitoringCriticalAssetCreateAttributes:
description: Object containing the attributes of the critical asset to be created.
properties:
description:
description: A description of the critical asset.
example: Production database servers handling PII
type: string
enabled:
default: true
description: Whether the critical asset is enabled. Defaults to `true` if not specified.
Expand Down Expand Up @@ -86702,6 +86710,10 @@ components:
SecurityMonitoringCriticalAssetUpdateAttributes:
description: The critical asset properties to be updated.
properties:
description:
description: A description of the critical asset.
example: Production database servers handling PII
type: string
enabled:
description: Whether the critical asset is enabled.
example: true
Expand Down
4 changes: 2 additions & 2 deletions features/v2/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ Feature: Security Monitoring
@generated @skip @team:DataDog/k9-cloud-siem
Scenario: Create a critical asset returns "Conflict" response
Given new "CreateSecurityMonitoringCriticalAsset" request
And body with value {"data": {"attributes": {"enabled": true, "query": "security:monitoring", "rule_query": "type:(log_detection OR signal_correlation OR workload_security OR application_security) source:cloudtrail", "severity": "increase", "tags": ["team:database", "source:cloudtrail"]}, "type": "critical_assets"}}
And body with value {"data": {"attributes": {"description": "Production database servers handling PII", "enabled": true, "query": "security:monitoring", "rule_query": "type:(log_detection OR signal_correlation OR workload_security OR application_security) source:cloudtrail", "severity": "increase", "tags": ["team:database", "source:cloudtrail"]}, "type": "critical_assets"}}
When the request is sent
Then the response status is 409 Conflict

Expand Down Expand Up @@ -3089,7 +3089,7 @@ Feature: Security Monitoring
Scenario: Update a critical asset returns "Concurrent Modification" response
Given new "UpdateSecurityMonitoringCriticalAsset" request
And request contains "critical_asset_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "query": "security:monitoring", "rule_query": "type:log_detection source:cloudtrail", "severity": "increase", "tags": ["technique:T1110-brute-force", "source:cloudtrail"], "version": 1}, "type": "critical_assets"}}
And body with value {"data": {"attributes": {"description": "Production database servers handling PII", "enabled": true, "query": "security:monitoring", "rule_query": "type:log_detection source:cloudtrail", "severity": "increase", "tags": ["technique:T1110-brute-force", "source:cloudtrail"], "version": 1}, "type": "critical_assets"}}
When the request is sent
Then the response status is 409 Concurrent Modification

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class SecurityMonitoringCriticalAssetAttributes
# A user.
attr_accessor :creator

# A description of the critical asset.
attr_accessor :description

# Whether the critical asset is enabled.
attr_accessor :enabled

Expand Down Expand Up @@ -66,6 +69,7 @@ def self.attribute_map
:'creation_author_id' => :'creation_author_id',
:'creation_date' => :'creation_date',
:'creator' => :'creator',
:'description' => :'description',
:'enabled' => :'enabled',
:'query' => :'query',
:'rule_query' => :'rule_query',
Expand All @@ -85,6 +89,7 @@ def self.openapi_types
:'creation_author_id' => :'Integer',
:'creation_date' => :'Integer',
:'creator' => :'SecurityMonitoringUser',
:'description' => :'String',
:'enabled' => :'Boolean',
:'query' => :'String',
:'rule_query' => :'String',
Expand Down Expand Up @@ -127,6 +132,10 @@ def initialize(attributes = {})
self.creator = attributes[:'creator']
end

if attributes.key?(:'description')
self.description = attributes[:'description']
end

if attributes.key?(:'enabled')
self.enabled = attributes[:'enabled']
end
Expand Down Expand Up @@ -213,6 +222,7 @@ def ==(o)
creation_author_id == o.creation_author_id &&
creation_date == o.creation_date &&
creator == o.creator &&
description == o.description &&
enabled == o.enabled &&
query == o.query &&
rule_query == o.rule_query &&
Expand All @@ -229,7 +239,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[creation_author_id, creation_date, creator, enabled, query, rule_query, severity, tags, update_author_id, update_date, updater, version, additional_properties].hash
[creation_author_id, creation_date, creator, description, enabled, query, rule_query, severity, tags, update_author_id, update_date, updater, version, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module DatadogAPIClient::V2
class SecurityMonitoringCriticalAssetCreateAttributes
include BaseGenericModel

# A description of the critical asset.
attr_accessor :description

# Whether the critical asset is enabled. Defaults to `true` if not specified.
attr_accessor :enabled

Expand All @@ -42,6 +45,7 @@ class SecurityMonitoringCriticalAssetCreateAttributes
# @!visibility private
def self.attribute_map
{
:'description' => :'description',
:'enabled' => :'enabled',
:'query' => :'query',
:'rule_query' => :'rule_query',
Expand All @@ -54,6 +58,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'description' => :'String',
:'enabled' => :'Boolean',
:'query' => :'String',
:'rule_query' => :'String',
Expand All @@ -80,6 +85,10 @@ def initialize(attributes = {})
end
}

if attributes.key?(:'description')
self.description = attributes[:'description']
end

if attributes.key?(:'enabled')
self.enabled = attributes[:'enabled']
end
Expand Down Expand Up @@ -169,6 +178,7 @@ def to_hash
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
description == o.description &&
enabled == o.enabled &&
query == o.query &&
rule_query == o.rule_query &&
Expand All @@ -181,7 +191,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[enabled, query, rule_query, severity, tags, additional_properties].hash
[description, enabled, query, rule_query, severity, tags, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module DatadogAPIClient::V2
class SecurityMonitoringCriticalAssetUpdateAttributes
include BaseGenericModel

# A description of the critical asset.
attr_accessor :description

# Whether the critical asset is enabled.
attr_accessor :enabled

Expand All @@ -45,6 +48,7 @@ class SecurityMonitoringCriticalAssetUpdateAttributes
# @!visibility private
def self.attribute_map
{
:'description' => :'description',
:'enabled' => :'enabled',
:'query' => :'query',
:'rule_query' => :'rule_query',
Expand All @@ -58,6 +62,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'description' => :'String',
:'enabled' => :'Boolean',
:'query' => :'String',
:'rule_query' => :'String',
Expand Down Expand Up @@ -85,6 +90,10 @@ def initialize(attributes = {})
end
}

if attributes.key?(:'description')
self.description = attributes[:'description']
end

if attributes.key?(:'enabled')
self.enabled = attributes[:'enabled']
end
Expand Down Expand Up @@ -156,6 +165,7 @@ def to_hash
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
description == o.description &&
enabled == o.enabled &&
query == o.query &&
rule_query == o.rule_query &&
Expand All @@ -169,7 +179,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[enabled, query, rule_query, severity, tags, version, additional_properties].hash
[description, enabled, query, rule_query, severity, tags, version, additional_properties].hash
end
end
end
Loading