|
66 | 66 | from datadog_api_client.v2.model.security_monitoring_rule_validate_payload import SecurityMonitoringRuleValidatePayload
|
67 | 67 | from datadog_api_client.v2.model.cloud_configuration_rule_payload import CloudConfigurationRulePayload
|
68 | 68 | from datadog_api_client.v2.model.security_monitoring_rule_update_payload import SecurityMonitoringRuleUpdatePayload
|
| 69 | +from datadog_api_client.v2.model.get_rule_version_history_response import GetRuleVersionHistoryResponse |
69 | 70 | from datadog_api_client.v2.model.security_monitoring_signals_list_response import SecurityMonitoringSignalsListResponse
|
70 | 71 | from datadog_api_client.v2.model.security_monitoring_signals_sort import SecurityMonitoringSignalsSort
|
71 | 72 | from datadog_api_client.v2.model.security_monitoring_signal import SecurityMonitoringSignal
|
@@ -556,6 +557,39 @@ def __init__(self, api_client=None):
|
556 | 557 | api_client=api_client,
|
557 | 558 | )
|
558 | 559 |
|
| 560 | + self._get_rule_version_history_endpoint = _Endpoint( |
| 561 | + settings={ |
| 562 | + "response_type": (GetRuleVersionHistoryResponse,), |
| 563 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 564 | + "endpoint_path": "/api/v2/security_monitoring/rules/{rule_id}/version_history", |
| 565 | + "operation_id": "get_rule_version_history", |
| 566 | + "http_method": "GET", |
| 567 | + "version": "v2", |
| 568 | + }, |
| 569 | + params_map={ |
| 570 | + "rule_id": { |
| 571 | + "required": True, |
| 572 | + "openapi_types": (str,), |
| 573 | + "attribute": "rule_id", |
| 574 | + "location": "path", |
| 575 | + }, |
| 576 | + "page_size": { |
| 577 | + "openapi_types": (int,), |
| 578 | + "attribute": "page[size]", |
| 579 | + "location": "query", |
| 580 | + }, |
| 581 | + "page_number": { |
| 582 | + "openapi_types": (int,), |
| 583 | + "attribute": "page[number]", |
| 584 | + "location": "query", |
| 585 | + }, |
| 586 | + }, |
| 587 | + headers_map={ |
| 588 | + "accept": ["application/json"], |
| 589 | + }, |
| 590 | + api_client=api_client, |
| 591 | + ) |
| 592 | + |
559 | 593 | self._get_sbom_endpoint = _Endpoint(
|
560 | 594 | settings={
|
561 | 595 | "response_type": (GetSBOMResponse,),
|
@@ -1958,6 +1992,36 @@ def get_historical_job(
|
1958 | 1992 |
|
1959 | 1993 | return self._get_historical_job_endpoint.call_with_http_info(**kwargs)
|
1960 | 1994 |
|
| 1995 | + def get_rule_version_history( |
| 1996 | + self, |
| 1997 | + rule_id: str, |
| 1998 | + *, |
| 1999 | + page_size: Union[int, UnsetType] = unset, |
| 2000 | + page_number: Union[int, UnsetType] = unset, |
| 2001 | + ) -> GetRuleVersionHistoryResponse: |
| 2002 | + """Get a rule's version history. |
| 2003 | +
|
| 2004 | + Get a rule's version history. |
| 2005 | +
|
| 2006 | + :param rule_id: The ID of the rule. |
| 2007 | + :type rule_id: str |
| 2008 | + :param page_size: Size for a given page. The maximum allowed value is 100. |
| 2009 | + :type page_size: int, optional |
| 2010 | + :param page_number: Specific page number to return. |
| 2011 | + :type page_number: int, optional |
| 2012 | + :rtype: GetRuleVersionHistoryResponse |
| 2013 | + """ |
| 2014 | + kwargs: Dict[str, Any] = {} |
| 2015 | + kwargs["rule_id"] = rule_id |
| 2016 | + |
| 2017 | + if page_size is not unset: |
| 2018 | + kwargs["page_size"] = page_size |
| 2019 | + |
| 2020 | + if page_number is not unset: |
| 2021 | + kwargs["page_number"] = page_number |
| 2022 | + |
| 2023 | + return self._get_rule_version_history_endpoint.call_with_http_info(**kwargs) |
| 2024 | + |
1961 | 2025 | def get_sbom(
|
1962 | 2026 | self,
|
1963 | 2027 | asset_type: AssetType,
|
|
0 commit comments