Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 13 additions & 73 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1051,20 +1051,6 @@ components:
example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
format: uuid
type: string
OrgGroupInclude:
description: >-
List of related resources to include.
explode: false
in: query
name: include
required: false
schema:
example:
- memberships
items:
$ref: "#/components/schemas/OrgGroupIncludeOption"
type: array
style: form
OrgGroupMembershipFilterOrgGroupId:
description: Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided.
in: query
Expand Down Expand Up @@ -59225,22 +59211,13 @@ components:
example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
format: uuid
type: string
relationships:
$ref: "#/components/schemas/OrgGroupRelationships"
type:
$ref: "#/components/schemas/OrgGroupType"
required:
- id
- type
- attributes
type: object
OrgGroupIncludeOption:
description: Allowed include options for org group endpoints.
enum:
- memberships
type: string
x-enum-varnames:
- MEMBERSHIPS
OrgGroupListResponse:
description: Response containing a list of org groups.
properties:
Expand All @@ -59249,11 +59226,6 @@ components:
items:
$ref: "#/components/schemas/OrgGroupData"
type: array
included:
description: Related resources included in the response when requested with the `include` parameter.
items:
$ref: "#/components/schemas/OrgGroupMembershipData"
type: array
links:
$ref: "#/components/schemas/OrgGroupPaginationLinks"
meta:
Expand Down Expand Up @@ -59380,20 +59352,6 @@ components:
required:
- data
type: object
OrgGroupMembershipRelationshipData:
description: A reference to an org group membership.
properties:
id:
description: The ID of the membership.
example: "f1e2d3c4-b5a6-7890-1234-567890abcdef"
format: uuid
type: string
type:
$ref: "#/components/schemas/OrgGroupMembershipType"
required:
- id
- type
type: object
OrgGroupMembershipRelationships:
description: Relationships of an org group membership.
properties:
Expand Down Expand Up @@ -59464,17 +59422,6 @@ components:
required:
- data
type: object
OrgGroupMembershipsRelationship:
description: Relationship to org group memberships.
properties:
data:
description: An array of membership relationship references.
items:
$ref: "#/components/schemas/OrgGroupMembershipRelationshipData"
type: array
required:
- data
type: object
OrgGroupPaginationLinks:
description: Pagination links for navigating between pages of an org group list response.
properties:
Expand Down Expand Up @@ -59708,18 +59655,18 @@ components:
- attributes
type: object
OrgGroupPolicyEnforcementTier:
default: DEFAULT
default: OVERRIDE_ALLOWED
description: >-
The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value.
The enforcement tier of the policy. `OVERRIDE_ALLOWED` means the policy is set but member orgs may mutate it. `GROUP_MANAGED` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value.
enum:
- DEFAULT
- ENFORCE
- OVERRIDE_ALLOWED
- GROUP_MANAGED
- DELEGATE
example: DEFAULT
example: OVERRIDE_ALLOWED
type: string
x-enum-varnames:
- DEFAULT
- ENFORCE
- OVERRIDE_ALLOWED
- GROUP_MANAGED
- DELEGATE
OrgGroupPolicyListResponse:
description: Response containing a list of org group policies.
Expand Down Expand Up @@ -60060,12 +60007,6 @@ components:
- id
- type
type: object
OrgGroupRelationships:
description: Relationships of an org group.
properties:
memberships:
$ref: "#/components/schemas/OrgGroupMembershipsRelationship"
type: object
OrgGroupResponse:
description: Response containing a single org group.
properties:
Expand Down Expand Up @@ -133887,7 +133828,7 @@ paths:
- attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
modified_at: "2024-01-15T10:30:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -133959,7 +133900,7 @@ paths:
attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
policy_name: "monitor_timezone"
policy_type: "org_config"
relationships:
Expand All @@ -133982,7 +133923,7 @@ paths:
attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
modified_at: "2024-01-15T10:30:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -134091,7 +134032,7 @@ paths:
attributes:
content:
value: "UTC"
enforcement_tier: "DEFAULT"
enforcement_tier: "OVERRIDE_ALLOWED"
modified_at: "2024-01-15T10:30:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -134155,7 +134096,7 @@ paths:
attributes:
content:
value: "US/Eastern"
enforcement_tier: "ENFORCE"
enforcement_tier: "GROUP_MANAGED"
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789"
type: org_group_policies
schema:
Expand All @@ -134172,7 +134113,7 @@ paths:
attributes:
content:
value: "US/Eastern"
enforcement_tier: "ENFORCE"
enforcement_tier: "GROUP_MANAGED"
modified_at: "2024-01-16T14:00:00Z"
policy_name: "monitor_timezone"
policy_type: "org_config"
Expand Down Expand Up @@ -134639,7 +134580,6 @@ paths:
- $ref: "#/components/parameters/OrgGroupPageNumber"
- $ref: "#/components/parameters/OrgGroupPageSize"
- $ref: "#/components/parameters/OrgGroupSort"
- $ref: "#/components/parameters/OrgGroupInclude"
responses:
"200":
content:
Expand Down
28 changes: 0 additions & 28 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25505,13 +25505,6 @@ datadog\_api\_client.v2.model.org\_group\_data module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_include\_option module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.org_group_include_option
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_list\_response module
---------------------------------------------------------------

Expand Down Expand Up @@ -25575,13 +25568,6 @@ datadog\_api\_client.v2.model.org\_group\_membership\_list\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_membership\_relationship\_data module
-------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.org_group_membership_relationship_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_membership\_relationships module
--------------------------------------------------------------------------

Expand Down Expand Up @@ -25631,13 +25617,6 @@ datadog\_api\_client.v2.model.org\_group\_membership\_update\_request module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_memberships\_relationship module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.org_group_memberships_relationship
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_pagination\_links module
------------------------------------------------------------------

Expand Down Expand Up @@ -25925,13 +25904,6 @@ datadog\_api\_client.v2.model.org\_group\_relationship\_to\_one\_data module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_relationships module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.org_group_relationships
:members:
:show-inheritance:

datadog\_api\_client.v2.model.org\_group\_response module
---------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/v2/org-groups/CreateOrgGroupPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
data=OrgGroupPolicyCreateData(
attributes=OrgGroupPolicyCreateAttributes(
content=dict([("value", "UTC")]),
enforcement_tier=OrgGroupPolicyEnforcementTier.DEFAULT,
enforcement_tier=OrgGroupPolicyEnforcementTier.OVERRIDE_ALLOWED,
policy_name="monitor_timezone",
policy_type=OrgGroupPolicyPolicyType.ORG_CONFIG,
),
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/org-groups/UpdateOrgGroupPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
data=OrgGroupPolicyUpdateData(
attributes=OrgGroupPolicyUpdateAttributes(
content=dict([("value", "UTC")]),
enforcement_tier=OrgGroupPolicyEnforcementTier.DEFAULT,
enforcement_tier=OrgGroupPolicyEnforcementTier.OVERRIDE_ALLOWED,
),
id=UUID("1a2b3c4d-5e6f-7890-abcd-ef0123456789"),
type=OrgGroupPolicyType.ORG_GROUP_POLICIES,
Expand Down
15 changes: 1 addition & 14 deletions src/datadog_api_client/v2/api/org_groups_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Any, Dict, List, Union
from typing import Any, Dict, Union

from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
from datadog_api_client.configuration import Configuration
Expand All @@ -30,7 +30,6 @@
from datadog_api_client.v2.model.org_group_policy_override_update_request import OrgGroupPolicyOverrideUpdateRequest
from datadog_api_client.v2.model.org_group_list_response import OrgGroupListResponse
from datadog_api_client.v2.model.org_group_sort_option import OrgGroupSortOption
from datadog_api_client.v2.model.org_group_include_option import OrgGroupIncludeOption
from datadog_api_client.v2.model.org_group_response import OrgGroupResponse
from datadog_api_client.v2.model.org_group_create_request import OrgGroupCreateRequest
from datadog_api_client.v2.model.org_group_update_request import OrgGroupUpdateRequest
Expand Down Expand Up @@ -484,12 +483,6 @@ def __init__(self, api_client=None):
"attribute": "sort",
"location": "query",
},
"include": {
"openapi_types": ([OrgGroupIncludeOption],),
"attribute": "include",
"location": "query",
"collection_format": "csv",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -929,7 +922,6 @@ def list_org_groups(
page_number: Union[int, UnsetType] = unset,
page_size: Union[int, UnsetType] = unset,
sort: Union[OrgGroupSortOption, UnsetType] = unset,
include: Union[List[OrgGroupIncludeOption], UnsetType] = unset,
) -> OrgGroupListResponse:
"""List org groups.

Expand All @@ -941,8 +933,6 @@ def list_org_groups(
:type page_size: int, optional
:param sort: Field to sort org groups by. Supported values: ``name`` , ``uuid`` , ``-name`` , ``-uuid``. Defaults to ``uuid``.
:type sort: OrgGroupSortOption, optional
:param include: List of related resources to include.
:type include: [OrgGroupIncludeOption], optional
:rtype: OrgGroupListResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -955,9 +945,6 @@ def list_org_groups(
if sort is not unset:
kwargs["sort"] = sort

if include is not unset:
kwargs["include"] = include

return self._list_org_groups_endpoint.call_with_http_info(**kwargs)

def update_org_group(
Expand Down
22 changes: 2 additions & 20 deletions src/datadog_api_client/v2/model/org_group_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,39 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
UUID,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.org_group_attributes import OrgGroupAttributes
from datadog_api_client.v2.model.org_group_relationships import OrgGroupRelationships
from datadog_api_client.v2.model.org_group_type import OrgGroupType


class OrgGroupData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.org_group_attributes import OrgGroupAttributes
from datadog_api_client.v2.model.org_group_relationships import OrgGroupRelationships
from datadog_api_client.v2.model.org_group_type import OrgGroupType

return {
"attributes": (OrgGroupAttributes,),
"id": (UUID,),
"relationships": (OrgGroupRelationships,),
"type": (OrgGroupType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"relationships": "relationships",
"type": "type",
}

def __init__(
self_,
attributes: OrgGroupAttributes,
id: UUID,
type: OrgGroupType,
relationships: Union[OrgGroupRelationships, UnsetType] = unset,
**kwargs,
):
def __init__(self_, attributes: OrgGroupAttributes, id: UUID, type: OrgGroupType, **kwargs):
"""
An org group resource.

Expand All @@ -58,14 +45,9 @@ def __init__(
:param id: The ID of the org group.
:type id: UUID

:param relationships: Relationships of an org group.
:type relationships: OrgGroupRelationships, optional

:param type: Org groups resource type.
:type type: OrgGroupType
"""
if relationships is not unset:
kwargs["relationships"] = relationships
super().__init__(kwargs)

self_.attributes = attributes
Expand Down
Loading
Loading