Skip to content

Commit cf488d0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 180d4fe of spec repo
1 parent 2bf3bac commit cf488d0

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ components:
16491649
type: string
16501650
ResourceID:
16511651
description: |-
1652-
Identifier, formatted as `type:id`. Supported types: `dashboard`, `integration-service`, `integration-webhook`, `notebook`, `powerpack`, `reference-table`, `security-rule`, `slo`, `synthetics-global-variable`, `synthetics-test`, `synthetics-private-location`, `monitor`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`, `cross-org-connection`, `spreadsheet`, `on-call-schedule`, `on-call-escalation-policy`, `on-call-team-routing-rules`, `logs-pipeline`, `case-management-project`, `monitor-notification-rule`, `status-page`, `feature-flag`.
1652+
Identifier, formatted as `type:id`. Supported types: `dashboard`, `integration-service`, `integration-webhook`, `notebook`, `powerpack`, `reference-table`, `security-rule`, `slo`, `synthetics-global-variable`, `synthetics-test`, `synthetics-private-location`, `monitor`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`, `cross-org-connection`, `spreadsheet`, `on-call-schedule`, `on-call-escalation-policy`, `on-call-team-routing-rules`, `logs-pipeline`, `case-management-project`, `monitor-notification-rule`, `status-page`, `feature-flag`, `network-path-config`.
16531653
example: "dashboard:abc-def-ghi"
16541654
in: path
16551655
name: resource_id
@@ -189204,6 +189204,7 @@ paths:
189204189204
- Monitor Notification Rules: `monitor-notification-rule`
189205189205
- Status Pages: `status-page`
189206189206
- Feature Flags: `feature-flag`
189207+
- Network Path Configs: `network-path-config`
189207189208

189208189209
#### Supported relations for resources
189209189210
Resource Type | Supported Relations
@@ -189235,6 +189236,7 @@ paths:
189235189236
Monitor Notification Rules | `viewer`, `editor`
189236189237
Status Pages | `viewer`, `responder`, `manager`
189237189238
Feature Flags | `viewer`, `contributor`, `editor`
189239+
Network Path Configs | `viewer`, `editor`
189238189240
operationId: UpdateRestrictionPolicy
189239189241
parameters:
189240189242
- $ref: "#/components/parameters/ResourceID"

src/datadog_api_client/v2/api/restriction_policies_api.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def delete_restriction_policy(
112112
113113
Deletes the restriction policy associated with a specified resource.
114114
115-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag``.
115+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
116116
:type resource_id: str
117117
:rtype: None
118118
"""
@@ -129,7 +129,7 @@ def get_restriction_policy(
129129
130130
Retrieves the restriction policy associated with a specified resource.
131131
132-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag``.
132+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
133133
:type resource_id: str
134134
:rtype: RestrictionPolicyResponse
135135
"""
@@ -180,6 +180,7 @@ def update_restriction_policy(
180180
* Monitor Notification Rules: ``monitor-notification-rule``
181181
* Status Pages: ``status-page``
182182
* Feature Flags: ``feature-flag``
183+
* Network Path Configs: ``network-path-config``
183184
184185
**Supported relations for resources**
185186
@@ -242,9 +243,11 @@ def update_restriction_policy(
242243
- ``viewer`` , ``responder`` , ``manager``
243244
* - Feature Flags
244245
- ``viewer`` , ``contributor`` , ``editor``
246+
* - Network Path Configs
247+
- ``viewer`` , ``editor``
245248
246249
247-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag``.
250+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``dashboard`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``powerpack`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``synthetics-global-variable`` , ``synthetics-test`` , ``synthetics-private-location`` , ``monitor`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection`` , ``spreadsheet`` , ``on-call-schedule`` , ``on-call-escalation-policy`` , ``on-call-team-routing-rules`` , ``logs-pipeline`` , ``case-management-project`` , ``monitor-notification-rule`` , ``status-page`` , ``feature-flag`` , ``network-path-config``.
248251
:type resource_id: str
249252
:param body: Restriction policy payload
250253
:type body: RestrictionPolicyUpdateRequest

tests/generated-test/test-server

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ def _json_contains(actual: Any, expected: Any) -> bool:
435435
return all(key in actual and _json_contains(actual[key], value) for key, value in expected.items())
436436
if isinstance(expected, list) and isinstance(actual, list):
437437
return len(expected) == len(actual) and all(
438-
_json_contains(actual_item, expected_item) for actual_item, expected_item in zip(actual, expected)
438+
_json_contains(actual_item, expected_item)
439+
for actual_item, expected_item in zip(actual, expected, strict=False)
439440
)
440441
return actual == expected
441442

@@ -460,7 +461,8 @@ def _slug(value: str) -> str:
460461

461462

462463
def _now_iso() -> str:
463-
return datetime.now(timezone.utc).isoformat().replace("+00:00", "Z")
464+
# datetime.UTC is Python 3.11+; this standalone runtime supports Python 3.10.
465+
return datetime.now(timezone.utc).isoformat().replace("+00:00", "Z") # noqa: UP017
464466

465467

466468
def _read_json(path: Path) -> dict[str, Any]:

0 commit comments

Comments
 (0)