Skip to content

Commit 7c8e566

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 988555f of spec repo
1 parent 911d6bd commit 7c8e566

17 files changed

Lines changed: 426 additions & 57 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 92 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68031,6 +68031,8 @@ components:
6803168031
properties:
6803268032
frequency:
6803368033
$ref: '#/components/schemas/TeamSyncAttributesFrequency'
68034+
selection_state:
68035+
$ref: '#/components/schemas/TeamSyncAttributesSelectionState'
6803468036
source:
6803568037
$ref: '#/components/schemas/TeamSyncAttributesSource'
6803668038
sync_membership:
@@ -68054,6 +68056,15 @@ components:
6805468056
- ONCE
6805568057
- CONTINUOUSLY
6805668058
- PAUSED
68059+
TeamSyncAttributesSelectionState:
68060+
description: 'Specifies which teams or organizations to sync. When
68061+
68062+
provided, synchronization is limited to the specified
68063+
68064+
items and their subtrees.'
68065+
items:
68066+
$ref: '#/components/schemas/TeamSyncSelectionStateItem'
68067+
type: array
6805768068
TeamSyncAttributesSource:
6805868069
description: The external source platform for team synchronization. Only "github"
6805968070
is supported.
@@ -68126,6 +68137,78 @@ components:
6812668137
$ref: '#/components/schemas/TeamSyncData'
6812768138
type: array
6812868139
type: object
68140+
TeamSyncSelectionStateExternalId:
68141+
description: The external identifier for a team or organization in the source
68142+
platform.
68143+
properties:
68144+
type:
68145+
$ref: '#/components/schemas/TeamSyncSelectionStateExternalIdType'
68146+
value:
68147+
$ref: '#/components/schemas/TeamSyncSelectionStateExternalIdValue'
68148+
required:
68149+
- type
68150+
- value
68151+
type: object
68152+
TeamSyncSelectionStateExternalIdType:
68153+
description: 'The type of external identifier for the selection state item.
68154+
68155+
For GitHub synchronization, the allowed values are `team` and
68156+
68157+
`organization`.'
68158+
enum:
68159+
- team
68160+
- organization
68161+
example: team
68162+
type: string
68163+
x-enum-varnames:
68164+
- TEAM
68165+
- ORGANIZATION
68166+
TeamSyncSelectionStateExternalIdValue:
68167+
description: 'The external identifier value from the source
68168+
68169+
platform. For GitHub, this is the string
68170+
68171+
representation of a GitHub organization ID or team
68172+
68173+
ID.'
68174+
example: '1'
68175+
type: string
68176+
TeamSyncSelectionStateItem:
68177+
description: Identifies a team or organization hierarchy to include in synchronization.
68178+
properties:
68179+
external_id:
68180+
$ref: '#/components/schemas/TeamSyncSelectionStateExternalId'
68181+
operation:
68182+
$ref: '#/components/schemas/TeamSyncSelectionStateOperation'
68183+
scope:
68184+
$ref: '#/components/schemas/TeamSyncSelectionStateScope'
68185+
required:
68186+
- external_id
68187+
type: object
68188+
TeamSyncSelectionStateOperation:
68189+
description: 'The operation to perform on the selected hierarchy.
68190+
68191+
When set to `include`, synchronization covers the
68192+
68193+
referenced teams or organizations.'
68194+
enum:
68195+
- include
68196+
example: include
68197+
type: string
68198+
x-enum-varnames:
68199+
- INCLUDE
68200+
TeamSyncSelectionStateScope:
68201+
description: 'The scope of the selection. When set to `subtree`,
68202+
68203+
synchronization includes the referenced team or
68204+
68205+
organization and everything nested under it.'
68206+
enum:
68207+
- subtree
68208+
example: subtree
68209+
type: string
68210+
x-enum-varnames:
68211+
- SUBTREE
6812968212
TeamTarget:
6813068213
description: Represents a team target for an escalation policy step, including
6813168214
the team's ID and resource type.
@@ -107597,12 +107680,6 @@ paths:
107597107680
description: OK
107598107681
'403':
107599107682
$ref: '#/components/responses/ForbiddenResponse'
107600-
'404':
107601-
content:
107602-
application/json:
107603-
schema:
107604-
$ref: '#/components/schemas/APIErrorResponse'
107605-
description: Team sync configurations not found
107606107683
'429':
107607107684
$ref: '#/components/responses/TooManyRequestsResponse'
107608107685
security:
@@ -107634,6 +107711,13 @@ paths:
107634107711
or created.
107635107712

107636107713

107714+
Optionally, provide `selection_state` to limit synchronization
107715+
107716+
to specific teams or organizations and their subtrees, instead
107717+
107718+
of syncing all teams.
107719+
107720+
107637107721
[A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
107638107722

107639107723
and the GitHub App integrated with Datadog must have the `Members Read` permission.
@@ -107655,6 +107739,8 @@ paths:
107655107739
responses:
107656107740
'200':
107657107741
description: OK
107742+
'204':
107743+
description: No Content
107658107744
'403':
107659107745
$ref: '#/components/responses/ForbiddenResponse'
107660107746
'429':

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29929,6 +29929,41 @@ datadog\_api\_client.v2.model.team\_sync\_response module
2992929929
:members:
2993029930
:show-inheritance:
2993129931

29932+
datadog\_api\_client.v2.model.team\_sync\_selection\_state\_external\_id module
29933+
-------------------------------------------------------------------------------
29934+
29935+
.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_external_id
29936+
:members:
29937+
:show-inheritance:
29938+
29939+
datadog\_api\_client.v2.model.team\_sync\_selection\_state\_external\_id\_type module
29940+
-------------------------------------------------------------------------------------
29941+
29942+
.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_external_id_type
29943+
:members:
29944+
:show-inheritance:
29945+
29946+
datadog\_api\_client.v2.model.team\_sync\_selection\_state\_item module
29947+
-----------------------------------------------------------------------
29948+
29949+
.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_item
29950+
:members:
29951+
:show-inheritance:
29952+
29953+
datadog\_api\_client.v2.model.team\_sync\_selection\_state\_operation module
29954+
----------------------------------------------------------------------------
29955+
29956+
.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_operation
29957+
:members:
29958+
:show-inheritance:
29959+
29960+
datadog\_api\_client.v2.model.team\_sync\_selection\_state\_scope module
29961+
------------------------------------------------------------------------
29962+
29963+
.. automodule:: datadog_api_client.v2.model.team_sync_selection_state_scope
29964+
:members:
29965+
:show-inheritance:
29966+
2993229967
datadog\_api\_client.v2.model.team\_target module
2993329968
-------------------------------------------------
2993429969

examples/v2/teams/SyncTeams_3215592344.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/datadog_api_client/v2/api/teams_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,6 +1979,10 @@ def sync_teams(
19791979
19801980
This operation is read-only on the GitHub side, no teams will be modified or created.
19811981
1982+
Optionally, provide ``selection_state`` to limit synchronization
1983+
to specific teams or organizations and their subtrees, instead
1984+
of syncing all teams.
1985+
19821986
`A GitHub organization must be connected to your Datadog account <https://docs.datadoghq.com/integrations/github/>`_ ,
19831987
and the GitHub App integrated with Datadog must have the ``Members Read`` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug
19841988
using a normalized exact match; case is ignored and spaces are removed. No modifications are made

src/datadog_api_client/v2/model/team_sync_attributes.py

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

6-
from typing import Union, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -15,6 +15,7 @@
1515

1616
if TYPE_CHECKING:
1717
from datadog_api_client.v2.model.team_sync_attributes_frequency import TeamSyncAttributesFrequency
18+
from datadog_api_client.v2.model.team_sync_selection_state_item import TeamSyncSelectionStateItem
1819
from datadog_api_client.v2.model.team_sync_attributes_source import TeamSyncAttributesSource
1920
from datadog_api_client.v2.model.team_sync_attributes_type import TeamSyncAttributesType
2021

@@ -23,18 +24,21 @@ class TeamSyncAttributes(ModelNormal):
2324
@cached_property
2425
def openapi_types(_):
2526
from datadog_api_client.v2.model.team_sync_attributes_frequency import TeamSyncAttributesFrequency
27+
from datadog_api_client.v2.model.team_sync_selection_state_item import TeamSyncSelectionStateItem
2628
from datadog_api_client.v2.model.team_sync_attributes_source import TeamSyncAttributesSource
2729
from datadog_api_client.v2.model.team_sync_attributes_type import TeamSyncAttributesType
2830

2931
return {
3032
"frequency": (TeamSyncAttributesFrequency,),
33+
"selection_state": ([TeamSyncSelectionStateItem],),
3134
"source": (TeamSyncAttributesSource,),
3235
"sync_membership": (bool,),
3336
"type": (TeamSyncAttributesType,),
3437
}
3538

3639
attribute_map = {
3740
"frequency": "frequency",
41+
"selection_state": "selection_state",
3842
"source": "source",
3943
"sync_membership": "sync_membership",
4044
"type": "type",
@@ -45,6 +49,7 @@ def __init__(
4549
source: TeamSyncAttributesSource,
4650
type: TeamSyncAttributesType,
4751
frequency: Union[TeamSyncAttributesFrequency, UnsetType] = unset,
52+
selection_state: Union[List[TeamSyncSelectionStateItem], UnsetType] = unset,
4853
sync_membership: Union[bool, UnsetType] = unset,
4954
**kwargs,
5055
):
@@ -54,6 +59,11 @@ def __init__(
5459
:param frequency: How often the sync process should be run. Defaults to ``once`` when not provided.
5560
:type frequency: TeamSyncAttributesFrequency, optional
5661
62+
:param selection_state: Specifies which teams or organizations to sync. When
63+
provided, synchronization is limited to the specified
64+
items and their subtrees.
65+
:type selection_state: [TeamSyncSelectionStateItem], optional
66+
5767
:param source: The external source platform for team synchronization. Only "github" is supported.
5868
:type source: TeamSyncAttributesSource
5969
@@ -65,6 +75,8 @@ def __init__(
6575
"""
6676
if frequency is not unset:
6777
kwargs["frequency"] = frequency
78+
if selection_state is not unset:
79+
kwargs["selection_state"] = selection_state
6880
if sync_membership is not unset:
6981
kwargs["sync_membership"] = sync_membership
7082
super().__init__(kwargs)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.team_sync_selection_state_external_id_type import (
16+
TeamSyncSelectionStateExternalIdType,
17+
)
18+
19+
20+
class TeamSyncSelectionStateExternalId(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.team_sync_selection_state_external_id_type import (
24+
TeamSyncSelectionStateExternalIdType,
25+
)
26+
27+
return {
28+
"type": (TeamSyncSelectionStateExternalIdType,),
29+
"value": (str,),
30+
}
31+
32+
attribute_map = {
33+
"type": "type",
34+
"value": "value",
35+
}
36+
37+
def __init__(self_, type: TeamSyncSelectionStateExternalIdType, value: str, **kwargs):
38+
"""
39+
The external identifier for a team or organization in the source platform.
40+
41+
:param type: The type of external identifier for the selection state item.
42+
For GitHub synchronization, the allowed values are ``team`` and
43+
``organization``.
44+
:type type: TeamSyncSelectionStateExternalIdType
45+
46+
:param value: The external identifier value from the source
47+
platform. For GitHub, this is the string
48+
representation of a GitHub organization ID or team
49+
ID.
50+
:type value: str
51+
"""
52+
super().__init__(kwargs)
53+
54+
self_.type = type
55+
self_.value = value
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class TeamSyncSelectionStateExternalIdType(ModelSimple):
16+
"""
17+
The type of external identifier for the selection state item.
18+
For GitHub synchronization, the allowed values are `team` and
19+
`organization`.
20+
21+
:param value: Must be one of ["team", "organization"].
22+
:type value: str
23+
"""
24+
25+
allowed_values = {
26+
"team",
27+
"organization",
28+
}
29+
TEAM: ClassVar["TeamSyncSelectionStateExternalIdType"]
30+
ORGANIZATION: ClassVar["TeamSyncSelectionStateExternalIdType"]
31+
32+
@cached_property
33+
def openapi_types(_):
34+
return {
35+
"value": (str,),
36+
}
37+
38+
39+
TeamSyncSelectionStateExternalIdType.TEAM = TeamSyncSelectionStateExternalIdType("team")
40+
TeamSyncSelectionStateExternalIdType.ORGANIZATION = TeamSyncSelectionStateExternalIdType("organization")

0 commit comments

Comments
 (0)