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
2 changes: 1 addition & 1 deletion examples/v2/org-groups/CreateOrgGroupPolicy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
content: {
"value": "UTC",
},
enforcement_tier: DatadogAPIClient::V2::OrgGroupPolicyEnforcementTier::DEFAULT,
enforcement_tier: DatadogAPIClient::V2::OrgGroupPolicyEnforcementTier::OVERRIDE_ALLOWED,
policy_name: "monitor_timezone",
policy_type: DatadogAPIClient::V2::OrgGroupPolicyPolicyType::ORG_CONFIG,
}),
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/org-groups/UpdateOrgGroupPolicy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
content: {
"value": "UTC",
},
enforcement_tier: DatadogAPIClient::V2::OrgGroupPolicyEnforcementTier::DEFAULT,
enforcement_tier: DatadogAPIClient::V2::OrgGroupPolicyEnforcementTier::OVERRIDE_ALLOWED,
}),
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
type: DatadogAPIClient::V2::OrgGroupPolicyType::ORG_GROUP_POLICIES,
Expand Down
1 change: 0 additions & 1 deletion features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4008,7 +4008,6 @@
"page_number" => "Integer",
"page_size" => "Integer",
"sort" => "OrgGroupSortOption",
"include" => "Array<OrgGroupIncludeOption>",
},
"v2.CreateOrgGroup" => {
"body" => "OrgGroupCreateRequest",
Expand Down
12 changes: 6 additions & 6 deletions features/v2/org_groups.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@ 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

@generated @skip @team:DataDog/org-management
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

@generated @skip @team:DataDog/org-management
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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
4 changes: 0 additions & 4 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4736,7 +4736,6 @@ def overrides
"v2.org_group_create_data" => "OrgGroupCreateData",
"v2.org_group_create_request" => "OrgGroupCreateRequest",
"v2.org_group_data" => "OrgGroupData",
"v2.org_group_include_option" => "OrgGroupIncludeOption",
"v2.org_group_list_response" => "OrgGroupListResponse",
"v2.org_group_membership_attributes" => "OrgGroupMembershipAttributes",
"v2.org_group_membership_bulk_update_attributes" => "OrgGroupMembershipBulkUpdateAttributes",
Expand All @@ -4746,11 +4745,9 @@ def overrides
"v2.org_group_membership_bulk_update_type" => "OrgGroupMembershipBulkUpdateType",
"v2.org_group_membership_data" => "OrgGroupMembershipData",
"v2.org_group_membership_list_response" => "OrgGroupMembershipListResponse",
"v2.org_group_membership_relationship_data" => "OrgGroupMembershipRelationshipData",
"v2.org_group_membership_relationships" => "OrgGroupMembershipRelationships",
"v2.org_group_membership_response" => "OrgGroupMembershipResponse",
"v2.org_group_membership_sort_option" => "OrgGroupMembershipSortOption",
"v2.org_group_memberships_relationship" => "OrgGroupMembershipsRelationship",
"v2.org_group_membership_type" => "OrgGroupMembershipType",
"v2.org_group_membership_update_data" => "OrgGroupMembershipUpdateData",
"v2.org_group_membership_update_relationships" => "OrgGroupMembershipUpdateRelationships",
Expand Down Expand Up @@ -4794,7 +4791,6 @@ def overrides
"v2.org_group_policy_update_attributes" => "OrgGroupPolicyUpdateAttributes",
"v2.org_group_policy_update_data" => "OrgGroupPolicyUpdateData",
"v2.org_group_policy_update_request" => "OrgGroupPolicyUpdateRequest",
"v2.org_group_relationships" => "OrgGroupRelationships",
"v2.org_group_relationship_to_one" => "OrgGroupRelationshipToOne",
"v2.org_group_relationship_to_one_data" => "OrgGroupRelationshipToOneData",
"v2.org_group_response" => "OrgGroupResponse",
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog_api_client/v2/api/org_groups_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,6 @@ def list_org_groups(opts = {})
# @option opts [Integer] :page_number The page number to return.
# @option opts [Integer] :page_size The number of items per page. Maximum is 1000.
# @option opts [OrgGroupSortOption] :sort Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.
# @option opts [Array<OrgGroupIncludeOption>] :include List of related resources to include.
# @return [Array<(OrgGroupListResponse, Integer, Hash)>] OrgGroupListResponse data, response status code and response headers
def list_org_groups_with_http_info(opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.list_org_groups".to_sym]
Expand Down Expand Up @@ -1203,7 +1202,6 @@ def list_org_groups_with_http_info(opts = {})
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
12 changes: 1 addition & 11 deletions lib/datadog_api_client/v2/models/org_group_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class OrgGroupData
# The ID of the org group.
attr_reader :id

# Relationships of an org group.
attr_accessor :relationships

# Org groups resource type.
attr_reader :type

Expand All @@ -41,7 +38,6 @@ def self.attribute_map
{
:'attributes' => :'attributes',
:'id' => :'id',
:'relationships' => :'relationships',
:'type' => :'type'
}
end
Expand All @@ -52,7 +48,6 @@ def self.openapi_types
{
:'attributes' => :'OrgGroupAttributes',
:'id' => :'UUID',
:'relationships' => :'OrgGroupRelationships',
:'type' => :'OrgGroupType'
}
end
Expand Down Expand Up @@ -83,10 +78,6 @@ def initialize(attributes = {})
self.id = attributes[:'id']
end

if attributes.key?(:'relationships')
self.relationships = attributes[:'relationships']
end

if attributes.key?(:'type')
self.type = attributes[:'type']
end
Expand Down Expand Up @@ -160,7 +151,6 @@ def ==(o)
self.class == o.class &&
attributes == o.attributes &&
id == o.id &&
relationships == o.relationships &&
type == o.type &&
additional_properties == o.additional_properties
end
Expand All @@ -169,7 +159,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[attributes, id, relationships, type, additional_properties].hash
[attributes, id, type, additional_properties].hash
end
end
end
Loading
Loading