Skip to content

Commit 72d9898

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7fee5c9 of spec repo
1 parent 3803f85 commit 72d9898

6 files changed

Lines changed: 841 additions & 1 deletion

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174662,6 +174662,19 @@ paths:
174662174662
description: |-
174663174663
Returns a list of all permissions, including name, description, and ID.
174664174664
operationId: ListPermissions
174665+
parameters:
174666+
- description: |-
174667+
Set to `true` to return all permissions, including both permissions
174668+
that can be assigned to user roles and permissions that can only be
174669+
used as scopes for OAuth clients and scoped credentials. When `false`
174670+
(default), only permissions that can be assigned to user roles are
174671+
returned.
174672+
example: false
174673+
in: query
174674+
name: include_scopes
174675+
required: false
174676+
schema:
174677+
type: boolean
174665174678
responses:
174666174679
"200":
174667174680
content:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
List permissions including scopes returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.roles_api import RolesApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = RolesApi(api_client)
11+
response = api_instance.list_permissions(
12+
include_scopes=True,
13+
)
14+
15+
print(response)

src/datadog_api_client/v2/api/roles_api.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ def __init__(self, api_client=None):
199199
"http_method": "GET",
200200
"version": "v2",
201201
},
202-
params_map={},
202+
params_map={
203+
"include_scopes": {
204+
"openapi_types": (bool,),
205+
"attribute": "include_scopes",
206+
"location": "query",
207+
},
208+
},
203209
headers_map={
204210
"accept": ["application/json"],
205211
},
@@ -536,14 +542,25 @@ def get_role(
536542

537543
def list_permissions(
538544
self,
545+
*,
546+
include_scopes: Union[bool, UnsetType] = unset,
539547
) -> PermissionsResponse:
540548
"""List permissions.
541549
542550
Returns a list of all permissions, including name, description, and ID.
543551
552+
:param include_scopes: Set to ``true`` to return all permissions, including both permissions
553+
that can be assigned to user roles and permissions that can only be
554+
used as scopes for OAuth clients and scoped credentials. When ``false``
555+
(default), only permissions that can be assigned to user roles are
556+
returned.
557+
:type include_scopes: bool, optional
544558
:rtype: PermissionsResponse
545559
"""
546560
kwargs: Dict[str, Any] = {}
561+
if include_scopes is not unset:
562+
kwargs["include_scopes"] = include_scopes
563+
547564
return self._list_permissions_endpoint.call_with_http_info(**kwargs)
548565

549566
def list_role_permissions(
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-08-05T16:12:34.510Z

0 commit comments

Comments
 (0)