Skip to content

Commit b139566

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 391935a of spec repo
1 parent 2639971 commit b139566

15 files changed

Lines changed: 354 additions & 36 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39639,8 +39639,6 @@ components:
3963939639
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsDiskType'
3964039640
when_full:
3964139641
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
39642-
required:
39643-
- max_size
3964439642
type: object
3964539643
ObservabilityPipelineElasticsearchDestination:
3964639644
description: 'The `elasticsearch` destination writes logs to an Elasticsearch
@@ -40894,8 +40892,6 @@ components:
4089440892
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
4089540893
when_full:
4089640894
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
40897-
required:
40898-
- max_size
4089940895
type: object
4090040896
ObservabilityPipelineMemoryBufferSizeOptions:
4090140897
description: Options for configuring a memory buffer by queue length.
@@ -40909,8 +40905,6 @@ components:
4090940905
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
4091040906
when_full:
4091140907
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
40912-
required:
40913-
- max_events
4091440908
type: object
4091540909
ObservabilityPipelineMetadataEntry:
4091640910
description: A custom metadata entry.
@@ -101133,7 +101127,13 @@ paths:
101133101127
application/json:
101134101128
schema:
101135101129
$ref: '#/components/schemas/UserTeamResponse'
101136-
description: Represents a user's association to a team
101130+
description: OK
101131+
'400':
101132+
content:
101133+
application/json:
101134+
schema:
101135+
$ref: '#/components/schemas/APIErrorResponse'
101136+
description: API error response.
101137101137
'403':
101138101138
$ref: '#/components/responses/ForbiddenResponse'
101139101139
'404':

examples/v2/teams/UpdateTeamMembership.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
2-
Update a user's membership attributes on a team returns "Represents a user's association to a team" response
2+
Update a user's membership attributes on a team 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.teams_api import TeamsApi
78
from datadog_api_client.v2.model.user_team_attributes import UserTeamAttributes
@@ -10,6 +11,12 @@
1011
from datadog_api_client.v2.model.user_team_update import UserTeamUpdate
1112
from datadog_api_client.v2.model.user_team_update_request import UserTeamUpdateRequest
1213

14+
# there is a valid "dd_team" in the system
15+
DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"]
16+
17+
# there is a valid "user" in the system
18+
USER_DATA_ID = environ["USER_DATA_ID"]
19+
1320
body = UserTeamUpdateRequest(
1421
data=UserTeamUpdate(
1522
attributes=UserTeamAttributes(
@@ -22,6 +29,6 @@
2229
configuration = Configuration()
2330
with ApiClient(configuration) as api_client:
2431
api_instance = TeamsApi(api_client)
25-
response = api_instance.update_team_membership(team_id="team_id", user_id="user_id", body=body)
32+
response = api_instance.update_team_membership(team_id=DD_TEAM_DATA_ID, user_id=USER_DATA_ID, body=body)
2633

2734
print(response)

src/datadog_api_client/v2/model/observability_pipeline_buffer_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, **kwargs):
1616
Configuration for buffer settings on destination components.
1717
1818
:param max_size: Maximum size of the disk buffer.
19-
:type max_size: int
19+
:type max_size: int, optional
2020
2121
:param type: The type of the buffer that will be configured, a disk buffer.
2222
:type type: ObservabilityPipelineBufferOptionsDiskType, optional
@@ -25,7 +25,7 @@ def __init__(self, **kwargs):
2525
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
2626
2727
:param max_events: Maximum events for the memory buffer.
28-
:type max_events: int
28+
:type max_events: int, optional
2929
"""
3030
super().__init__(kwargs)
3131

src/datadog_api_client/v2/model/observability_pipeline_disk_buffer_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49-
max_size: int,
49+
max_size: Union[int, UnsetType] = unset,
5050
type: Union[ObservabilityPipelineBufferOptionsDiskType, UnsetType] = unset,
5151
when_full: Union[ObservabilityPipelineBufferOptionsWhenFull, UnsetType] = unset,
5252
**kwargs,
@@ -55,18 +55,18 @@ def __init__(
5555
Options for configuring a disk buffer.
5656
5757
:param max_size: Maximum size of the disk buffer.
58-
:type max_size: int
58+
:type max_size: int, optional
5959
6060
:param type: The type of the buffer that will be configured, a disk buffer.
6161
:type type: ObservabilityPipelineBufferOptionsDiskType, optional
6262
6363
:param when_full: Behavior when the buffer is full (block and stop accepting new events, or drop new events)
6464
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
6565
"""
66+
if max_size is not unset:
67+
kwargs["max_size"] = max_size
6668
if type is not unset:
6769
kwargs["type"] = type
6870
if when_full is not unset:
6971
kwargs["when_full"] = when_full
7072
super().__init__(kwargs)
71-
72-
self_.max_size = max_size

src/datadog_api_client/v2/model/observability_pipeline_memory_buffer_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49-
max_size: int,
49+
max_size: Union[int, UnsetType] = unset,
5050
type: Union[ObservabilityPipelineBufferOptionsMemoryType, UnsetType] = unset,
5151
when_full: Union[ObservabilityPipelineBufferOptionsWhenFull, UnsetType] = unset,
5252
**kwargs,
@@ -55,18 +55,18 @@ def __init__(
5555
Options for configuring a memory buffer by byte size.
5656
5757
:param max_size: Maximum size of the memory buffer.
58-
:type max_size: int
58+
:type max_size: int, optional
5959
6060
:param type: The type of the buffer that will be configured, a memory buffer.
6161
:type type: ObservabilityPipelineBufferOptionsMemoryType, optional
6262
6363
:param when_full: Behavior when the buffer is full (block and stop accepting new events, or drop new events)
6464
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
6565
"""
66+
if max_size is not unset:
67+
kwargs["max_size"] = max_size
6668
if type is not unset:
6769
kwargs["type"] = type
6870
if when_full is not unset:
6971
kwargs["when_full"] = when_full
7072
super().__init__(kwargs)
71-
72-
self_.max_size = max_size

src/datadog_api_client/v2/model/observability_pipeline_memory_buffer_size_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def openapi_types(_):
4646

4747
def __init__(
4848
self_,
49-
max_events: int,
49+
max_events: Union[int, UnsetType] = unset,
5050
type: Union[ObservabilityPipelineBufferOptionsMemoryType, UnsetType] = unset,
5151
when_full: Union[ObservabilityPipelineBufferOptionsWhenFull, UnsetType] = unset,
5252
**kwargs,
@@ -55,18 +55,18 @@ def __init__(
5555
Options for configuring a memory buffer by queue length.
5656
5757
:param max_events: Maximum events for the memory buffer.
58-
:type max_events: int
58+
:type max_events: int, optional
5959
6060
:param type: The type of the buffer that will be configured, a memory buffer.
6161
:type type: ObservabilityPipelineBufferOptionsMemoryType, optional
6262
6363
:param when_full: Behavior when the buffer is full (block and stop accepting new events, or drop new events)
6464
:type when_full: ObservabilityPipelineBufferOptionsWhenFull, optional
6565
"""
66+
if max_events is not unset:
67+
kwargs["max_events"] = max_events
6668
if type is not unset:
6769
kwargs["type"] = type
6870
if when_full is not unset:
6971
kwargs["when_full"] = when_full
7072
super().__init__(kwargs)
71-
72-
self_.max_events = max_events
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-02-12T14:57:57.281Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"handle":"test-handle-d1ea4282abe3f68d","name":"test-name-d1ea4282abe3f68d"},"type":"team"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/team
11+
response:
12+
body:
13+
string: '{"data":{"id":"587b5f1a-b8ef-42b7-a99a-746cb80422a4","type":"team","attributes":{"avatar":null,"banner":6,"created_at":"2026-02-12T14:57:57.783497+00:00","description":null,"handle":"test-handle-d1ea4282abe3f68d","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-02-12T14:57:57.783497+00:00","name":"test-name-d1ea4282abe3f68d","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/587b5f1a-b8ef-42b7-a99a-746cb80422a4/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/587b5f1a-b8ef-42b7-a99a-746cb80422a4/permission-settings"}}}}}'
14+
headers:
15+
content-type:
16+
- application/vnd.api+json
17+
status:
18+
code: 201
19+
message: Created
20+
- request:
21+
body: '{"data":{"attributes":{"role":"admin"},"type":"team_memberships"}}'
22+
headers:
23+
accept:
24+
- application/json
25+
content-type:
26+
- application/json
27+
method: PATCH
28+
uri: https://api.datadoghq.com/api/v2/team/587b5f1a-b8ef-42b7-a99a-746cb80422a4/memberships/00000000-0000-dead-beef-000000000000
29+
response:
30+
body:
31+
string: '{"errors":["User for ID 00000000-0000-dead-beef-000000000000 not found"]}'
32+
headers:
33+
content-type:
34+
- application/json
35+
status:
36+
code: 404
37+
message: Not Found
38+
- request:
39+
body: null
40+
headers:
41+
accept:
42+
- '*/*'
43+
method: DELETE
44+
uri: https://api.datadoghq.com/api/v2/team/587b5f1a-b8ef-42b7-a99a-746cb80422a4
45+
response:
46+
body:
47+
string: ''
48+
headers: {}
49+
status:
50+
code: 204
51+
message: No Content
52+
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-02-12T14:59:46.756Z
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"handle":"test-handle-ae403c8f160ec46f","name":"test-name-ae403c8f160ec46f"},"type":"team"}}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v2/team
11+
response:
12+
body:
13+
string: '{"data":{"id":"38c0d1d3-69c0-4452-95a0-0115b22f2607","type":"team","attributes":{"avatar":null,"banner":13,"created_at":"2026-02-12T14:59:47.252294+00:00","description":null,"handle":"test-handle-ae403c8f160ec46f","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-02-12T14:59:47.252294+00:00","name":"test-name-ae403c8f160ec46f","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/38c0d1d3-69c0-4452-95a0-0115b22f2607/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/38c0d1d3-69c0-4452-95a0-0115b22f2607/permission-settings"}}}}}'
14+
headers:
15+
content-type:
16+
- application/vnd.api+json
17+
status:
18+
code: 201
19+
message: Created
20+
- request:
21+
body: '{"data":{"attributes":{"email":"Test-Update_a_user_s_membership_attributes_on_a_team_returns_OK_response-1770908386@datadoghq.com","title":"user
22+
title"},"type":"users"}}'
23+
headers:
24+
accept:
25+
- application/json
26+
content-type:
27+
- application/json
28+
method: POST
29+
uri: https://api.datadoghq.com/api/v2/users
30+
response:
31+
body:
32+
string: '{"data":{"type":"users","id":"3330c2ed-ac5d-458e-875b-ffc85c436edc","attributes":{"name":null,"handle":"test-update_a_user_s_membership_attributes_on_a_team_returns_ok_response-1770908386@datadoghq.com","created_at":"2026-02-12T14:59:47.812309+00:00","modified_at":"2026-02-12T14:59:47.812309+00:00","email":"test-update_a_user_s_membership_attributes_on_a_team_returns_ok_response-1770908386@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7906350a0aeb9c3285de81609654b5df?s=48&d=retro","title":"user
33+
title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 201
41+
message: Created
42+
- request:
43+
body: '{"data":{"attributes":{"role":"admin"},"relationships":{"user":{"data":{"id":"3330c2ed-ac5d-458e-875b-ffc85c436edc","type":"users"}}},"type":"team_memberships"}}'
44+
headers:
45+
accept:
46+
- application/json
47+
content-type:
48+
- application/json
49+
method: POST
50+
uri: https://api.datadoghq.com/api/v2/team/38c0d1d3-69c0-4452-95a0-0115b22f2607/memberships
51+
response:
52+
body:
53+
string: '{"data":{"id":"TeamMembership-38c0d1d3-69c0-4452-95a0-0115b22f2607-65393600","type":"team_memberships","attributes":{"provisioned_by":null,"provisioned_by_id":"3ad549bf-eba0-11e9-a77a-0705486660d0","role":"admin"},"relationships":{"user":{"data":{"id":"3330c2ed-ac5d-458e-875b-ffc85c436edc","type":"users"}}}},"included":[{"id":"3330c2ed-ac5d-458e-875b-ffc85c436edc","type":"users","attributes":{"disabled":false,"email":"test-update_a_user_s_membership_attributes_on_a_team_returns_ok_response-1770908386@datadoghq.com","handle":"test-update_a_user_s_membership_attributes_on_a_team_returns_ok_response-1770908386@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7906350a0aeb9c3285de81609654b5df?d=retro\u0026s=48","name":null,"service_account":false,"status":"Pending"}}]}'
54+
headers:
55+
content-type:
56+
- application/vnd.api+json
57+
status:
58+
code: 200
59+
message: OK
60+
- request:
61+
body: '{"data":{"attributes":{"role":"admin"},"type":"team_memberships"}}'
62+
headers:
63+
accept:
64+
- application/json
65+
content-type:
66+
- application/json
67+
method: PATCH
68+
uri: https://api.datadoghq.com/api/v2/team/38c0d1d3-69c0-4452-95a0-0115b22f2607/memberships/3330c2ed-ac5d-458e-875b-ffc85c436edc
69+
response:
70+
body:
71+
string: '{"data":{"type":"team_memberships","id":"TeamMembership-38c0d1d3-69c0-4452-95a0-0115b22f2607-65393600","attributes":{"role":"admin","provisioned_by":null,"provisioned_by_id":"3ad549bf-eba0-11e9-a77a-0705486660d0"},"relationships":{"user":{"data":{"type":"users","id":"3330c2ed-ac5d-458e-875b-ffc85c436edc"}}}},"included":[{"type":"users","id":"3330c2ed-ac5d-458e-875b-ffc85c436edc","attributes":{"name":null,"handle":"test-update_a_user_s_membership_attributes_on_a_team_returns_ok_response-1770908386@datadoghq.com","email":"test-update_a_user_s_membership_attributes_on_a_team_returns_ok_response-1770908386@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7906350a0aeb9c3285de81609654b5df?s=48&d=retro","disabled":false,"service_account":false}}]}
72+
73+
'
74+
headers:
75+
content-type:
76+
- application/json
77+
status:
78+
code: 200
79+
message: OK
80+
- request:
81+
body: null
82+
headers:
83+
accept:
84+
- '*/*'
85+
method: DELETE
86+
uri: https://api.datadoghq.com/api/v2/team/38c0d1d3-69c0-4452-95a0-0115b22f2607/memberships/3330c2ed-ac5d-458e-875b-ffc85c436edc
87+
response:
88+
body:
89+
string: ''
90+
headers: {}
91+
status:
92+
code: 204
93+
message: No Content
94+
- request:
95+
body: null
96+
headers:
97+
accept:
98+
- '*/*'
99+
method: DELETE
100+
uri: https://api.datadoghq.com/api/v2/users/3330c2ed-ac5d-458e-875b-ffc85c436edc
101+
response:
102+
body:
103+
string: ''
104+
headers: {}
105+
status:
106+
code: 204
107+
message: No Content
108+
- request:
109+
body: null
110+
headers:
111+
accept:
112+
- '*/*'
113+
method: DELETE
114+
uri: https://api.datadoghq.com/api/v2/team/38c0d1d3-69c0-4452-95a0-0115b22f2607
115+
response:
116+
body:
117+
string: ''
118+
headers: {}
119+
status:
120+
code: 204
121+
message: No Content
122+
version: 1

0 commit comments

Comments
 (0)