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
8 changes: 4 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23004,7 +23004,7 @@ components:
For SDK users only: all fields at this response level are accessible through the
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
dimensions will not have typed-field getters. Use
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
to enumerate every available key.
properties:
agent_host_top99p:
Expand Down Expand Up @@ -24307,7 +24307,7 @@ components:
For SDK users only: all fields at this response level are accessible through the
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
dimensions will not have typed-field getters. Use
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
to enumerate every available key.
properties:
account_name:
Expand Down Expand Up @@ -25629,7 +25629,7 @@ components:
For SDK users only: all fields at this response level are accessible through the
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
dimensions will not have typed-field getters. Use
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
to enumerate every available key.
properties:
agent_host_top99p_sum:
Expand Down Expand Up @@ -43410,7 +43410,7 @@ paths:
`UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map.
Existing typed-field getters are unchanged. New billing dimensions will not have
typed-field getters. Use
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
to enumerate every available key at each response level.

This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
Expand Down
18 changes: 12 additions & 6 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 Expand Up @@ -173432,9 +173444,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: >-
Create ServiceNow tickets for security findings.
Expand Down Expand Up @@ -173505,9 +173514,6 @@ paths:
permissions:
- security_monitoring_findings_write
- appsec_vm_write
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/security/sboms:
get:
description: |-
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/security-monitoring/AttachServiceNowTicket.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Attach security findings to a ServiceNow ticket returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.attach_service_now_ticket".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::AttachServiceNowTicketRequest.new({
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/security-monitoring/CreateServiceNowTickets.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Create ServiceNow tickets for security findings returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_service_now_tickets".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::CreateServiceNowTicketRequestArray.new({
Expand Down
22 changes: 8 additions & 14 deletions features/v2/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,21 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-investigation
Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response
Given operation "AttachServiceNowTicket" enabled
And new "AttachServiceNowTicket" request
Given new "AttachServiceNowTicket" request
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-investigation
Scenario: Attach security findings to a ServiceNow ticket returns "Not Found" response
Given operation "AttachServiceNowTicket" enabled
And new "AttachServiceNowTicket" request
Given new "AttachServiceNowTicket" request
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/k9-investigation
Scenario: Attach security findings to a ServiceNow ticket returns "OK" response
Given operation "AttachServiceNowTicket" enabled
And new "AttachServiceNowTicket" request
Given new "AttachServiceNowTicket" request
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -532,24 +529,21 @@ Feature: Security Monitoring

@generated @skip @team:DataDog/k9-investigation
Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response
Given operation "CreateServiceNowTickets" enabled
And new "CreateServiceNowTickets" request
Given new "CreateServiceNowTickets" request
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/k9-investigation
Scenario: Create ServiceNow tickets for security findings returns "Created" response
Given operation "CreateServiceNowTickets" enabled
And new "CreateServiceNowTickets" request
Given new "CreateServiceNowTickets" request
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/k9-investigation
Scenario: Create ServiceNow tickets for security findings returns "Not Found" response
Given operation "CreateServiceNowTickets" enabled
And new "CreateServiceNowTickets" request
Given new "CreateServiceNowTickets" request
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
When the request is sent
Then the response status is 404 Not Found
Expand All @@ -575,7 +569,7 @@ Feature: Security Monitoring
@generated @skip @team:DataDog/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 +3083,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
2 changes: 0 additions & 2 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ def initialize
"v2.get_aws_cloud_auth_persona_mapping": false,
"v2.list_aws_cloud_auth_persona_mappings": false,
"v2.activate_content_pack": false,
"v2.attach_service_now_ticket": false,
"v2.batch_get_security_monitoring_dataset_dependencies": false,
"v2.bulk_create_sample_log_generation_subscriptions": false,
"v2.bulk_export_security_monitoring_terraform_resources": false,
Expand All @@ -351,7 +350,6 @@ def initialize
"v2.create_security_findings_automation_ticket_creation_rule": false,
"v2.create_security_monitoring_dataset": false,
"v2.create_security_monitoring_integration_config": false,
"v2.create_service_now_tickets": false,
"v2.create_static_analysis_ast": false,
"v2.create_static_analysis_server_analysis": false,
"v2.deactivate_content_pack": false,
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/api/usage_metering_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ def get_usage_summary(start_month, opts = {})
# `UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map.
# Existing typed-field getters are unchanged. New billing dimensions will not have
# typed-field getters. Use
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
# to enumerate every available key at each response level.
#
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/models/usage_summary_date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module DatadogAPIClient::V1
# For SDK users only: all fields at this response level are accessible through the
# `additionalProperties` map. Existing typed-field getters are unchanged. New billing
# dimensions will not have typed-field getters. Use
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
# to enumerate every available key.
class UsageSummaryDate
include BaseGenericModel
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/models/usage_summary_date_org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module DatadogAPIClient::V1
# For SDK users only: all fields at this response level are accessible through the
# `additionalProperties` map. Existing typed-field getters are unchanged. New billing
# dimensions will not have typed-field getters. Use
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
# to enumerate every available key.
class UsageSummaryDateOrg
include BaseGenericModel
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/models/usage_summary_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module DatadogAPIClient::V1
# For SDK users only: all fields at this response level are accessible through the
# `additionalProperties` map. Existing typed-field getters are unchanged. New billing
# dimensions will not have typed-field getters. Use
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/get-available-fields-for-usage-summary/)
# to enumerate every available key.
class UsageSummaryResponse
include BaseGenericModel
Expand Down
12 changes: 0 additions & 12 deletions lib/datadog_api_client/v2/api/security_monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ def attach_service_now_ticket(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers
def attach_service_now_ticket_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.attach_service_now_ticket".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.attach_service_now_ticket")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.attach_service_now_ticket"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.attach_service_now_ticket ...'
Expand Down Expand Up @@ -2348,12 +2342,6 @@ def create_service_now_tickets(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(FindingCaseResponseArray, Integer, Hash)>] FindingCaseResponseArray data, response status code and response headers
def create_service_now_tickets_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.create_service_now_tickets".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_service_now_tickets")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_service_now_tickets"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_service_now_tickets ...'
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
Loading
Loading