|
156 | 156 | SecurityMonitoringDatasetVersionHistoryResponse, |
157 | 157 | ) |
158 | 158 | from datadog_api_client.v2.model.entity_context_response import EntityContextResponse |
| 159 | +from datadog_api_client.v2.model.single_entity_context_response import SingleEntityContextResponse |
159 | 160 | from datadog_api_client.v2.model.security_monitoring_list_rules_response import SecurityMonitoringListRulesResponse |
160 | 161 | from datadog_api_client.v2.model.security_monitoring_rule_sort import SecurityMonitoringRuleSort |
161 | 162 | from datadog_api_client.v2.model.security_monitoring_rule_response import SecurityMonitoringRuleResponse |
@@ -2102,6 +2103,44 @@ def __init__(self, api_client=None): |
2102 | 2103 | api_client=api_client, |
2103 | 2104 | ) |
2104 | 2105 |
|
| 2106 | + self._get_single_entity_context_endpoint = _Endpoint( |
| 2107 | + settings={ |
| 2108 | + "response_type": (SingleEntityContextResponse,), |
| 2109 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 2110 | + "endpoint_path": "/api/v2/security_monitoring/entity_context/{id}", |
| 2111 | + "operation_id": "get_single_entity_context", |
| 2112 | + "http_method": "GET", |
| 2113 | + "version": "v2", |
| 2114 | + }, |
| 2115 | + params_map={ |
| 2116 | + "id": { |
| 2117 | + "required": True, |
| 2118 | + "openapi_types": (str,), |
| 2119 | + "attribute": "id", |
| 2120 | + "location": "path", |
| 2121 | + }, |
| 2122 | + "_from": { |
| 2123 | + "openapi_types": (str,), |
| 2124 | + "attribute": "from", |
| 2125 | + "location": "query", |
| 2126 | + }, |
| 2127 | + "to": { |
| 2128 | + "openapi_types": (str,), |
| 2129 | + "attribute": "to", |
| 2130 | + "location": "query", |
| 2131 | + }, |
| 2132 | + "as_of": { |
| 2133 | + "openapi_types": (str,), |
| 2134 | + "attribute": "as_of", |
| 2135 | + "location": "query", |
| 2136 | + }, |
| 2137 | + }, |
| 2138 | + headers_map={ |
| 2139 | + "accept": ["application/json"], |
| 2140 | + }, |
| 2141 | + api_client=api_client, |
| 2142 | + ) |
| 2143 | + |
2105 | 2144 | self._get_static_analysis_default_rulesets_endpoint = _Endpoint( |
2106 | 2145 | settings={ |
2107 | 2146 | "response_type": (DefaultRulesetsPerLanguageResponse,), |
@@ -5488,6 +5527,49 @@ def get_signal_notification_rules( |
5488 | 5527 | kwargs: Dict[str, Any] = {} |
5489 | 5528 | return self._get_signal_notification_rules_endpoint.call_with_http_info(**kwargs) |
5490 | 5529 |
|
| 5530 | + def get_single_entity_context( |
| 5531 | + self, |
| 5532 | + id: str, |
| 5533 | + *, |
| 5534 | + _from: Union[str, UnsetType] = unset, |
| 5535 | + to: Union[str, UnsetType] = unset, |
| 5536 | + as_of: Union[str, UnsetType] = unset, |
| 5537 | + ) -> SingleEntityContextResponse: |
| 5538 | + """Get a single entity context. |
| 5539 | +
|
| 5540 | + Get a single entity from the Cloud SIEM entity context store by its identifier, returning the historical |
| 5541 | + revisions of the entity in the requested time range. The endpoint can either return revisions across an |
| 5542 | + interval ( ``from`` / ``to`` ) or the snapshot of the entity at a single point in time ( ``as_of`` ); the two modes |
| 5543 | + are mutually exclusive. |
| 5544 | +
|
| 5545 | + :param id: The unique identifier of the entity to retrieve. |
| 5546 | + :type id: str |
| 5547 | + :param _from: The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, ``now-7d`` ). |
| 5548 | + Defaults to ``now-7d``. Ignored when ``as_of`` is set. |
| 5549 | + :type _from: str, optional |
| 5550 | + :param to: The end of the time range to query, as an RFC3339 timestamp or a relative time (for example, ``now`` ). |
| 5551 | + Defaults to ``now``. Ignored when ``as_of`` is set. |
| 5552 | + :type to: str, optional |
| 5553 | + :param as_of: A point in time at which to query the entity revisions, as an RFC3339 timestamp, a Unix timestamp |
| 5554 | + (in seconds), or a relative time (for example, ``now-1d`` ). When set, ``from`` and ``to`` are ignored. |
| 5555 | + Cannot be combined with custom ``from`` / ``to`` values. |
| 5556 | + :type as_of: str, optional |
| 5557 | + :rtype: SingleEntityContextResponse |
| 5558 | + """ |
| 5559 | + kwargs: Dict[str, Any] = {} |
| 5560 | + kwargs["id"] = id |
| 5561 | + |
| 5562 | + if _from is not unset: |
| 5563 | + kwargs["_from"] = _from |
| 5564 | + |
| 5565 | + if to is not unset: |
| 5566 | + kwargs["to"] = to |
| 5567 | + |
| 5568 | + if as_of is not unset: |
| 5569 | + kwargs["as_of"] = as_of |
| 5570 | + |
| 5571 | + return self._get_single_entity_context_endpoint.call_with_http_info(**kwargs) |
| 5572 | + |
5491 | 5573 | def get_static_analysis_default_rulesets( |
5492 | 5574 | self, |
5493 | 5575 | language: str, |
|
0 commit comments