diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 22fc243517..ae382a0be9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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 @@ -59225,8 +59211,6 @@ components: example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" format: uuid type: string - relationships: - $ref: "#/components/schemas/OrgGroupRelationships" type: $ref: "#/components/schemas/OrgGroupType" required: @@ -59234,13 +59218,6 @@ components: - 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: @@ -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: @@ -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: @@ -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: @@ -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. @@ -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: @@ -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" @@ -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: @@ -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" @@ -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" @@ -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: @@ -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" @@ -134639,7 +134580,6 @@ paths: - $ref: "#/components/parameters/OrgGroupPageNumber" - $ref: "#/components/parameters/OrgGroupPageSize" - $ref: "#/components/parameters/OrgGroupSort" - - $ref: "#/components/parameters/OrgGroupInclude" responses: "200": content: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index a9c9d2081c..1a117dfefd 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -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 --------------------------------------------------------------- @@ -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 -------------------------------------------------------------------------- @@ -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 ------------------------------------------------------------------ @@ -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 --------------------------------------------------------- diff --git a/examples/v2/org-groups/CreateOrgGroupPolicy.py b/examples/v2/org-groups/CreateOrgGroupPolicy.py index 3dc02d4898..c67c189f60 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicy.py +++ b/examples/v2/org-groups/CreateOrgGroupPolicy.py @@ -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, ), diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicy.py b/examples/v2/org-groups/UpdateOrgGroupPolicy.py index daffa940ce..5ece27800a 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicy.py +++ b/examples/v2/org-groups/UpdateOrgGroupPolicy.py @@ -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, diff --git a/src/datadog_api_client/v2/api/org_groups_api.py b/src/datadog_api_client/v2/api/org_groups_api.py index 229e082622..a83ec41f8f 100644 --- a/src/datadog_api_client/v2/api/org_groups_api.py +++ b/src/datadog_api_client/v2/api/org_groups_api.py @@ -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 @@ -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 @@ -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"], @@ -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. @@ -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] = {} @@ -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( diff --git a/src/datadog_api_client/v2/model/org_group_data.py b/src/datadog_api_client/v2/model/org_group_data.py index 05687d6267..7ca9738d7c 100644 --- a/src/datadog_api_client/v2/model/org_group_data.py +++ b/src/datadog_api_client/v2/model/org_group_data.py @@ -3,20 +3,17 @@ # 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 @@ -24,31 +21,21 @@ 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. @@ -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 diff --git a/src/datadog_api_client/v2/model/org_group_include_option.py b/src/datadog_api_client/v2/model/org_group_include_option.py deleted file mode 100644 index 12aaa46abd..0000000000 --- a/src/datadog_api_client/v2/model/org_group_include_option.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OrgGroupIncludeOption(ModelSimple): - """ - Allowed include options for org group endpoints. - - :param value: If omitted defaults to "memberships". Must be one of ["memberships"]. - :type value: str - """ - - allowed_values = { - "memberships", - } - MEMBERSHIPS: ClassVar["OrgGroupIncludeOption"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OrgGroupIncludeOption.MEMBERSHIPS = OrgGroupIncludeOption("memberships") diff --git a/src/datadog_api_client/v2/model/org_group_list_response.py b/src/datadog_api_client/v2/model/org_group_list_response.py index 4459581568..0ea740e75b 100644 --- a/src/datadog_api_client/v2/model/org_group_list_response.py +++ b/src/datadog_api_client/v2/model/org_group_list_response.py @@ -15,7 +15,6 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.org_group_data import OrgGroupData - from datadog_api_client.v2.model.org_group_membership_data import OrgGroupMembershipData from datadog_api_client.v2.model.org_group_pagination_links import OrgGroupPaginationLinks from datadog_api_client.v2.model.org_group_pagination_meta import OrgGroupPaginationMeta @@ -24,20 +23,17 @@ class OrgGroupListResponse(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.org_group_data import OrgGroupData - from datadog_api_client.v2.model.org_group_membership_data import OrgGroupMembershipData from datadog_api_client.v2.model.org_group_pagination_links import OrgGroupPaginationLinks from datadog_api_client.v2.model.org_group_pagination_meta import OrgGroupPaginationMeta return { "data": ([OrgGroupData],), - "included": ([OrgGroupMembershipData],), "links": (OrgGroupPaginationLinks,), "meta": (OrgGroupPaginationMeta,), } attribute_map = { "data": "data", - "included": "included", "links": "links", "meta": "meta", } @@ -45,7 +41,6 @@ def openapi_types(_): def __init__( self_, data: List[OrgGroupData], - included: Union[List[OrgGroupMembershipData], UnsetType] = unset, links: Union[OrgGroupPaginationLinks, UnsetType] = unset, meta: Union[OrgGroupPaginationMeta, UnsetType] = unset, **kwargs, @@ -56,17 +51,12 @@ def __init__( :param data: An array of org groups. :type data: [OrgGroupData] - :param included: Related resources included in the response when requested with the ``include`` parameter. - :type included: [OrgGroupMembershipData], optional - :param links: Pagination links for navigating between pages of an org group list response. :type links: OrgGroupPaginationLinks, optional :param meta: Pagination metadata for org group list responses. :type meta: OrgGroupPaginationMeta, optional """ - if included is not unset: - kwargs["included"] = included if links is not unset: kwargs["links"] = links if meta is not unset: diff --git a/src/datadog_api_client/v2/model/org_group_membership_relationship_data.py b/src/datadog_api_client/v2/model/org_group_membership_relationship_data.py deleted file mode 100644 index 0326d1dd5b..0000000000 --- a/src/datadog_api_client/v2/model/org_group_membership_relationship_data.py +++ /dev/null @@ -1,47 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_group_membership_type import OrgGroupMembershipType - - -class OrgGroupMembershipRelationshipData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_group_membership_type import OrgGroupMembershipType - - return { - "id": (UUID,), - "type": (OrgGroupMembershipType,), - } - - attribute_map = { - "id": "id", - "type": "type", - } - - def __init__(self_, id: UUID, type: OrgGroupMembershipType, **kwargs): - """ - A reference to an org group membership. - - :param id: The ID of the membership. - :type id: UUID - - :param type: Org group memberships resource type. - :type type: OrgGroupMembershipType - """ - super().__init__(kwargs) - - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/org_group_memberships_relationship.py b/src/datadog_api_client/v2/model/org_group_memberships_relationship.py deleted file mode 100644 index de695421c9..0000000000 --- a/src/datadog_api_client/v2/model/org_group_memberships_relationship.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_group_membership_relationship_data import OrgGroupMembershipRelationshipData - - -class OrgGroupMembershipsRelationship(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_group_membership_relationship_data import ( - OrgGroupMembershipRelationshipData, - ) - - return { - "data": ([OrgGroupMembershipRelationshipData],), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: List[OrgGroupMembershipRelationshipData], **kwargs): - """ - Relationship to org group memberships. - - :param data: An array of membership relationship references. - :type data: [OrgGroupMembershipRelationshipData] - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/org_group_policy_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_attributes.py index f4ae193af6..5d4f2286c2 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_attributes.py @@ -74,7 +74,7 @@ def __init__( :param content: The policy content as key-value pairs. :type content: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional - :param enforcement_tier: 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. + :param enforcement_tier: 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. :type enforcement_tier: OrgGroupPolicyEnforcementTier :param modified_at: Timestamp when the policy was last modified. diff --git a/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py index c910a111b1..72d6ae8038 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py @@ -71,7 +71,7 @@ def __init__( :param content: The policy content as key-value pairs. :type content: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)} - :param enforcement_tier: 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. + :param enforcement_tier: 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. :type enforcement_tier: OrgGroupPolicyEnforcementTier, optional :param policy_name: The name of the policy. diff --git a/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py b/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py index 8ca3c7f429..23d9fb7cd8 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py +++ b/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py @@ -14,19 +14,19 @@ class OrgGroupPolicyEnforcementTier(ModelSimple): """ - 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. - :param value: If omitted defaults to "DEFAULT". Must be one of ["DEFAULT", "ENFORCE", "DELEGATE"]. + :param value: If omitted defaults to "OVERRIDE_ALLOWED". Must be one of ["OVERRIDE_ALLOWED", "GROUP_MANAGED", "DELEGATE"]. :type value: str """ allowed_values = { - "DEFAULT", - "ENFORCE", + "OVERRIDE_ALLOWED", + "GROUP_MANAGED", "DELEGATE", } - DEFAULT: ClassVar["OrgGroupPolicyEnforcementTier"] - ENFORCE: ClassVar["OrgGroupPolicyEnforcementTier"] + OVERRIDE_ALLOWED: ClassVar["OrgGroupPolicyEnforcementTier"] + GROUP_MANAGED: ClassVar["OrgGroupPolicyEnforcementTier"] DELEGATE: ClassVar["OrgGroupPolicyEnforcementTier"] @cached_property @@ -36,6 +36,6 @@ def openapi_types(_): } -OrgGroupPolicyEnforcementTier.DEFAULT = OrgGroupPolicyEnforcementTier("DEFAULT") -OrgGroupPolicyEnforcementTier.ENFORCE = OrgGroupPolicyEnforcementTier("ENFORCE") +OrgGroupPolicyEnforcementTier.OVERRIDE_ALLOWED = OrgGroupPolicyEnforcementTier("OVERRIDE_ALLOWED") +OrgGroupPolicyEnforcementTier.GROUP_MANAGED = OrgGroupPolicyEnforcementTier("GROUP_MANAGED") OrgGroupPolicyEnforcementTier.DELEGATE = OrgGroupPolicyEnforcementTier("DELEGATE") diff --git a/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py index 5c296f1915..a19d656423 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py @@ -63,7 +63,7 @@ def __init__( :param content: The policy content as key-value pairs. :type content: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional - :param enforcement_tier: 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. + :param enforcement_tier: 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. :type enforcement_tier: OrgGroupPolicyEnforcementTier, optional """ if content is not unset: diff --git a/src/datadog_api_client/v2/model/org_group_relationships.py b/src/datadog_api_client/v2/model/org_group_relationships.py deleted file mode 100644 index 1c43ab4404..0000000000 --- a/src/datadog_api_client/v2/model/org_group_relationships.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_group_memberships_relationship import OrgGroupMembershipsRelationship - - -class OrgGroupRelationships(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_group_memberships_relationship import OrgGroupMembershipsRelationship - - return { - "memberships": (OrgGroupMembershipsRelationship,), - } - - attribute_map = { - "memberships": "memberships", - } - - def __init__(self_, memberships: Union[OrgGroupMembershipsRelationship, UnsetType] = unset, **kwargs): - """ - Relationships of an org group. - - :param memberships: Relationship to org group memberships. - :type memberships: OrgGroupMembershipsRelationship, optional - """ - if memberships is not unset: - kwargs["memberships"] = memberships - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 4eff8d2e25..a6a601d2a4 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -5192,7 +5192,6 @@ from datadog_api_client.v2.model.org_group_create_data import OrgGroupCreateData from datadog_api_client.v2.model.org_group_create_request import OrgGroupCreateRequest from datadog_api_client.v2.model.org_group_data import OrgGroupData -from datadog_api_client.v2.model.org_group_include_option import OrgGroupIncludeOption from datadog_api_client.v2.model.org_group_list_response import OrgGroupListResponse from datadog_api_client.v2.model.org_group_membership_attributes import OrgGroupMembershipAttributes from datadog_api_client.v2.model.org_group_membership_bulk_update_attributes import ( @@ -5206,7 +5205,6 @@ from datadog_api_client.v2.model.org_group_membership_bulk_update_type import OrgGroupMembershipBulkUpdateType from datadog_api_client.v2.model.org_group_membership_data import OrgGroupMembershipData from datadog_api_client.v2.model.org_group_membership_list_response import OrgGroupMembershipListResponse -from datadog_api_client.v2.model.org_group_membership_relationship_data import OrgGroupMembershipRelationshipData from datadog_api_client.v2.model.org_group_membership_relationships import OrgGroupMembershipRelationships from datadog_api_client.v2.model.org_group_membership_response import OrgGroupMembershipResponse from datadog_api_client.v2.model.org_group_membership_sort_option import OrgGroupMembershipSortOption @@ -5214,7 +5212,6 @@ from datadog_api_client.v2.model.org_group_membership_update_data import OrgGroupMembershipUpdateData from datadog_api_client.v2.model.org_group_membership_update_relationships import OrgGroupMembershipUpdateRelationships from datadog_api_client.v2.model.org_group_membership_update_request import OrgGroupMembershipUpdateRequest -from datadog_api_client.v2.model.org_group_memberships_relationship import OrgGroupMembershipsRelationship from datadog_api_client.v2.model.org_group_pagination_links import OrgGroupPaginationLinks from datadog_api_client.v2.model.org_group_pagination_meta import OrgGroupPaginationMeta from datadog_api_client.v2.model.org_group_pagination_meta_page import OrgGroupPaginationMetaPage @@ -5262,7 +5259,6 @@ from datadog_api_client.v2.model.org_group_policy_update_request import OrgGroupPolicyUpdateRequest from datadog_api_client.v2.model.org_group_relationship_to_one import OrgGroupRelationshipToOne from datadog_api_client.v2.model.org_group_relationship_to_one_data import OrgGroupRelationshipToOneData -from datadog_api_client.v2.model.org_group_relationships import OrgGroupRelationships from datadog_api_client.v2.model.org_group_response import OrgGroupResponse from datadog_api_client.v2.model.org_group_sort_option import OrgGroupSortOption from datadog_api_client.v2.model.org_group_type import OrgGroupType @@ -11814,7 +11810,6 @@ "OrgGroupCreateData", "OrgGroupCreateRequest", "OrgGroupData", - "OrgGroupIncludeOption", "OrgGroupListResponse", "OrgGroupMembershipAttributes", "OrgGroupMembershipBulkUpdateAttributes", @@ -11824,7 +11819,6 @@ "OrgGroupMembershipBulkUpdateType", "OrgGroupMembershipData", "OrgGroupMembershipListResponse", - "OrgGroupMembershipRelationshipData", "OrgGroupMembershipRelationships", "OrgGroupMembershipResponse", "OrgGroupMembershipSortOption", @@ -11832,7 +11826,6 @@ "OrgGroupMembershipUpdateData", "OrgGroupMembershipUpdateRelationships", "OrgGroupMembershipUpdateRequest", - "OrgGroupMembershipsRelationship", "OrgGroupPaginationLinks", "OrgGroupPaginationMeta", "OrgGroupPaginationMetaPage", @@ -11874,7 +11867,6 @@ "OrgGroupPolicyUpdateRequest", "OrgGroupRelationshipToOne", "OrgGroupRelationshipToOneData", - "OrgGroupRelationships", "OrgGroupResponse", "OrgGroupSortOption", "OrgGroupType", diff --git a/tests/v2/features/org_groups.feature b/tests/v2/features/org_groups.feature index b8c5fe1b61..58065ea87f 100644 --- a/tests/v2/features/org_groups.feature +++ b/tests/v2/features/org_groups.feature @@ -60,7 +60,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Bad Request" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -68,7 +68,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Conflict" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 409 Conflict @@ -76,7 +76,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Created" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 201 Created @@ -398,7 +398,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -407,7 +407,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 404 Not Found @@ -416,7 +416,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 200 OK