Skip to content

Commit 75f7b6a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fc50686 of spec repo
1 parent fa30bee commit 75f7b6a

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58153,6 +58153,47 @@ paths:
5815358153
description: Returns a list of all monitor notification rules.
5815458154
operationId: GetMonitorNotificationRules
5815558155
parameters:
58156+
- description: The page to start paginating from. If `page` is not specified,
58157+
the argument defaults to the first page.
58158+
in: query
58159+
name: page
58160+
required: false
58161+
schema:
58162+
format: int32
58163+
maximum: 1000000
58164+
minimum: 0
58165+
type: integer
58166+
- description: The number of rules to return per page. If `per_page` is not
58167+
specified, the argument defaults to 100.
58168+
in: query
58169+
name: per_page
58170+
required: false
58171+
schema:
58172+
format: int32
58173+
maximum: 1000
58174+
minimum: 1
58175+
type: integer
58176+
- description: 'String for sort order, composed of field and sort order separated
58177+
by a colon, for example `name:asc`. Supported sort directions: `asc`, `desc`.
58178+
Supported fields: `name`, `created_at`.'
58179+
in: query
58180+
name: sort
58181+
required: false
58182+
schema:
58183+
type: string
58184+
- description: 'JSON-encoded filter object. Supported keys:
58185+
58186+
* `text`: Free-text query matched against rule name, tags, and recipients.
58187+
58188+
* `tags`: Array of strings. Return rules that have any of these tags.
58189+
58190+
* `recipients`: Array of strings. Return rules that have any of these recipients.'
58191+
example: '{"text":"error","tags":["env:prod","team:my-team"],"recipients":["slack-monitor-app","email@example.com"]}'
58192+
in: query
58193+
name: filters
58194+
required: false
58195+
schema:
58196+
type: string
5815658197
- description: 'Comma-separated list of resource paths for related resources
5815758198
to include in the response. Supported resource
5815858199

src/datadog_api_client/v2/api/monitors_api.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,34 @@ def __init__(self, api_client=None):
230230
"version": "v2",
231231
},
232232
params_map={
233+
"page": {
234+
"validation": {
235+
"inclusive_maximum": 1000000,
236+
"inclusive_minimum": 0,
237+
},
238+
"openapi_types": (int,),
239+
"attribute": "page",
240+
"location": "query",
241+
},
242+
"per_page": {
243+
"validation": {
244+
"inclusive_maximum": 1000,
245+
"inclusive_minimum": 1,
246+
},
247+
"openapi_types": (int,),
248+
"attribute": "per_page",
249+
"location": "query",
250+
},
251+
"sort": {
252+
"openapi_types": (str,),
253+
"attribute": "sort",
254+
"location": "query",
255+
},
256+
"filters": {
257+
"openapi_types": (str,),
258+
"attribute": "filters",
259+
"location": "query",
260+
},
233261
"include": {
234262
"openapi_types": (str,),
235263
"attribute": "include",
@@ -572,18 +600,46 @@ def get_monitor_notification_rule(
572600
def get_monitor_notification_rules(
573601
self,
574602
*,
603+
page: Union[int, UnsetType] = unset,
604+
per_page: Union[int, UnsetType] = unset,
605+
sort: Union[str, UnsetType] = unset,
606+
filters: Union[str, UnsetType] = unset,
575607
include: Union[str, UnsetType] = unset,
576608
) -> MonitorNotificationRuleListResponse:
577609
"""Get all monitor notification rules.
578610
579611
Returns a list of all monitor notification rules.
580612
613+
:param page: The page to start paginating from. If ``page`` is not specified, the argument defaults to the first page.
614+
:type page: int, optional
615+
:param per_page: The number of rules to return per page. If ``per_page`` is not specified, the argument defaults to 100.
616+
:type per_page: int, optional
617+
: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``.
618+
:type sort: str, optional
619+
:param filters: JSON-encoded filter object. Supported keys:
620+
621+
* ``text`` : Free-text query matched against rule name, tags, and recipients.
622+
* ``tags`` : Array of strings. Return rules that have any of these tags.
623+
* ``recipients`` : Array of strings. Return rules that have any of these recipients.
624+
:type filters: str, optional
581625
:param include: Comma-separated list of resource paths for related resources to include in the response. Supported resource
582626
path is ``created_by``.
583627
:type include: str, optional
584628
:rtype: MonitorNotificationRuleListResponse
585629
"""
586630
kwargs: Dict[str, Any] = {}
631+
if page is not unset:
632+
kwargs["page"] = page
633+
634+
if per_page is not unset:
635+
kwargs["per_page"] = per_page
636+
637+
if sort is not unset:
638+
kwargs["sort"] = sort
639+
640+
if filters is not unset:
641+
kwargs["filters"] = filters
642+
587643
if include is not unset:
588644
kwargs["include"] = include
589645

0 commit comments

Comments
 (0)