From 70b211eeed523692324e37f6ca37fbc0761235c1 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 7 Aug 2026 15:43:27 +0000 Subject: [PATCH] Regenerate client from commit 4616981 of spec repo --- .generator/schemas/v2/openapi.yaml | 19 ++++--------------- .../UpdateGovernanceControl.py | 1 - .../v2/model/governance_control_attributes.py | 7 ------- ...governance_control_parameter_definition.py | 8 ++++---- .../governance_control_update_attributes.py | 8 -------- tests/v2/features/governance_console.feature | 6 +++--- 6 files changed, 11 insertions(+), 38 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 397d1a8cdc..e7929de2e1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -44735,10 +44735,6 @@ components: description: A human-readable description of what the control detects. example: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." type: string - detection_frequency: - description: How often detections are evaluated for the control. - example: "daily" - type: string detection_parameters: $ref: "#/components/schemas/GovernanceControlParametersMap" nullable: true @@ -44808,7 +44804,6 @@ components: - type - priority - detection_parameters - - detection_frequency - mitigation_type - mitigation_parameters - created_at @@ -45167,17 +45162,14 @@ components: - label type: object GovernanceControlSupportedValueArray: - description: The supported values for an enumerated parameter. + description: The supported values for an enumerated parameter. `null` when the parameter is not an enumerated type. items: $ref: "#/components/schemas/GovernanceControlSupportedValue" + nullable: true type: array GovernanceControlUpdateAttributes: description: The attributes of a governance control that can be updated. Only the attributes present in the request are modified. properties: - detection_frequency: - description: How often detections should be evaluated for the control. - example: "daily" - type: string detection_parameters: $ref: "#/components/schemas/GovernanceControlParametersMap" nullable: true @@ -145322,7 +145314,6 @@ paths: created_at: "2024-01-15T09:30:00Z" created_by: "11111111-2222-3333-4444-555555555555" description: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." - detection_frequency: "daily" detection_parameters: api_key_threshold: 30 insights: [] @@ -145352,7 +145343,7 @@ paths: display_name: "Unused API Key Threshold" name: "api_key_threshold" required: false - supported_values: [] + supported_values: type: "integer" type: "Proactive" id: "unused_api_keys" @@ -145422,7 +145413,6 @@ paths: created_at: "2024-01-15T09:30:00Z" created_by: "11111111-2222-3333-4444-555555555555" description: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." - detection_frequency: "daily" detection_parameters: api_key_threshold: 30 insights: [] @@ -145442,7 +145432,7 @@ paths: display_name: "Unused API Key Threshold" name: "api_key_threshold" required: false - supported_values: [] + supported_values: type: "integer" type: "Proactive" id: "unused_api_keys" @@ -145533,7 +145523,6 @@ paths: created_at: "2024-01-15T09:30:00Z" created_by: "11111111-2222-3333-4444-555555555555" description: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." - detection_frequency: "daily" detection_parameters: api_key_threshold: 60 insights: [] diff --git a/examples/v2/governance-console/UpdateGovernanceControl.py b/examples/v2/governance-console/UpdateGovernanceControl.py index 9a578c446d..46ee013304 100644 --- a/examples/v2/governance-console/UpdateGovernanceControl.py +++ b/examples/v2/governance-console/UpdateGovernanceControl.py @@ -12,7 +12,6 @@ body = GovernanceControlUpdateRequest( data=GovernanceControlUpdateData( attributes=GovernanceControlUpdateAttributes( - detection_frequency="daily", mitigation_type="revoke_api_key", ), type=GovernanceControlResourceType.GOVERNANCE_CONTROL, diff --git a/src/datadog_api_client/v2/model/governance_control_attributes.py b/src/datadog_api_client/v2/model/governance_control_attributes.py index 9dc28bf97a..fecb652956 100644 --- a/src/datadog_api_client/v2/model/governance_control_attributes.py +++ b/src/datadog_api_client/v2/model/governance_control_attributes.py @@ -38,7 +38,6 @@ def openapi_types(_): "created_at": (datetime,), "created_by": (str,), "description": (str,), - "detection_frequency": (str,), "detection_parameters": (GovernanceControlParametersMap,), "insights": ([str],), "last_detection_at": (datetime, none_type), @@ -61,7 +60,6 @@ def openapi_types(_): "created_at": "created_at", "created_by": "created_by", "description": "description", - "detection_frequency": "detection_frequency", "detection_parameters": "detection_parameters", "insights": "insights", "last_detection_at": "last_detection_at", @@ -85,7 +83,6 @@ def __init__( created_at: datetime, created_by: str, description: str, - detection_frequency: str, detection_parameters: GovernanceControlParametersMap, insights: List[str], last_detection_at: Union[datetime, none_type], @@ -120,9 +117,6 @@ def __init__( :param description: A human-readable description of what the control detects. :type description: str - :param detection_frequency: How often detections are evaluated for the control. - :type detection_frequency: str - :param detection_parameters: A free-form map of parameter names to their configured values. :type detection_parameters: GovernanceControlParametersMap @@ -172,7 +166,6 @@ def __init__( self_.created_at = created_at self_.created_by = created_by self_.description = description - self_.detection_frequency = detection_frequency self_.detection_parameters = detection_parameters self_.insights = insights self_.last_detection_at = last_detection_at diff --git a/src/datadog_api_client/v2/model/governance_control_parameter_definition.py b/src/datadog_api_client/v2/model/governance_control_parameter_definition.py index e7dbd32d6a..38dac7a043 100644 --- a/src/datadog_api_client/v2/model/governance_control_parameter_definition.py +++ b/src/datadog_api_client/v2/model/governance_control_parameter_definition.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, List, TYPE_CHECKING +from typing import Any, List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -62,7 +62,7 @@ def __init__( display_name: str, name: str, required: bool, - supported_values: List[GovernanceControlSupportedValue], + supported_values: Union[List[GovernanceControlSupportedValue], none_type], type: str, **kwargs, ): @@ -84,8 +84,8 @@ def __init__( :param required: Whether the parameter must be provided. :type required: bool - :param supported_values: The supported values for an enumerated parameter. - :type supported_values: [GovernanceControlSupportedValue] + :param supported_values: The supported values for an enumerated parameter. ``null`` when the parameter is not an enumerated type. + :type supported_values: [GovernanceControlSupportedValue], none_type :param type: The type of the parameter, such as ``integer`` , ``string`` , ``boolean`` , ``enum`` , or ``pattern_list``. :type type: str diff --git a/src/datadog_api_client/v2/model/governance_control_update_attributes.py b/src/datadog_api_client/v2/model/governance_control_update_attributes.py index 8132ce405e..73973faac1 100644 --- a/src/datadog_api_client/v2/model/governance_control_update_attributes.py +++ b/src/datadog_api_client/v2/model/governance_control_update_attributes.py @@ -23,14 +23,12 @@ def openapi_types(_): from datadog_api_client.v2.model.governance_control_parameters_map import GovernanceControlParametersMap return { - "detection_frequency": (str,), "detection_parameters": (GovernanceControlParametersMap,), "mitigation_parameters": (GovernanceControlParametersMap,), "mitigation_type": (str,), } attribute_map = { - "detection_frequency": "detection_frequency", "detection_parameters": "detection_parameters", "mitigation_parameters": "mitigation_parameters", "mitigation_type": "mitigation_type", @@ -38,7 +36,6 @@ def openapi_types(_): def __init__( self_, - detection_frequency: Union[str, UnsetType] = unset, detection_parameters: Union[GovernanceControlParametersMap, UnsetType] = unset, mitigation_parameters: Union[GovernanceControlParametersMap, UnsetType] = unset, mitigation_type: Union[str, UnsetType] = unset, @@ -47,9 +44,6 @@ def __init__( """ The attributes of a governance control that can be updated. Only the attributes present in the request are modified. - :param detection_frequency: How often detections should be evaluated for the control. - :type detection_frequency: str, optional - :param detection_parameters: A free-form map of parameter names to their configured values. :type detection_parameters: GovernanceControlParametersMap, optional @@ -59,8 +53,6 @@ def __init__( :param mitigation_type: The mitigation type to configure for the control. :type mitigation_type: str, optional """ - if detection_frequency is not unset: - kwargs["detection_frequency"] = detection_frequency if detection_parameters is not unset: kwargs["detection_parameters"] = detection_parameters if mitigation_parameters is not unset: diff --git a/tests/v2/features/governance_console.feature b/tests/v2/features/governance_console.feature index 075b0f0e4c..7db27be44d 100644 --- a/tests/v2/features/governance_console.feature +++ b/tests/v2/features/governance_console.feature @@ -175,7 +175,7 @@ Feature: Governance Console Given operation "UpdateGovernanceControl" enabled And new "UpdateGovernanceControl" request And request contains "detection_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key"}, "type": "governance_control"}} + And body with value {"data": {"attributes": {"mitigation_type": "revoke_api_key"}, "type": "governance_control"}} When the request is sent Then the response status is 400 Bad Request @@ -184,7 +184,7 @@ Feature: Governance Console Given operation "UpdateGovernanceControl" enabled And new "UpdateGovernanceControl" request And request contains "detection_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key"}, "type": "governance_control"}} + And body with value {"data": {"attributes": {"mitigation_type": "revoke_api_key"}, "type": "governance_control"}} When the request is sent Then the response status is 404 Not Found @@ -193,7 +193,7 @@ Feature: Governance Console Given operation "UpdateGovernanceControl" enabled And new "UpdateGovernanceControl" request And request contains "detection_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key"}, "type": "governance_control"}} + And body with value {"data": {"attributes": {"mitigation_type": "revoke_api_key"}, "type": "governance_control"}} When the request is sent Then the response status is 200 OK