From 8eec22ce832f450deda0010a090863c4e7a9e7ad Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 5 Sep 2025 13:16:00 +0000 Subject: [PATCH] Regenerate client from commit 5b8fdc9 of spec repo --- .generator/schemas/v2/openapi.yaml | 41 ++++++++++++++ src/datadog_api_client/v2/api/monitors_api.py | 56 +++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index bb7c9c3507..2f4dce9e3c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -58413,6 +58413,47 @@ paths: description: Returns a list of all monitor notification rules. operationId: GetMonitorNotificationRules parameters: + - description: The page to start paginating from. If `page` is not specified, + the argument defaults to the first page. + in: query + name: page + required: false + schema: + format: int32 + maximum: 1000000 + minimum: 0 + type: integer + - description: The number of rules to return per page. If `per_page` is not + specified, the argument defaults to 100. + in: query + name: per_page + required: false + schema: + format: int32 + maximum: 1000 + minimum: 1 + type: integer + - description: 'String for sort order, composed of field and sort order separated + by a colon, for example `name:asc`. Supported sort directions: `asc`, `desc`. + Supported fields: `name`, `created_at`.' + in: query + name: sort + required: false + schema: + type: string + - description: 'JSON-encoded filter object. Supported keys: + + * `text`: Free-text query matched against rule name, tags, and recipients. + + * `tags`: Array of strings. Return rules that have any of these tags. + + * `recipients`: Array of strings. Return rules that have any of these recipients.' + example: '{"text":"error","tags":["env:prod","team:my-team"],"recipients":["slack-monitor-app","email@example.com"]}' + in: query + name: filters + required: false + schema: + type: string - description: 'Comma-separated list of resource paths for related resources to include in the response. Supported resource diff --git a/src/datadog_api_client/v2/api/monitors_api.py b/src/datadog_api_client/v2/api/monitors_api.py index f4c33697aa..edd19312a2 100644 --- a/src/datadog_api_client/v2/api/monitors_api.py +++ b/src/datadog_api_client/v2/api/monitors_api.py @@ -230,6 +230,34 @@ def __init__(self, api_client=None): "version": "v2", }, params_map={ + "page": { + "validation": { + "inclusive_maximum": 1000000, + "inclusive_minimum": 0, + }, + "openapi_types": (int,), + "attribute": "page", + "location": "query", + }, + "per_page": { + "validation": { + "inclusive_maximum": 1000, + "inclusive_minimum": 1, + }, + "openapi_types": (int,), + "attribute": "per_page", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "filters": { + "openapi_types": (str,), + "attribute": "filters", + "location": "query", + }, "include": { "openapi_types": (str,), "attribute": "include", @@ -572,18 +600,46 @@ def get_monitor_notification_rule( def get_monitor_notification_rules( self, *, + page: Union[int, UnsetType] = unset, + per_page: Union[int, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + filters: Union[str, UnsetType] = unset, include: Union[str, UnsetType] = unset, ) -> MonitorNotificationRuleListResponse: """Get all monitor notification rules. Returns a list of all monitor notification rules. + :param page: The page to start paginating from. If ``page`` is not specified, the argument defaults to the first page. + :type page: int, optional + :param per_page: The number of rules to return per page. If ``per_page`` is not specified, the argument defaults to 100. + :type per_page: int, optional + :param sort: String for sort order, composed of field and sort order separated by a colon, for example ``name:asc``. Supported sort directions: ``asc`` , ``desc``. Supported fields: ``name`` , ``created_at``. + :type sort: str, optional + :param filters: JSON-encoded filter object. Supported keys: + + * ``text`` : Free-text query matched against rule name, tags, and recipients. + * ``tags`` : Array of strings. Return rules that have any of these tags. + * ``recipients`` : Array of strings. Return rules that have any of these recipients. + :type filters: str, optional :param include: Comma-separated list of resource paths for related resources to include in the response. Supported resource path is ``created_by``. :type include: str, optional :rtype: MonitorNotificationRuleListResponse """ kwargs: Dict[str, Any] = {} + if page is not unset: + kwargs["page"] = page + + if per_page is not unset: + kwargs["per_page"] = per_page + + if sort is not unset: + kwargs["sort"] = sort + + if filters is not unset: + kwargs["filters"] = filters + if include is not unset: kwargs["include"] = include