Skip to content

Commit 5650b18

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Rename Tiers for Org Group Policies and Remove Include Memberships Support (#4240)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 9e5466f commit 5650b18

18 files changed

Lines changed: 34 additions & 323 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,20 +1051,6 @@ components:
10511051
example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
10521052
format: uuid
10531053
type: string
1054-
OrgGroupInclude:
1055-
description: >-
1056-
List of related resources to include.
1057-
explode: false
1058-
in: query
1059-
name: include
1060-
required: false
1061-
schema:
1062-
example:
1063-
- memberships
1064-
items:
1065-
$ref: "#/components/schemas/OrgGroupIncludeOption"
1066-
type: array
1067-
style: form
10681054
OrgGroupMembershipFilterOrgGroupId:
10691055
description: Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided.
10701056
in: query
@@ -59532,22 +59518,13 @@ components:
5953259518
example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
5953359519
format: uuid
5953459520
type: string
59535-
relationships:
59536-
$ref: "#/components/schemas/OrgGroupRelationships"
5953759521
type:
5953859522
$ref: "#/components/schemas/OrgGroupType"
5953959523
required:
5954059524
- id
5954159525
- type
5954259526
- attributes
5954359527
type: object
59544-
OrgGroupIncludeOption:
59545-
description: Allowed include options for org group endpoints.
59546-
enum:
59547-
- memberships
59548-
type: string
59549-
x-enum-varnames:
59550-
- MEMBERSHIPS
5955159528
OrgGroupListResponse:
5955259529
description: Response containing a list of org groups.
5955359530
properties:
@@ -59556,11 +59533,6 @@ components:
5955659533
items:
5955759534
$ref: "#/components/schemas/OrgGroupData"
5955859535
type: array
59559-
included:
59560-
description: Related resources included in the response when requested with the `include` parameter.
59561-
items:
59562-
$ref: "#/components/schemas/OrgGroupMembershipData"
59563-
type: array
5956459536
links:
5956559537
$ref: "#/components/schemas/OrgGroupPaginationLinks"
5956659538
meta:
@@ -59687,20 +59659,6 @@ components:
5968759659
required:
5968859660
- data
5968959661
type: object
59690-
OrgGroupMembershipRelationshipData:
59691-
description: A reference to an org group membership.
59692-
properties:
59693-
id:
59694-
description: The ID of the membership.
59695-
example: "f1e2d3c4-b5a6-7890-1234-567890abcdef"
59696-
format: uuid
59697-
type: string
59698-
type:
59699-
$ref: "#/components/schemas/OrgGroupMembershipType"
59700-
required:
59701-
- id
59702-
- type
59703-
type: object
5970459662
OrgGroupMembershipRelationships:
5970559663
description: Relationships of an org group membership.
5970659664
properties:
@@ -59771,17 +59729,6 @@ components:
5977159729
required:
5977259730
- data
5977359731
type: object
59774-
OrgGroupMembershipsRelationship:
59775-
description: Relationship to org group memberships.
59776-
properties:
59777-
data:
59778-
description: An array of membership relationship references.
59779-
items:
59780-
$ref: "#/components/schemas/OrgGroupMembershipRelationshipData"
59781-
type: array
59782-
required:
59783-
- data
59784-
type: object
5978559732
OrgGroupPaginationLinks:
5978659733
description: Pagination links for navigating between pages of an org group list response.
5978759734
properties:
@@ -60015,18 +59962,18 @@ components:
6001559962
- attributes
6001659963
type: object
6001759964
OrgGroupPolicyEnforcementTier:
60018-
default: DEFAULT
59965+
default: OVERRIDE_ALLOWED
6001959966
description: >-
60020-
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.
59967+
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.
6002159968
enum:
60022-
- DEFAULT
60023-
- ENFORCE
59969+
- OVERRIDE_ALLOWED
59970+
- GROUP_MANAGED
6002459971
- DELEGATE
60025-
example: DEFAULT
59972+
example: OVERRIDE_ALLOWED
6002659973
type: string
6002759974
x-enum-varnames:
60028-
- DEFAULT
60029-
- ENFORCE
59975+
- OVERRIDE_ALLOWED
59976+
- GROUP_MANAGED
6003059977
- DELEGATE
6003159978
OrgGroupPolicyListResponse:
6003259979
description: Response containing a list of org group policies.
@@ -60367,12 +60314,6 @@ components:
6036760314
- id
6036860315
- type
6036960316
type: object
60370-
OrgGroupRelationships:
60371-
description: Relationships of an org group.
60372-
properties:
60373-
memberships:
60374-
$ref: "#/components/schemas/OrgGroupMembershipsRelationship"
60375-
type: object
6037660317
OrgGroupResponse:
6037760318
description: Response containing a single org group.
6037860319
properties:
@@ -134194,7 +134135,7 @@ paths:
134194134135
- attributes:
134195134136
content:
134196134137
value: "UTC"
134197-
enforcement_tier: "DEFAULT"
134138+
enforcement_tier: "OVERRIDE_ALLOWED"
134198134139
modified_at: "2024-01-15T10:30:00Z"
134199134140
policy_name: "monitor_timezone"
134200134141
policy_type: "org_config"
@@ -134266,7 +134207,7 @@ paths:
134266134207
attributes:
134267134208
content:
134268134209
value: "UTC"
134269-
enforcement_tier: "DEFAULT"
134210+
enforcement_tier: "OVERRIDE_ALLOWED"
134270134211
policy_name: "monitor_timezone"
134271134212
policy_type: "org_config"
134272134213
relationships:
@@ -134289,7 +134230,7 @@ paths:
134289134230
attributes:
134290134231
content:
134291134232
value: "UTC"
134292-
enforcement_tier: "DEFAULT"
134233+
enforcement_tier: "OVERRIDE_ALLOWED"
134293134234
modified_at: "2024-01-15T10:30:00Z"
134294134235
policy_name: "monitor_timezone"
134295134236
policy_type: "org_config"
@@ -134398,7 +134339,7 @@ paths:
134398134339
attributes:
134399134340
content:
134400134341
value: "UTC"
134401-
enforcement_tier: "DEFAULT"
134342+
enforcement_tier: "OVERRIDE_ALLOWED"
134402134343
modified_at: "2024-01-15T10:30:00Z"
134403134344
policy_name: "monitor_timezone"
134404134345
policy_type: "org_config"
@@ -134462,7 +134403,7 @@ paths:
134462134403
attributes:
134463134404
content:
134464134405
value: "US/Eastern"
134465-
enforcement_tier: "ENFORCE"
134406+
enforcement_tier: "GROUP_MANAGED"
134466134407
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789"
134467134408
type: org_group_policies
134468134409
schema:
@@ -134479,7 +134420,7 @@ paths:
134479134420
attributes:
134480134421
content:
134481134422
value: "US/Eastern"
134482-
enforcement_tier: "ENFORCE"
134423+
enforcement_tier: "GROUP_MANAGED"
134483134424
modified_at: "2024-01-16T14:00:00Z"
134484134425
policy_name: "monitor_timezone"
134485134426
policy_type: "org_config"
@@ -134946,7 +134887,6 @@ paths:
134946134887
- $ref: "#/components/parameters/OrgGroupPageNumber"
134947134888
- $ref: "#/components/parameters/OrgGroupPageSize"
134948134889
- $ref: "#/components/parameters/OrgGroupSort"
134949-
- $ref: "#/components/parameters/OrgGroupInclude"
134950134890
responses:
134951134891
"200":
134952134892
content:

examples/v2/org-groups/CreateOrgGroupPolicy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const params: v2.OrgGroupsApiCreateOrgGroupPolicyRequest = {
1515
content: {
1616
value: "UTC",
1717
},
18-
enforcementTier: "DEFAULT",
18+
enforcementTier: "OVERRIDE_ALLOWED",
1919
policyName: "monitor_timezone",
2020
policyType: "org_config",
2121
},

examples/v2/org-groups/UpdateOrgGroupPolicy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const params: v2.OrgGroupsApiUpdateOrgGroupPolicyRequest = {
1515
content: {
1616
value: "UTC",
1717
},
18-
enforcementTier: "DEFAULT",
18+
enforcementTier: "OVERRIDE_ALLOWED",
1919
},
2020
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
2121
type: "org_group_policies",

features/support/scenarios_model_mapping.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11336,10 +11336,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1133611336
"type": "OrgGroupSortOption",
1133711337
"format": "",
1133811338
},
11339-
"include": {
11340-
"type": "Array<OrgGroupIncludeOption>",
11341-
"format": "",
11342-
},
1134311339
"operationResponseType": "OrgGroupListResponse",
1134411340
},
1134511341
"v2.CreateOrgGroup": {

features/v2/org_groups.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,23 @@ Feature: Org Groups
6060
Scenario: Create an org group policy returns "Bad Request" response
6161
Given operation "CreateOrgGroupPolicy" enabled
6262
And new "CreateOrgGroupPolicy" request
63-
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"}}
63+
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"}}
6464
When the request is sent
6565
Then the response status is 400 Bad Request
6666

6767
@generated @skip @team:DataDog/org-management
6868
Scenario: Create an org group policy returns "Conflict" response
6969
Given operation "CreateOrgGroupPolicy" enabled
7070
And new "CreateOrgGroupPolicy" request
71-
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"}}
71+
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"}}
7272
When the request is sent
7373
Then the response status is 409 Conflict
7474

7575
@generated @skip @team:DataDog/org-management
7676
Scenario: Create an org group policy returns "Created" response
7777
Given operation "CreateOrgGroupPolicy" enabled
7878
And new "CreateOrgGroupPolicy" request
79-
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"}}
79+
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"}}
8080
When the request is sent
8181
Then the response status is 201 Created
8282

@@ -398,7 +398,7 @@ Feature: Org Groups
398398
Given operation "UpdateOrgGroupPolicy" enabled
399399
And new "UpdateOrgGroupPolicy" request
400400
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
401-
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
401+
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
402402
When the request is sent
403403
Then the response status is 400 Bad Request
404404

@@ -407,7 +407,7 @@ Feature: Org Groups
407407
Given operation "UpdateOrgGroupPolicy" enabled
408408
And new "UpdateOrgGroupPolicy" request
409409
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
410-
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
410+
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
411411
When the request is sent
412412
Then the response status is 404 Not Found
413413

@@ -416,7 +416,7 @@ Feature: Org Groups
416416
Given operation "UpdateOrgGroupPolicy" enabled
417417
And new "UpdateOrgGroupPolicy" request
418418
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
419-
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
419+
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "OVERRIDE_ALLOWED"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
420420
When the request is sent
421421
Then the response status is 200 OK
422422

packages/datadog-api-client-v2/apis/OrgGroupsApi.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { ApiException } from "../../datadog-api-client-common/exception";
1919
import { APIErrorResponse } from "../models/APIErrorResponse";
2020
import { JSONAPIErrorResponse } from "../models/JSONAPIErrorResponse";
2121
import { OrgGroupCreateRequest } from "../models/OrgGroupCreateRequest";
22-
import { OrgGroupIncludeOption } from "../models/OrgGroupIncludeOption";
2322
import { OrgGroupListResponse } from "../models/OrgGroupListResponse";
2423
import { OrgGroupMembershipBulkUpdateRequest } from "../models/OrgGroupMembershipBulkUpdateRequest";
2524
import { OrgGroupMembershipListResponse } from "../models/OrgGroupMembershipListResponse";
@@ -794,7 +793,6 @@ export class OrgGroupsApiRequestFactory extends BaseAPIRequestFactory {
794793
pageNumber?: number,
795794
pageSize?: number,
796795
sort?: OrgGroupSortOption,
797-
include?: Array<OrgGroupIncludeOption>,
798796
_options?: Configuration
799797
): Promise<RequestContext> {
800798
const _config = _options || this.configuration;
@@ -836,13 +834,6 @@ export class OrgGroupsApiRequestFactory extends BaseAPIRequestFactory {
836834
""
837835
);
838836
}
839-
if (include !== undefined) {
840-
requestContext.setQueryParam(
841-
"include",
842-
ObjectSerializer.serialize(include, "Array<OrgGroupIncludeOption>", ""),
843-
"csv"
844-
);
845-
}
846837

847838
// Apply auth methods
848839
applySecurityAuthentication(_config, requestContext, [
@@ -2964,11 +2955,6 @@ export interface OrgGroupsApiListOrgGroupsRequest {
29642955
* @type OrgGroupSortOption
29652956
*/
29662957
sort?: OrgGroupSortOption;
2967-
/**
2968-
* List of related resources to include.
2969-
* @type Array<OrgGroupIncludeOption>
2970-
*/
2971-
include?: Array<OrgGroupIncludeOption>;
29722958
}
29732959

29742960
export interface OrgGroupsApiUpdateOrgGroupRequest {
@@ -3384,7 +3370,6 @@ export class OrgGroupsApi {
33843370
param.pageNumber,
33853371
param.pageSize,
33863372
param.sort,
3387-
param.include,
33883373
options
33893374
);
33903375
return requestContextPromise.then((requestContext) => {

packages/datadog-api-client-v2/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5135,7 +5135,6 @@ export { OrgGroupCreateAttributes } from "./models/OrgGroupCreateAttributes";
51355135
export { OrgGroupCreateData } from "./models/OrgGroupCreateData";
51365136
export { OrgGroupCreateRequest } from "./models/OrgGroupCreateRequest";
51375137
export { OrgGroupData } from "./models/OrgGroupData";
5138-
export { OrgGroupIncludeOption } from "./models/OrgGroupIncludeOption";
51395138
export { OrgGroupListResponse } from "./models/OrgGroupListResponse";
51405139
export { OrgGroupMembershipAttributes } from "./models/OrgGroupMembershipAttributes";
51415140
export { OrgGroupMembershipBulkUpdateAttributes } from "./models/OrgGroupMembershipBulkUpdateAttributes";
@@ -5145,11 +5144,9 @@ export { OrgGroupMembershipBulkUpdateRequest } from "./models/OrgGroupMembership
51455144
export { OrgGroupMembershipBulkUpdateType } from "./models/OrgGroupMembershipBulkUpdateType";
51465145
export { OrgGroupMembershipData } from "./models/OrgGroupMembershipData";
51475146
export { OrgGroupMembershipListResponse } from "./models/OrgGroupMembershipListResponse";
5148-
export { OrgGroupMembershipRelationshipData } from "./models/OrgGroupMembershipRelationshipData";
51495147
export { OrgGroupMembershipRelationships } from "./models/OrgGroupMembershipRelationships";
51505148
export { OrgGroupMembershipResponse } from "./models/OrgGroupMembershipResponse";
51515149
export { OrgGroupMembershipSortOption } from "./models/OrgGroupMembershipSortOption";
5152-
export { OrgGroupMembershipsRelationship } from "./models/OrgGroupMembershipsRelationship";
51535150
export { OrgGroupMembershipType } from "./models/OrgGroupMembershipType";
51545151
export { OrgGroupMembershipUpdateData } from "./models/OrgGroupMembershipUpdateData";
51555152
export { OrgGroupMembershipUpdateRelationships } from "./models/OrgGroupMembershipUpdateRelationships";
@@ -5193,7 +5190,6 @@ export { OrgGroupPolicyType } from "./models/OrgGroupPolicyType";
51935190
export { OrgGroupPolicyUpdateAttributes } from "./models/OrgGroupPolicyUpdateAttributes";
51945191
export { OrgGroupPolicyUpdateData } from "./models/OrgGroupPolicyUpdateData";
51955192
export { OrgGroupPolicyUpdateRequest } from "./models/OrgGroupPolicyUpdateRequest";
5196-
export { OrgGroupRelationships } from "./models/OrgGroupRelationships";
51975193
export { OrgGroupRelationshipToOne } from "./models/OrgGroupRelationshipToOne";
51985194
export { OrgGroupRelationshipToOneData } from "./models/OrgGroupRelationshipToOneData";
51995195
export { OrgGroupResponse } from "./models/OrgGroupResponse";

0 commit comments

Comments
 (0)