Skip to content

Commit e71e14c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7030c6b of spec repo
1 parent 8cd7203 commit e71e14c

File tree

26 files changed

+241
-59
lines changed

26 files changed

+241
-59
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17494,6 +17494,13 @@ components:
1749417494
format: date-time
1749517495
readOnly: true
1749617496
type: string
17497+
date_last_used:
17498+
description: Date the API Key was last used
17499+
example: '2020-11-27T10:00:00.000Z'
17500+
format: date-time
17501+
nullable: true
17502+
readOnly: true
17503+
type: string
1749717504
key:
1749817505
description: The API key.
1749917506
readOnly: true
@@ -17552,6 +17559,13 @@ components:
1755217559
minLength: 4
1755317560
readOnly: true
1755417561
type: string
17562+
last_used_at:
17563+
description: Last usage timestamp of the application key.
17564+
example: '2020-12-20T10:00:00.000Z'
17565+
format: date-time
17566+
nullable: true
17567+
readOnly: true
17568+
type: string
1755517569
name:
1755617570
description: Name of the application key.
1755717571
example: Application Key for managing dashboards
@@ -32736,6 +32750,13 @@ components:
3273632750
example: '2020-11-23T10:00:00.000Z'
3273732751
readOnly: true
3273832752
type: string
32753+
date_last_used:
32754+
description: Date the API Key was last used.
32755+
example: '2020-11-27T10:00:00.000Z'
32756+
format: date-time
32757+
nullable: true
32758+
readOnly: true
32759+
type: string
3273932760
last4:
3274032761
description: The last four characters of the API key.
3274132762
example: abcd
@@ -32784,6 +32805,12 @@ components:
3278432805
minLength: 4
3278532806
readOnly: true
3278632807
type: string
32808+
last_used_at:
32809+
description: Last usage timestamp of the application key.
32810+
example: '2020-12-20T10:00:00.000Z'
32811+
nullable: true
32812+
readOnly: true
32813+
type: string
3278732814
name:
3278832815
description: Name of the application key.
3278932816
example: Application Key for managing dashboards
@@ -35620,6 +35647,10 @@ components:
3562035647
format: date-time
3562135648
readOnly: true
3562235649
type: string
35650+
managed:
35651+
description: Whether or not the role is managed by Datadog.
35652+
readOnly: true
35653+
type: boolean
3562335654
modified_at:
3562435655
description: Time of last role modification.
3562535656
format: date-time

examples/v2/key-management/GetCurrentUserApplicationKey.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
Get one application key owned by current user returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client import ApiClient, Configuration
67
from datadog_api_client.v2.api.key_management_api import KeyManagementApi
78

9+
# there is a valid "application_key" in the system
10+
APPLICATION_KEY_DATA_ID = environ["APPLICATION_KEY_DATA_ID"]
11+
812
configuration = Configuration()
913
with ApiClient(configuration) as api_client:
1014
api_instance = KeyManagementApi(api_client)
1115
response = api_instance.get_current_user_application_key(
12-
app_key_id="app_key_id",
16+
app_key_id=APPLICATION_KEY_DATA_ID,
1317
)
1418

1519
print(response)

src/datadog_api_client/v2/model/full_api_key_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
ModelNormal,
1010
cached_property,
1111
datetime,
12+
none_type,
1213
unset,
1314
UnsetType,
1415
)
@@ -27,6 +28,7 @@ def openapi_types(_):
2728
return {
2829
"category": (str,),
2930
"created_at": (datetime,),
31+
"date_last_used": (datetime, none_type),
3032
"key": (str,),
3133
"last4": (str,),
3234
"modified_at": (datetime,),
@@ -37,6 +39,7 @@ def openapi_types(_):
3739
attribute_map = {
3840
"category": "category",
3941
"created_at": "created_at",
42+
"date_last_used": "date_last_used",
4043
"key": "key",
4144
"last4": "last4",
4245
"modified_at": "modified_at",
@@ -45,6 +48,7 @@ def openapi_types(_):
4548
}
4649
read_only_vars = {
4750
"created_at",
51+
"date_last_used",
4852
"key",
4953
"last4",
5054
"modified_at",
@@ -54,6 +58,7 @@ def __init__(
5458
self_,
5559
category: Union[str, UnsetType] = unset,
5660
created_at: Union[datetime, UnsetType] = unset,
61+
date_last_used: Union[datetime, none_type, UnsetType] = unset,
5762
key: Union[str, UnsetType] = unset,
5863
last4: Union[str, UnsetType] = unset,
5964
modified_at: Union[datetime, UnsetType] = unset,
@@ -70,6 +75,9 @@ def __init__(
7075
:param created_at: Creation date of the API key.
7176
:type created_at: datetime, optional
7277
78+
:param date_last_used: Date the API Key was last used
79+
:type date_last_used: datetime, none_type, optional
80+
7381
:param key: The API key.
7482
:type key: str, optional
7583
@@ -89,6 +97,8 @@ def __init__(
8997
kwargs["category"] = category
9098
if created_at is not unset:
9199
kwargs["created_at"] = created_at
100+
if date_last_used is not unset:
101+
kwargs["date_last_used"] = date_last_used
92102
if key is not unset:
93103
kwargs["key"] = key
94104
if last4 is not unset:

src/datadog_api_client/v2/model/full_application_key_attributes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def openapi_types(_):
2929
"created_at": (datetime,),
3030
"key": (str,),
3131
"last4": (str,),
32+
"last_used_at": (datetime, none_type),
3233
"name": (str,),
3334
"scopes": ([str], none_type),
3435
}
@@ -37,20 +38,23 @@ def openapi_types(_):
3738
"created_at": "created_at",
3839
"key": "key",
3940
"last4": "last4",
41+
"last_used_at": "last_used_at",
4042
"name": "name",
4143
"scopes": "scopes",
4244
}
4345
read_only_vars = {
4446
"created_at",
4547
"key",
4648
"last4",
49+
"last_used_at",
4750
}
4851

4952
def __init__(
5053
self_,
5154
created_at: Union[datetime, UnsetType] = unset,
5255
key: Union[str, UnsetType] = unset,
5356
last4: Union[str, UnsetType] = unset,
57+
last_used_at: Union[datetime, none_type, UnsetType] = unset,
5458
name: Union[str, UnsetType] = unset,
5559
scopes: Union[List[str], none_type, UnsetType] = unset,
5660
**kwargs,
@@ -67,6 +71,9 @@ def __init__(
6771
:param last4: The last four characters of the application key.
6872
:type last4: str, optional
6973
74+
:param last_used_at: Last usage timestamp of the application key.
75+
:type last_used_at: datetime, none_type, optional
76+
7077
:param name: Name of the application key.
7178
:type name: str, optional
7279
@@ -79,6 +86,8 @@ def __init__(
7986
kwargs["key"] = key
8087
if last4 is not unset:
8188
kwargs["last4"] = last4
89+
if last_used_at is not unset:
90+
kwargs["last_used_at"] = last_used_at
8291
if name is not unset:
8392
kwargs["name"] = name
8493
if scopes is not unset:

src/datadog_api_client/v2/model/partial_api_key_attributes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
datetime,
12+
none_type,
1113
unset,
1214
UnsetType,
1315
)
@@ -26,6 +28,7 @@ def openapi_types(_):
2628
return {
2729
"category": (str,),
2830
"created_at": (str,),
31+
"date_last_used": (datetime, none_type),
2932
"last4": (str,),
3033
"modified_at": (str,),
3134
"name": (str,),
@@ -35,13 +38,15 @@ def openapi_types(_):
3538
attribute_map = {
3639
"category": "category",
3740
"created_at": "created_at",
41+
"date_last_used": "date_last_used",
3842
"last4": "last4",
3943
"modified_at": "modified_at",
4044
"name": "name",
4145
"remote_config_read_enabled": "remote_config_read_enabled",
4246
}
4347
read_only_vars = {
4448
"created_at",
49+
"date_last_used",
4550
"last4",
4651
"modified_at",
4752
}
@@ -50,6 +55,7 @@ def __init__(
5055
self_,
5156
category: Union[str, UnsetType] = unset,
5257
created_at: Union[str, UnsetType] = unset,
58+
date_last_used: Union[datetime, none_type, UnsetType] = unset,
5359
last4: Union[str, UnsetType] = unset,
5460
modified_at: Union[str, UnsetType] = unset,
5561
name: Union[str, UnsetType] = unset,
@@ -65,6 +71,9 @@ def __init__(
6571
:param created_at: Creation date of the API key.
6672
:type created_at: str, optional
6773
74+
:param date_last_used: Date the API Key was last used.
75+
:type date_last_used: datetime, none_type, optional
76+
6877
:param last4: The last four characters of the API key.
6978
:type last4: str, optional
7079
@@ -81,6 +90,8 @@ def __init__(
8190
kwargs["category"] = category
8291
if created_at is not unset:
8392
kwargs["created_at"] = created_at
93+
if date_last_used is not unset:
94+
kwargs["date_last_used"] = date_last_used
8495
if last4 is not unset:
8596
kwargs["last4"] = last4
8697
if modified_at is not unset:

src/datadog_api_client/v2/model/partial_application_key_attributes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,29 @@ def openapi_types(_):
2727
return {
2828
"created_at": (str,),
2929
"last4": (str,),
30+
"last_used_at": (str, none_type),
3031
"name": (str,),
3132
"scopes": ([str], none_type),
3233
}
3334

3435
attribute_map = {
3536
"created_at": "created_at",
3637
"last4": "last4",
38+
"last_used_at": "last_used_at",
3739
"name": "name",
3840
"scopes": "scopes",
3941
}
4042
read_only_vars = {
4143
"created_at",
4244
"last4",
45+
"last_used_at",
4346
}
4447

4548
def __init__(
4649
self_,
4750
created_at: Union[str, UnsetType] = unset,
4851
last4: Union[str, UnsetType] = unset,
52+
last_used_at: Union[str, none_type, UnsetType] = unset,
4953
name: Union[str, UnsetType] = unset,
5054
scopes: Union[List[str], none_type, UnsetType] = unset,
5155
**kwargs,
@@ -59,6 +63,9 @@ def __init__(
5963
:param last4: The last four characters of the application key.
6064
:type last4: str, optional
6165
66+
:param last_used_at: Last usage timestamp of the application key.
67+
:type last_used_at: str, none_type, optional
68+
6269
:param name: Name of the application key.
6370
:type name: str, optional
6471
@@ -69,6 +76,8 @@ def __init__(
6976
kwargs["created_at"] = created_at
7077
if last4 is not unset:
7178
kwargs["last4"] = last4
79+
if last_used_at is not unset:
80+
kwargs["last_used_at"] = last_used_at
7281
if name is not unset:
7382
kwargs["name"] = name
7483
if scopes is not unset:

src/datadog_api_client/v2/model/role_attributes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,30 @@ class RoleAttributes(ModelNormal):
1919
def openapi_types(_):
2020
return {
2121
"created_at": (datetime,),
22+
"managed": (bool,),
2223
"modified_at": (datetime,),
2324
"name": (str,),
2425
"user_count": (int,),
2526
}
2627

2728
attribute_map = {
2829
"created_at": "created_at",
30+
"managed": "managed",
2931
"modified_at": "modified_at",
3032
"name": "name",
3133
"user_count": "user_count",
3234
}
3335
read_only_vars = {
3436
"created_at",
37+
"managed",
3538
"modified_at",
3639
"user_count",
3740
}
3841

3942
def __init__(
4043
self_,
4144
created_at: Union[datetime, UnsetType] = unset,
45+
managed: Union[bool, UnsetType] = unset,
4246
modified_at: Union[datetime, UnsetType] = unset,
4347
name: Union[str, UnsetType] = unset,
4448
user_count: Union[int, UnsetType] = unset,
@@ -50,6 +54,9 @@ def __init__(
5054
:param created_at: Creation time of the role.
5155
:type created_at: datetime, optional
5256
57+
:param managed: Whether or not the role is managed by Datadog.
58+
:type managed: bool, optional
59+
5360
:param modified_at: Time of last role modification.
5461
:type modified_at: datetime, optional
5562
@@ -61,6 +68,8 @@ def __init__(
6168
"""
6269
if created_at is not unset:
6370
kwargs["created_at"] = created_at
71+
if managed is not unset:
72+
kwargs["managed"] = managed
6473
if modified_at is not unset:
6574
kwargs["modified_at"] = modified_at
6675
if name is not unset:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-05-12T09:52:14.640Z
1+
2025-09-08T09:24:43.356Z

0 commit comments

Comments
 (0)