Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Monitoring Rule - Add the updatedAt field in the SecurityMonitoringStandardRuleResponse #2283

Merged
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 .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-09 11:21:40.525950",
"spec_repo_commit": "21da0df3"
"regenerated": "2024-12-10 13:52:25.561950",
"spec_repo_commit": "4f71be94"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-09 11:21:40.543995",
"spec_repo_commit": "21da0df3"
"regenerated": "2024-12-10 13:52:25.579439",
"spec_repo_commit": "4f71be94"
}
}
}
4 changes: 4 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22893,6 +22893,10 @@ components:
description: User ID of the user who updated the rule.
format: int64
type: integer
updatedAt:
description: The date the rule was last updated, in milliseconds.
format: int64
type: integer
version:
description: The version of the rule.
format: int64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def __init__(self, **kwargs):
:param update_author_id: User ID of the user who updated the rule.
:type update_author_id: int, optional

:param updated_at: The date the rule was last updated, in milliseconds.
:type updated_at: int, optional

:param version: The version of the rule.
:type version: int, optional
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def openapi_types(_):
"third_party_cases": ([SecurityMonitoringThirdPartyRuleCase],),
"type": (SecurityMonitoringRuleTypeRead,),
"update_author_id": (int,),
"updated_at": (int,),
"version": (int,),
}

Expand All @@ -93,6 +94,7 @@ def openapi_types(_):
"third_party_cases": "thirdPartyCases",
"type": "type",
"update_author_id": "updateAuthorId",
"updated_at": "updatedAt",
"version": "version",
}

Expand All @@ -119,6 +121,7 @@ def __init__(
third_party_cases: Union[List[SecurityMonitoringThirdPartyRuleCase], UnsetType] = unset,
type: Union[SecurityMonitoringRuleTypeRead, UnsetType] = unset,
update_author_id: Union[int, UnsetType] = unset,
updated_at: Union[int, UnsetType] = unset,
version: Union[int, UnsetType] = unset,
**kwargs,
):
Expand Down Expand Up @@ -188,6 +191,9 @@ def __init__(
:param update_author_id: User ID of the user who updated the rule.
:type update_author_id: int, optional

:param updated_at: The date the rule was last updated, in milliseconds.
:type updated_at: int, optional

:param version: The version of the rule.
:type version: int, optional
"""
Expand Down Expand Up @@ -233,6 +239,8 @@ def __init__(
kwargs["type"] = type
if update_author_id is not unset:
kwargs["update_author_id"] = update_author_id
if updated_at is not unset:
kwargs["updated_at"] = updated_at
if version is not unset:
kwargs["version"] = version
super().__init__(kwargs)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-05-10T16:34:48.233Z
2024-11-22T13:52:05.136Z

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-05-10T16:34:48.765Z
2024-11-22T13:52:07.331Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: '{"cases":[{"notifications":["channel"],"status":"info"}],"complianceSignalOptions":{"userActivationStatus":true,"userGroupByFields":["@account_id"]},"isEnabled":false,"message":"Cloud
configuration rule","name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1715358888_cloud","options":{"complianceRuleOptions":{"complexRule":false,"regoRule":{"policy":"package
configuration rule","name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1732283527_cloud","options":{"complianceRuleOptions":{"complexRule":false,"regoRule":{"policy":"package
datadog\n\nimport data.datadog.output as dd_output\n\nimport future.keywords.contains\nimport
future.keywords.if\nimport future.keywords.in\n\nmilliseconds_in_a_day := ((1000
* 60) * 60) * 24\n\neval(iam_service_account_key) = \"skip\" if {\n\tiam_service_account_key.disabled\n}
Expand All @@ -19,7 +19,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules
response:
body:
string: '{"id":"efv-nza-5ev","version":1,"name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1715358888_cloud","createdAt":1715358889053,"creationAuthorId":1445416,"isDefault":false,"isPartner":false,"isEnabled":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"resource_type:gcp_compute_disk","groupByFields":["resource_type","resource_id"],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"a"}],"options":{"keepAlive":21600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":7200,"complianceRuleOptions":{"resourceType":"gcp_compute_disk","regoRule":{"policy":"package
string: '{"id":"uao-sdg-mt8","version":1,"name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1732283527_cloud","createdAt":1732283527664,"creationAuthorId":1445416,"isDefault":false,"isPartner":false,"isEnabled":false,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"resource_type:gcp_compute_disk","groupByFields":["resource_type","resource_id"],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"a"}],"options":{"keepAlive":21600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":7200,"complianceRuleOptions":{"resourceType":"gcp_compute_disk","regoRule":{"policy":"package
datadog\n\nimport data.datadog.output as dd_output\n\nimport future.keywords.contains\nimport
future.keywords.if\nimport future.keywords.in\n\nmilliseconds_in_a_day :=
((1000 * 60) * 60) * 24\n\neval(iam_service_account_key) = \"skip\" if {\n\tiam_service_account_key.disabled\n}
Expand All @@ -38,7 +38,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"cases":[{"notifications":[],"status":"info"}],"complianceSignalOptions":{"userActivationStatus":false,"userGroupByFields":[]},"isEnabled":false,"message":"ddd","name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1715358888_cloud_updated","options":{"complianceRuleOptions":{"regoRule":{"policy":"package
body: '{"cases":[{"notifications":[],"status":"info"}],"complianceSignalOptions":{"userActivationStatus":false,"userGroupByFields":[]},"isEnabled":false,"message":"ddd","name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1732283527_cloud_updated","options":{"complianceRuleOptions":{"regoRule":{"policy":"package
datadog\n\nimport data.datadog.output as dd_output\n\nimport future.keywords.contains\nimport
future.keywords.if\nimport future.keywords.in\n\nmilliseconds_in_a_day := ((1000
* 60) * 60) * 24\n\neval(iam_service_account_key) = \"skip\" if {\n\tiam_service_account_key.disabled\n}
Expand All @@ -53,10 +53,10 @@ interactions:
content-type:
- application/json
method: PUT
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/efv-nza-5ev
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/uao-sdg-mt8
response:
body:
string: '{"id":"efv-nza-5ev","version":2,"name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1715358888_cloud_updated","createdAt":1715358889053,"creationAuthorId":1445416,"updateAuthorId":1445416,"isDefault":false,"isPartner":false,"isEnabled":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"resource_type:gcp_compute_disk","groupByFields":["resource_type","resource_id"],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"a"}],"options":{"keepAlive":21600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":7200,"complianceRuleOptions":{"resourceType":"gcp_compute_disk","regoRule":{"policy":"package
string: '{"id":"uao-sdg-mt8","version":2,"name":"Test-Update_a_cloud_configuration_rule_s_details_returns_OK_response-1732283527_cloud_updated","createdAt":1732283527664,"creationAuthorId":1445416,"updateAuthorId":1445416,"updatedAt":1732283528223,"isDefault":false,"isPartner":false,"isEnabled":false,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"resource_type:gcp_compute_disk","groupByFields":["resource_type","resource_id"],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":"a"}],"options":{"keepAlive":21600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":7200,"complianceRuleOptions":{"resourceType":"gcp_compute_disk","regoRule":{"policy":"package
datadog\n\nimport data.datadog.output as dd_output\n\nimport future.keywords.contains\nimport
future.keywords.if\nimport future.keywords.in\n\nmilliseconds_in_a_day :=
((1000 * 60) * 60) * 24\n\neval(iam_service_account_key) = \"skip\" if {\n\tiam_service_account_key.disabled\n}
Expand All @@ -80,7 +80,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/efv-nza-5ev
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/uao-sdg-mt8
response:
body:
string: ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-05-10T16:34:54.978Z
2024-11-22T13:52:12.595Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test
rule","name":"Test-Update_an_existing_rule_returns_OK_response-1715358894","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[],"type":"log_detection"}'
rule","name":"Test-Update_an_existing_rule_returns_OK_response-1732283532","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[],"type":"log_detection"}'
headers:
accept:
- application/json
Expand All @@ -11,7 +11,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules
response:
body:
string: '{"id":"fu8-wg9-rsy","version":1,"name":"Test-Update_an_existing_rule_returns_OK_response-1715358894","createdAt":1715358895245,"creationAuthorId":1445416,"isDefault":false,"isPartner":false,"isEnabled":true,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":""}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":900},"cases":[{"name":"","status":"info","notifications":[],"condition":"a
string: '{"id":"mza-hwt-ziu","version":1,"name":"Test-Update_an_existing_rule_returns_OK_response-1732283532","createdAt":1732283532973,"creationAuthorId":1445416,"isDefault":false,"isPartner":false,"isEnabled":true,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":""}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":900},"cases":[{"name":"","status":"info","notifications":[],"condition":"a
> 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[]}

'
Expand All @@ -23,17 +23,17 @@ interactions:
message: OK
- request:
body: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test
rule","name":"Test-Update_an_existing_rule_returns_OK_response-1715358894-Updated","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[]}'
rule","name":"Test-Update_an_existing_rule_returns_OK_response-1732283532-Updated","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[]}'
headers:
accept:
- application/json
content-type:
- application/json
method: PUT
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/fu8-wg9-rsy
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/mza-hwt-ziu
response:
body:
string: '{"id":"fu8-wg9-rsy","version":2,"name":"Test-Update_an_existing_rule_returns_OK_response-1715358894-Updated","createdAt":1715358895245,"creationAuthorId":1445416,"updateAuthorId":1445416,"isDefault":false,"isPartner":false,"isEnabled":true,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":""}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":900},"cases":[{"name":"","status":"info","notifications":[],"condition":"a
string: '{"id":"mza-hwt-ziu","version":2,"name":"Test-Update_an_existing_rule_returns_OK_response-1732283532-Updated","createdAt":1732283532973,"creationAuthorId":1445416,"updateAuthorId":1445416,"updatedAt":1732283533337,"isDefault":false,"isPartner":false,"isEnabled":true,"isBeta":false,"isDeleted":false,"isDeprecated":false,"queries":[{"query":"@test:true","groupByFields":[],"hasOptionalGroupByFields":false,"distinctFields":[],"aggregation":"count","name":""}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"detectionMethod":"threshold","evaluationWindow":900},"cases":[{"name":"","status":"info","notifications":[],"condition":"a
> 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[]}

'
Expand All @@ -49,7 +49,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/fu8-wg9-rsy
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/mza-hwt-ziu
response:
body:
string: ''
Expand Down
Loading