Skip to content

Commit 4e5bf63

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 59e36a8d of spec repo
1 parent 5aecaab commit 4e5bf63

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-02 14:39:45.568008",
8-
"spec_repo_commit": "b4e964b3"
7+
"regenerated": "2025-01-02 17:21:20.405019",
8+
"spec_repo_commit": "59e36a8d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-02 14:39:45.582278",
13-
"spec_repo_commit": "b4e964b3"
12+
"regenerated": "2025-01-02 17:21:20.421355",
13+
"spec_repo_commit": "59e36a8d"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40785,6 +40785,14 @@ paths:
4078540785
operationId: UpdateRestrictionPolicy
4078640786
parameters:
4078740787
- $ref: '#/components/parameters/ResourceID'
40788+
- description: Allows admins (users with the user_access_manage permission)
40789+
to remove their own access from the resource if set to `true`. By default,
40790+
this is set to `false`, preventing admins from locking themselves out.
40791+
in: query
40792+
name: allow_self_lockout
40793+
required: false
40794+
schema:
40795+
type: string
4078840796
requestBody:
4078940797
content:
4079040798
application/json:

src/datadog_api_client/v2/api/restriction_policies_api.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Any, Dict
6+
from typing import Any, Dict, Union
77

88
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
99
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.model_utils import (
11+
UnsetType,
12+
unset,
13+
)
1014
from datadog_api_client.v2.model.restriction_policy_response import RestrictionPolicyResponse
1115
from datadog_api_client.v2.model.restriction_policy_update_request import RestrictionPolicyUpdateRequest
1216

@@ -85,6 +89,11 @@ def __init__(self, api_client=None):
8589
"attribute": "resource_id",
8690
"location": "path",
8791
},
92+
"allow_self_lockout": {
93+
"openapi_types": (str,),
94+
"attribute": "allow_self_lockout",
95+
"location": "query",
96+
},
8897
"body": {
8998
"required": True,
9099
"openapi_types": (RestrictionPolicyUpdateRequest,),
@@ -133,6 +142,8 @@ def update_restriction_policy(
133142
self,
134143
resource_id: str,
135144
body: RestrictionPolicyUpdateRequest,
145+
*,
146+
allow_self_lockout: Union[str, UnsetType] = unset,
136147
) -> RestrictionPolicyResponse:
137148
"""Update a restriction policy.
138149
@@ -186,11 +197,16 @@ def update_restriction_policy(
186197
:type resource_id: str
187198
:param body: Restriction policy payload
188199
:type body: RestrictionPolicyUpdateRequest
200+
:param allow_self_lockout: Allows admins (users with the user_access_manage permission) to remove their own access from the resource if set to ``true``. By default, this is set to ``false`` , preventing admins from locking themselves out.
201+
:type allow_self_lockout: str, optional
189202
:rtype: RestrictionPolicyResponse
190203
"""
191204
kwargs: Dict[str, Any] = {}
192205
kwargs["resource_id"] = resource_id
193206

207+
if allow_self_lockout is not unset:
208+
kwargs["allow_self_lockout"] = allow_self_lockout
209+
194210
kwargs["body"] = body
195211

196212
return self._update_restriction_policy_endpoint.call_with_http_info(**kwargs)

0 commit comments

Comments
 (0)