From 0fed50a9c78554f2dceda4888ed03f04d2ba464d Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 9 Apr 2026 21:32:11 +0000 Subject: [PATCH] Regenerate client from commit b942564 of spec repo --- .generator/schemas/v2/openapi.yaml | 5599 ++++++++++++----- features/v2/org_groups.feature | 400 ++ features/v2/undo.json | 126 + packages/datadog-api-client/README.md | 1 + .../src/support/scenarios_model_mapping.ts | 198 + ...rvabilityPipelineParseGrokProcessorRule.ts | 2 +- services/org_groups/.yarnrc.yml | 1 + services/org_groups/README.md | 44 + services/org_groups/package.json | 43 + services/org_groups/src/index.ts | 3 + services/org_groups/src/v2/OrgGroupsApi.ts | 3300 ++++++++++ services/org_groups/src/v2/index.ts | 95 + .../src/v2/models/APIErrorResponse.ts | 45 + .../src/v2/models/GlobalOrgIdentifier.ts | 55 + .../src/v2/models/JSONAPIErrorItem.ts | 78 + .../src/v2/models/JSONAPIErrorItemSource.ts | 60 + .../src/v2/models/JSONAPIErrorResponse.ts | 47 + .../src/v2/models/OrgGroupAttributes.ts | 84 + .../src/v2/models/OrgGroupCreateAttributes.ts | 45 + .../src/v2/models/OrgGroupCreateData.ts | 57 + .../src/v2/models/OrgGroupCreateRequest.ts | 47 + .../org_groups/src/v2/models/OrgGroupData.ts | 76 + .../src/v2/models/OrgGroupIncludeOption.ts | 7 + .../src/v2/models/OrgGroupListResponse.ts | 65 + .../v2/models/OrgGroupMembershipAttributes.ts | 84 + .../OrgGroupMembershipBulkUpdateAttributes.ts | 47 + .../OrgGroupMembershipBulkUpdateData.ts | 67 + ...gGroupMembershipBulkUpdateRelationships.ts | 56 + .../OrgGroupMembershipBulkUpdateRequest.ts | 47 + .../OrgGroupMembershipBulkUpdateType.ts | 10 + .../src/v2/models/OrgGroupMembershipData.ts | 76 + .../models/OrgGroupMembershipListResponse.ts | 56 + .../OrgGroupMembershipRelationshipData.ts | 57 + .../models/OrgGroupMembershipRelationships.ts | 46 + .../v2/models/OrgGroupMembershipResponse.ts | 47 + .../v2/models/OrgGroupMembershipSortOption.ts | 15 + .../src/v2/models/OrgGroupMembershipType.ts | 9 + .../v2/models/OrgGroupMembershipUpdateData.ts | 67 + .../OrgGroupMembershipUpdateRelationships.ts | 47 + .../models/OrgGroupMembershipUpdateRequest.ts | 47 + .../models/OrgGroupMembershipsRelationship.ts | 47 + .../src/v2/models/OrgGroupPaginationMeta.ts | 47 + .../v2/models/OrgGroupPaginationMetaPage.ts | 46 + .../src/v2/models/OrgGroupPolicyAttributes.ts | 73 + .../models/OrgGroupPolicyConfigAttributes.ts | 81 + .../src/v2/models/OrgGroupPolicyConfigData.ts | 66 + .../OrgGroupPolicyConfigListResponse.ts | 47 + .../src/v2/models/OrgGroupPolicyConfigType.ts | 9 + .../models/OrgGroupPolicyCreateAttributes.ts | 54 + .../src/v2/models/OrgGroupPolicyCreateData.ts | 67 + .../OrgGroupPolicyCreateRelationships.ts | 47 + .../v2/models/OrgGroupPolicyCreateRequest.ts | 47 + .../src/v2/models/OrgGroupPolicyData.ts | 76 + .../v2/models/OrgGroupPolicyListResponse.ts | 56 + .../OrgGroupPolicyOverrideAttributes.ts | 83 + .../OrgGroupPolicyOverrideCreateAttributes.ts | 55 + .../OrgGroupPolicyOverrideCreateData.ts | 67 + ...gGroupPolicyOverrideCreateRelationships.ts | 57 + .../OrgGroupPolicyOverrideCreateRequest.ts | 47 + .../v2/models/OrgGroupPolicyOverrideData.ts | 76 + .../OrgGroupPolicyOverrideListResponse.ts | 56 + .../OrgGroupPolicyOverrideRelationships.ts | 55 + .../models/OrgGroupPolicyOverrideResponse.ts | 47 + .../OrgGroupPolicyOverrideSortOption.ts | 15 + .../v2/models/OrgGroupPolicyOverrideType.ts | 9 + .../OrgGroupPolicyOverrideUpdateAttributes.ts | 55 + .../OrgGroupPolicyOverrideUpdateData.ts | 67 + .../OrgGroupPolicyOverrideUpdateRequest.ts | 47 + .../models/OrgGroupPolicyRelationshipToOne.ts | 47 + .../OrgGroupPolicyRelationshipToOneData.ts | 57 + .../v2/models/OrgGroupPolicyRelationships.ts | 46 + .../src/v2/models/OrgGroupPolicyResponse.ts | 47 + .../src/v2/models/OrgGroupPolicySortOption.ts | 15 + .../src/v2/models/OrgGroupPolicyType.ts | 7 + .../models/OrgGroupPolicyUpdateAttributes.ts | 44 + .../src/v2/models/OrgGroupPolicyUpdateData.ts | 67 + .../v2/models/OrgGroupPolicyUpdateRequest.ts | 47 + .../v2/models/OrgGroupRelationshipToOne.ts | 47 + .../models/OrgGroupRelationshipToOneData.ts | 57 + .../src/v2/models/OrgGroupRelationships.ts | 46 + .../src/v2/models/OrgGroupResponse.ts | 47 + .../src/v2/models/OrgGroupSortOption.ts | 15 + .../org_groups/src/v2/models/OrgGroupType.ts | 7 + .../src/v2/models/OrgGroupUpdateAttributes.ts | 45 + .../src/v2/models/OrgGroupUpdateData.ts | 67 + .../src/v2/models/OrgGroupUpdateRequest.ts | 47 + .../org_groups/src/v2/models/TypingInfo.ts | 153 + services/org_groups/tsconfig.json | 28 + yarn.lock | 9 + 89 files changed, 12038 insertions(+), 1662 deletions(-) create mode 100644 features/v2/org_groups.feature create mode 100644 services/org_groups/.yarnrc.yml create mode 100644 services/org_groups/README.md create mode 100644 services/org_groups/package.json create mode 100644 services/org_groups/src/index.ts create mode 100644 services/org_groups/src/v2/OrgGroupsApi.ts create mode 100644 services/org_groups/src/v2/index.ts create mode 100644 services/org_groups/src/v2/models/APIErrorResponse.ts create mode 100644 services/org_groups/src/v2/models/GlobalOrgIdentifier.ts create mode 100644 services/org_groups/src/v2/models/JSONAPIErrorItem.ts create mode 100644 services/org_groups/src/v2/models/JSONAPIErrorItemSource.ts create mode 100644 services/org_groups/src/v2/models/JSONAPIErrorResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupCreateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupCreateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupCreateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupIncludeOption.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupListResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateType.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipListResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipRelationshipData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipSortOption.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipType.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipUpdateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipUpdateRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipUpdateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupMembershipsRelationship.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPaginationMeta.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPaginationMetaPage.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyConfigAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyConfigData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyConfigListResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyConfigType.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyCreateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyCreateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyCreateRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyCreateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyListResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideListResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideSortOption.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideType.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOne.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOneData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicySortOption.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyType.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyUpdateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyUpdateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupPolicyUpdateRequest.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupRelationshipToOne.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupRelationshipToOneData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupRelationships.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupResponse.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupSortOption.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupType.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupUpdateAttributes.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupUpdateData.ts create mode 100644 services/org_groups/src/v2/models/OrgGroupUpdateRequest.ts create mode 100644 services/org_groups/src/v2/models/TypingInfo.ts create mode 100644 services/org_groups/tsconfig.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4b6dc560f325..45e2c2e05299 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -790,6 +790,14 @@ components: required: true schema: type: string + MembershipSort: + description: >- + Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/OrgGroupMembershipSortOption" MetricID: description: The name of the log-based metric. in: path @@ -921,6 +929,148 @@ components: example: "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a" format: uuid type: string + OrgGroupId: + description: The ID of the org group. + in: path + name: org_group_id + required: true + schema: + 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 + name: filter[org_group_id] + required: false + schema: + example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + format: uuid + type: string + OrgGroupMembershipFilterOrgUuid: + description: Filter memberships by org UUID. Returns a single-item list. + in: query + name: filter[org_uuid] + required: false + schema: + example: "b2c3d4e5-f6a7-8901-bcde-f01234567890" + format: uuid + type: string + OrgGroupMembershipId: + description: The ID of the org group membership. + in: path + name: org_group_membership_id + required: true + schema: + example: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + format: uuid + type: string + OrgGroupPageNumber: + description: The page number to return. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 0 + format: int64 + minimum: 0 + type: integer + OrgGroupPageSize: + description: The number of items per page. Maximum is 1000. + in: query + name: page[size] + required: false + schema: + default: 50 + example: 50 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + OrgGroupPolicyFilterOrgGroupId: + description: Filter policies by org group ID. + in: query + name: filter[org_group_id] + required: true + schema: + example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + format: uuid + type: string + OrgGroupPolicyFilterPolicyName: + description: Filter policies by policy name. + in: query + name: filter[policy_name] + required: false + schema: + example: monitor_timezone + type: string + OrgGroupPolicyId: + description: The ID of the org group policy. + in: path + name: org_group_policy_id + required: true + schema: + example: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + format: uuid + type: string + OrgGroupPolicyOverrideFilterOrgGroupId: + description: Filter policy overrides by org group ID. + in: query + name: filter[org_group_id] + required: true + schema: + example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + format: uuid + type: string + OrgGroupPolicyOverrideFilterPolicyId: + description: Filter policy overrides by policy ID. + in: query + name: filter[policy_id] + required: false + schema: + example: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + format: uuid + type: string + OrgGroupPolicyOverrideId: + description: The ID of the org group policy override. + in: path + name: org_group_policy_override_id + required: true + schema: + example: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + format: uuid + type: string + OrgGroupSort: + description: >- + Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/OrgGroupSortOption" + OverrideSort: + description: >- + Field to sort overrides by. Supported values: `id`, `org_uuid`, `-id`, `-org_uuid`. Defaults to `id`. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/OrgGroupPolicyOverrideSortOption" PageNumber: description: Specific page number to return. in: query @@ -959,6 +1109,14 @@ components: required: true schema: type: string + PolicySort: + description: >- + Field to sort policies by. Supported values: `id`, `name`, `-id`, `-name`. Defaults to `id`. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/OrgGroupPolicySortOption" ProductName: description: Name of the product to be deleted, either `logs` or `rum`. in: path @@ -29692,6 +29850,22 @@ components: type: string x-enum-varnames: - INCIDENTS_GLOBAL_SETTINGS + GlobalOrgIdentifier: + description: A unique identifier for an organization including its site. + properties: + org_site: + description: The site of the organization. + example: "datadoghq.com" + type: string + org_uuid: + description: The UUID of the organization. + example: "c3d4e5f6-a7b8-9012-cdef-012345678901" + format: uuid + type: string + required: + - org_uuid + - org_site + type: object GlobalVariableData: description: Synthetics global variable data. Wrapper around the global variable object. properties: @@ -46179,7 +46353,7 @@ components: $ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessorRuleMatchRule" type: array source: - description: The value of the source field in log events to be processed by the Grok rules. + description: The name of the field in the log event to apply the Grok rules to. example: "message" type: string support_rules: @@ -48893,851 +49067,1743 @@ components: type: string x-enum-varnames: - USERS - Organization: - description: Organization object. - properties: - attributes: - $ref: "#/components/schemas/OrganizationAttributes" - id: - description: ID of the organization. - type: string - type: - $ref: "#/components/schemas/OrganizationsType" - required: - - type - type: object - OrganizationAttributes: - description: Attributes of the organization. + OrgGroupAttributes: + description: Attributes of an org group. properties: created_at: - description: Creation time of the organization. + description: Timestamp when the org group was created. + example: "2024-01-15T10:30:00Z" format: date-time type: string - description: - description: Description of the organization. - type: string - disabled: - description: Whether or not the organization is disabled. - type: boolean modified_at: - description: Time of last organization modification. + description: Timestamp when the org group was last modified. + example: "2024-01-15T10:30:00Z" format: date-time type: string name: - description: Name of the organization. - type: string - public_id: - description: Public ID of the organization. + description: The name of the org group. + example: "My Org Group" type: string - sharing: - description: Sharing type of the organization. + owner_org_site: + description: The site of the organization that owns this org group. + example: "datadoghq.com" type: string - url: - description: URL of the site that this organization exists at. + owner_org_uuid: + description: The UUID of the organization that owns this org group. + example: "b2c3d4e5-f6a7-8901-bcde-f01234567890" + format: uuid type: string + required: + - name + - owner_org_uuid + - owner_org_site + - created_at + - modified_at type: object - OrganizationsType: - default: orgs - description: Organizations resource type. - enum: - - orgs - example: orgs - type: string - x-enum-varnames: - - ORGS - OutboundEdge: - description: The definition of `OutboundEdge` object. + OrgGroupCreateAttributes: + description: Attributes for creating an org group. properties: - branchName: - description: The `OutboundEdge` `branchName`. - example: "" - type: string - nextStepName: - description: The `OutboundEdge` `nextStepName`. - example: "" + name: + description: The name of the org group. + example: "My Org Group" type: string required: - - nextStepName - - branchName + - name type: object - OutcomeType: - default: outcome - description: The JSON:API type for an outcome. - enum: - - outcome - example: outcome - type: string - x-enum-varnames: - - OUTCOME - OutcomesBatchAttributes: - description: The JSON:API attributes for a batched set of scorecard outcomes. + OrgGroupCreateData: + description: Data for creating an org group. properties: - results: - description: Set of scorecard outcomes to update. - items: - $ref: "#/components/schemas/OutcomesBatchRequestItem" - type: array + attributes: + $ref: "#/components/schemas/OrgGroupCreateAttributes" + type: + $ref: "#/components/schemas/OrgGroupType" + required: + - type + - attributes type: object - OutcomesBatchRequest: - description: Scorecard outcomes batch request. + OrgGroupCreateRequest: + description: Request to create an org group. properties: data: - $ref: "#/components/schemas/OutcomesBatchRequestData" + $ref: "#/components/schemas/OrgGroupCreateData" + required: + - data type: object - OutcomesBatchRequestData: - description: Scorecard outcomes batch request data. + OrgGroupData: + description: An org group resource. properties: attributes: - $ref: "#/components/schemas/OutcomesBatchAttributes" - type: - $ref: "#/components/schemas/OutcomesBatchType" - type: object - OutcomesBatchRequestItem: - description: Scorecard outcome for a specific rule, for a given service within a batched update. - properties: - remarks: - description: >- - Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks. - example: 'See: Services' - type: string - rule_id: - $ref: "#/components/schemas/RuleId" - service_name: - description: The unique name for a service in the catalog. - example: my-service + $ref: "#/components/schemas/OrgGroupAttributes" + id: + description: The ID of the org group. + example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + format: uuid type: string - state: - $ref: "#/components/schemas/State" + relationships: + $ref: "#/components/schemas/OrgGroupRelationships" + type: + $ref: "#/components/schemas/OrgGroupType" required: - - rule_id - - service_name - - state + - id + - type + - attributes type: object - OutcomesBatchResponse: - description: Scorecard outcomes batch response. + 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: data: - $ref: "#/components/schemas/OutcomesBatchResponseData" - example: - - attributes: - service_name: my-service - state: pass - id: "outcome-abc123" - type: rule-outcome + description: An array of org groups. + 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 meta: - $ref: "#/components/schemas/OutcomesBatchResponseMeta" + $ref: "#/components/schemas/OrgGroupPaginationMeta" required: - data - - meta type: object - OutcomesBatchResponseAttributes: - description: The JSON:API attributes for an outcome. + OrgGroupMembershipAttributes: + description: Attributes of an org group membership. properties: created_at: - description: Creation time of the rule outcome. + description: Timestamp when the membership was created. + example: "2024-01-15T10:30:00Z" format: date-time type: string modified_at: - description: Time of last rule outcome modification. + description: Timestamp when the membership was last modified. + example: "2024-01-15T10:30:00Z" format: date-time type: string - remarks: - description: >- - Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks. - example: 'See: Services' + org_name: + description: The name of the member organization. + example: "Acme Corp" type: string - service_name: - description: The unique name for a service in the catalog. - example: my-service + org_site: + description: The site of the member organization. + example: "datadoghq.com" type: string - state: - $ref: "#/components/schemas/State" + org_uuid: + description: The UUID of the member organization. + example: "c3d4e5f6-a7b8-9012-cdef-012345678901" + format: uuid + type: string + required: + - org_name + - org_uuid + - org_site + - created_at + - modified_at type: object - OutcomesBatchResponseData: - description: List of rule outcomes which were affected during the bulk operation. - items: - $ref: "#/components/schemas/OutcomesResponseDataItem" - type: array - OutcomesBatchResponseMeta: - description: Metadata pertaining to the bulk operation. + OrgGroupMembershipBulkUpdateAttributes: + description: Attributes for bulk updating org group memberships. properties: - total_received: - description: Total number of scorecard results received during the bulk operation. - format: int64 - type: integer - total_updated: - description: Total number of scorecard results modified during the bulk operation. - format: int64 - type: integer + orgs: + description: List of organizations to move. Maximum 100 per request. + items: + $ref: "#/components/schemas/GlobalOrgIdentifier" + type: array + required: + - orgs type: object - OutcomesBatchType: - default: batched-outcome - description: The JSON:API type for scorecard outcomes. - enum: [batched-outcome] - example: batched-outcome - type: string - x-enum-varnames: [BATCHED_OUTCOME] - OutcomesResponse: - description: Scorecard outcomes - the result of a rule for a service. + OrgGroupMembershipBulkUpdateData: + description: Data for bulk updating org group memberships. + properties: + attributes: + $ref: "#/components/schemas/OrgGroupMembershipBulkUpdateAttributes" + relationships: + $ref: "#/components/schemas/OrgGroupMembershipBulkUpdateRelationships" + type: + $ref: "#/components/schemas/OrgGroupMembershipBulkUpdateType" + required: + - type + - attributes + - relationships + type: object + OrgGroupMembershipBulkUpdateRelationships: + description: Relationships for bulk updating memberships. + properties: + source_org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" + target_org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" + required: + - source_org_group + - target_org_group + type: object + OrgGroupMembershipBulkUpdateRequest: + description: Request to bulk update org group memberships. properties: data: - $ref: "#/components/schemas/OutcomesResponseData" - included: - $ref: "#/components/schemas/OutcomesResponseIncluded" - links: - $ref: "#/components/schemas/OutcomesResponseLinks" + $ref: "#/components/schemas/OrgGroupMembershipBulkUpdateData" + required: + - data type: object - OutcomesResponseData: - description: List of rule outcomes. - items: - $ref: "#/components/schemas/OutcomesResponseDataItem" - type: array - OutcomesResponseDataItem: - description: A single rule outcome. + OrgGroupMembershipBulkUpdateType: + description: Org group membership bulk update resource type. + enum: + - org_group_membership_bulk_updates + example: org_group_membership_bulk_updates + type: string + x-enum-varnames: + - ORG_GROUP_MEMBERSHIP_BULK_UPDATES + OrgGroupMembershipData: + description: An org group membership resource. properties: attributes: - $ref: "#/components/schemas/OutcomesBatchResponseAttributes" + $ref: "#/components/schemas/OrgGroupMembershipAttributes" id: - description: The unique ID for a rule outcome. + description: The ID of the org group membership. + example: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + format: uuid type: string relationships: - $ref: "#/components/schemas/RuleOutcomeRelationships" + $ref: "#/components/schemas/OrgGroupMembershipRelationships" type: - $ref: "#/components/schemas/OutcomeType" + $ref: "#/components/schemas/OrgGroupMembershipType" + required: + - id + - type + - attributes type: object - OutcomesResponseIncluded: - description: Array of rule details. - items: - $ref: "#/components/schemas/OutcomesResponseIncludedItem" - type: array - OutcomesResponseIncludedItem: - description: Attributes of the included rule. + OrgGroupMembershipListResponse: + description: Response containing a list of org group memberships. + properties: + data: + description: An array of org group memberships. + items: + $ref: "#/components/schemas/OrgGroupMembershipData" + type: array + meta: + $ref: "#/components/schemas/OrgGroupPaginationMeta" + required: + - data + type: object + OrgGroupMembershipRelationshipData: + description: A reference to an org group membership. properties: - attributes: - $ref: "#/components/schemas/OutcomesResponseIncludedRuleAttributes" id: - $ref: "#/components/schemas/RuleId" + description: The ID of the membership. + example: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + format: uuid + type: string type: - $ref: "#/components/schemas/RuleType" + $ref: "#/components/schemas/OrgGroupMembershipType" + required: + - id + - type type: object - OutcomesResponseIncludedRuleAttributes: - description: Details of a rule. + OrgGroupMembershipRelationships: + description: Relationships of an org group membership. properties: - name: - description: Name of the rule. - example: Team Defined - type: string - scorecard_name: - description: The scorecard name to which this rule must belong. - example: Observability Best Practices - type: string + org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" type: object - OutcomesResponseLinks: - description: Links attributes. + OrgGroupMembershipResponse: + description: Response containing a single org group membership. properties: - next: - description: |- - Link for the next set of results. - example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=100" + data: + $ref: "#/components/schemas/OrgGroupMembershipData" + required: + - data + type: object + OrgGroupMembershipSortOption: + default: uuid + description: Field to sort memberships by. + enum: + - name + - -name + - uuid + - -uuid + example: uuid + type: string + x-enum-varnames: + - NAME + - MINUS_NAME + - UUID + - MINUS_UUID + OrgGroupMembershipType: + description: Org group memberships resource type. + enum: + - org_group_memberships + example: org_group_memberships + type: string + x-enum-varnames: + - ORG_GROUP_MEMBERSHIPS + OrgGroupMembershipUpdateData: + description: Data for updating an org group membership. + properties: + id: + description: The ID of the membership. + example: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + format: uuid type: string + relationships: + $ref: "#/components/schemas/OrgGroupMembershipUpdateRelationships" + type: + $ref: "#/components/schemas/OrgGroupMembershipType" + required: + - id + - type + - relationships type: object - OutputSchema: - description: "A list of output parameters for the workflow." + OrgGroupMembershipUpdateRelationships: + description: Relationships for updating a membership. properties: - parameters: - description: The `OutputSchema` `parameters`. + org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" + required: + - org_group + type: object + OrgGroupMembershipUpdateRequest: + description: Request to update an org group membership. + properties: + data: + $ref: "#/components/schemas/OrgGroupMembershipUpdateData" + required: + - data + type: object + OrgGroupMembershipsRelationship: + description: Relationship to org group memberships. + properties: + data: + description: An array of membership relationship references. items: - $ref: "#/components/schemas/OutputSchemaParameters" + $ref: "#/components/schemas/OrgGroupMembershipRelationshipData" type: array + required: + - data type: object - OutputSchemaParameters: - description: The definition of `OutputSchemaParameters` object. + OrgGroupPaginationMeta: + description: Pagination metadata. properties: - defaultValue: - description: The `OutputSchemaParameters` `defaultValue`. - description: - description: The `OutputSchemaParameters` `description`. + page: + $ref: "#/components/schemas/OrgGroupPaginationMetaPage" + required: + - page + type: object + OrgGroupPaginationMetaPage: + description: Page-based pagination details. + properties: + total_count: + description: The total number of items. + example: 42 + format: int64 + type: integer + required: + - total_count + type: object + OrgGroupPolicyAttributes: + description: Attributes of an org group policy. + properties: + content: + additionalProperties: {} + description: The policy content as key-value pairs. + example: + value: "UTC" + type: object + enforced_at: + description: Timestamp when the policy was enforced. + example: "2024-01-15T10:30:00Z" + format: date-time type: string - label: - description: The `OutputSchemaParameters` `label`. + modified_at: + description: Timestamp when the policy was last modified. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + policy_name: + description: The name of the policy. + example: "monitor_timezone" + type: string + required: + - policy_name + - enforced_at + - modified_at + type: object + OrgGroupPolicyConfigAttributes: + description: Attributes of an org group policy config. + properties: + allowed_values: + description: The allowed values for this config. + example: ["UTC", "US/Eastern", "US/Pacific"] + items: + description: An allowed value for this config. + type: string + type: array + default_value: + description: The default value for this config. + example: "UTC" + description: + description: The description of the policy config. + example: "The default timezone for monitors." type: string name: - description: The `OutputSchemaParameters` `name`. - example: "" + description: The name of the policy config. + example: "monitor_timezone" + type: string + value_type: + description: The type of the value for this config. + example: "string" type: string - type: - $ref: "#/components/schemas/OutputSchemaParametersType" - value: - description: The `OutputSchemaParameters` `value`. required: - name + - description + - value_type + - allowed_values + - default_value + type: object + OrgGroupPolicyConfigData: + description: An org group policy config resource. + properties: + attributes: + $ref: "#/components/schemas/OrgGroupPolicyConfigAttributes" + id: + description: The identifier of the policy config (uses the config name). + example: "monitor_timezone" + type: string + type: + $ref: "#/components/schemas/OrgGroupPolicyConfigType" + required: + - id - type + - attributes type: object - OutputSchemaParametersType: - description: The definition of `OutputSchemaParametersType` object. - enum: - - STRING - - NUMBER - - BOOLEAN - - OBJECT - - ARRAY_STRING - - ARRAY_NUMBER - - ARRAY_BOOLEAN - - ARRAY_OBJECT - example: STRING - type: string - x-enum-varnames: - - STRING - - NUMBER - - BOOLEAN - - OBJECT - - ARRAY_STRING - - ARRAY_NUMBER - - ARRAY_BOOLEAN - - ARRAY_OBJECT - OverwriteAllocationsRequest: - description: Request to overwrite targeting rules (allocations) for a feature flag in an environment. + OrgGroupPolicyConfigListResponse: + description: Response containing a list of org group policy configs. properties: data: - description: Targeting rules (allocations) to replace existing ones with. + description: An array of org group policy configs. items: - $ref: "#/components/schemas/AllocationDataRequest" + $ref: "#/components/schemas/OrgGroupPolicyConfigData" type: array required: - data type: object - PageUrgency: - default: high - description: On-Call Page urgency level. + OrgGroupPolicyConfigType: + description: Org group policy configs resource type. enum: - - low - - high - example: high + - org_group_policy_configs + example: org_group_policy_configs type: string x-enum-varnames: - - LOW - - HIGH - PaginatedResponseMeta: - description: Metadata for scores response. + - ORG_GROUP_POLICY_CONFIGS + OrgGroupPolicyCreateAttributes: + description: Attributes for creating an org group policy. properties: - count: - description: Number of entities in this response. - example: 10 - format: int64 - type: integer - limit: - description: Pagination limit. - example: 10 - format: int64 - type: integer - offset: - description: Pagination offset. - example: 0 - format: int64 - type: integer - total: - description: Total number of entities available. - example: 150 - format: int64 - type: integer + content: + additionalProperties: {} + description: The policy content as key-value pairs. + example: + value: "UTC" + type: object + policy_name: + description: The name of the policy. + example: "monitor_timezone" + type: string required: - - count - - total - - limit - - offset - type: object - Pagination: - description: Pagination object. - properties: - total_count: - description: Total count. - format: int64 - type: integer - total_filtered_count: - description: Total count of elements matched by the filter. - format: int64 - type: integer + - policy_name + - content type: object - PaginationMeta: - description: Response metadata. + OrgGroupPolicyCreateData: + description: Data for creating an org group policy. properties: - page: - $ref: "#/components/schemas/PaginationMetaPage" - readOnly: true + attributes: + $ref: "#/components/schemas/OrgGroupPolicyCreateAttributes" + relationships: + $ref: "#/components/schemas/OrgGroupPolicyCreateRelationships" + type: + $ref: "#/components/schemas/OrgGroupPolicyType" + required: + - type + - attributes + - relationships type: object - PaginationMetaPage: - description: Offset-based pagination schema. - example: - first_offset: 0 - last_offset: 900 - limit: 100 - next_offset: 100 - offset: 0 - prev_offset: 100 - total: 1000 - type: offset_limit + OrgGroupPolicyCreateRelationships: + description: Relationships for creating a policy. properties: - first_offset: - description: Integer representing the offset to fetch the first page of results. - example: 0 - format: int64 - type: integer - last_offset: - description: Integer representing the offset to fetch the last page of results. - example: 900 - format: int64 - nullable: true - type: integer - limit: - description: Integer representing the number of elements to be returned in the results. - example: 100 - format: int64 - type: integer - next_offset: - description: >- - Integer representing the index of the first element in the next page of results. Equal to page size added to the current offset. - example: 100 - format: int64 - nullable: true - type: integer - offset: - description: Integer representing the index of the first element in the results. - example: 0 - format: int64 - type: integer - prev_offset: - description: Integer representing the index of the first element in the previous page of results. - example: 100 - format: int64 - nullable: true - type: integer - total: - description: Integer representing the total number of elements available. - example: 1000 - format: int64 - nullable: true - type: integer - type: - $ref: "#/components/schemas/PaginationMetaPageType" + org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" + required: + - org_group type: object - PaginationMetaPageType: - default: offset_limit - description: The pagination type used for offset-based pagination. - enum: - - offset_limit - example: offset_limit - type: string - x-enum-varnames: - - OFFSET_LIMIT - Parameter: - description: The definition of `Parameter` object. + OrgGroupPolicyCreateRequest: + description: Request to create an org group policy. properties: - name: - description: The `Parameter` `name`. - example: "" - type: string - value: - description: The `Parameter` `value`. + data: + $ref: "#/components/schemas/OrgGroupPolicyCreateData" required: - - name - - value + - data type: object - PartialAPIKey: - description: Partial Datadog API key. + OrgGroupPolicyData: + description: An org group policy resource. properties: attributes: - $ref: "#/components/schemas/PartialAPIKeyAttributes" + $ref: "#/components/schemas/OrgGroupPolicyAttributes" id: - description: ID of the API key. + description: The ID of the org group policy. + example: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + format: uuid type: string relationships: - $ref: "#/components/schemas/APIKeyRelationships" + $ref: "#/components/schemas/OrgGroupPolicyRelationships" type: - $ref: "#/components/schemas/APIKeysType" + $ref: "#/components/schemas/OrgGroupPolicyType" + required: + - id + - type + - attributes type: object - PartialAPIKeyAttributes: - description: Attributes of a partial API key. + OrgGroupPolicyListResponse: + description: Response containing a list of org group policies. properties: - category: - description: The category of the API key. - type: string + data: + description: An array of org group policies. + items: + $ref: "#/components/schemas/OrgGroupPolicyData" + type: array + meta: + $ref: "#/components/schemas/OrgGroupPaginationMeta" + required: + - data + type: object + OrgGroupPolicyOverrideAttributes: + description: Attributes of an org group policy override. + properties: + content: + additionalProperties: {} + description: The override content as key-value pairs. + type: object created_at: - description: Creation date of the API key. - example: "2020-11-23T10:00:00.000Z" - readOnly: true + description: Timestamp when the override was created. + example: "2024-01-15T10:30:00Z" + format: date-time type: string - date_last_used: - description: Date the API Key was last used. - example: "2020-11-27T10:00:00.000Z" + modified_at: + description: Timestamp when the override was last modified. + example: "2024-01-15T10:30:00Z" format: date-time - nullable: true - readOnly: true type: string - last4: - description: The last four characters of the API key. - example: "abcd" - maxLength: 4 - minLength: 4 - readOnly: true + org_site: + description: The site of the organization that has the override. + example: "datadoghq.com" type: string - modified_at: - description: Date the API key was last modified. - example: "2020-11-23T10:00:00.000Z" - readOnly: true + org_uuid: + description: The UUID of the organization that has the override. + example: "c3d4e5f6-a7b8-9012-cdef-012345678901" + format: uuid type: string - name: - description: Name of the API key. - example: "API Key for submitting metrics" + required: + - org_uuid + - org_site + - created_at + - modified_at + type: object + OrgGroupPolicyOverrideCreateAttributes: + description: Attributes for creating a policy override. + properties: + org_site: + description: The site of the organization. + example: "datadoghq.com" type: string - remote_config_read_enabled: - description: The remote config read enabled status. - type: boolean + org_uuid: + description: The UUID of the organization to grant the override. + example: "c3d4e5f6-a7b8-9012-cdef-012345678901" + format: uuid + type: string + required: + - org_uuid + - org_site type: object - PartialApplicationKey: - description: Partial Datadog application key. + OrgGroupPolicyOverrideCreateData: + description: Data for creating an org group policy override. properties: attributes: - $ref: "#/components/schemas/PartialApplicationKeyAttributes" - id: - description: ID of the application key. - type: string + $ref: "#/components/schemas/OrgGroupPolicyOverrideCreateAttributes" relationships: - $ref: "#/components/schemas/ApplicationKeyRelationships" + $ref: "#/components/schemas/OrgGroupPolicyOverrideCreateRelationships" type: - $ref: "#/components/schemas/ApplicationKeysType" - type: object - PartialApplicationKeyAttributes: - description: Attributes of a partial application key. - properties: - created_at: - description: Creation date of the application key. - example: "2020-11-23T10:00:00.000Z" - readOnly: true - type: string - last4: - description: The last four characters of the application key. - example: "abcd" - maxLength: 4 - minLength: 4 - readOnly: true - type: string - last_used_at: - description: Last usage timestamp of the application key. - example: "2020-12-20T10:00:00.000Z" - nullable: true - readOnly: true - type: string - name: - description: Name of the application key. - example: "Application Key for managing dashboards" - type: string - scopes: - description: Array of scopes to grant the application key. - example: ["dashboards_read", "dashboards_write", "dashboards_public_share"] - items: - description: Name of scope. - type: string - nullable: true - type: array + $ref: "#/components/schemas/OrgGroupPolicyOverrideType" + required: + - type + - attributes + - relationships type: object - PartialApplicationKeyResponse: - description: Response for retrieving a partial application key. + OrgGroupPolicyOverrideCreateRelationships: + description: Relationships for creating a policy override. properties: - data: - $ref: "#/components/schemas/PartialApplicationKey" - included: - description: Array of objects related to the application key. - items: - $ref: "#/components/schemas/ApplicationKeyResponseIncludedItem" - type: array + org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" + org_group_policy: + $ref: "#/components/schemas/OrgGroupPolicyRelationshipToOne" + required: + - org_group + - org_group_policy type: object - PatchAttachmentRequest: - description: Request to update an attachment. + OrgGroupPolicyOverrideCreateRequest: + description: Request to create an org group policy override. properties: data: - $ref: "#/components/schemas/PatchAttachmentRequestData" + $ref: "#/components/schemas/OrgGroupPolicyOverrideCreateData" + required: + - data type: object - PatchAttachmentRequestData: - description: Attachment data for an update request. + OrgGroupPolicyOverrideData: + description: An org group policy override resource. properties: attributes: - $ref: "#/components/schemas/PatchAttachmentRequestDataAttributes" + $ref: "#/components/schemas/OrgGroupPolicyOverrideAttributes" id: - description: The unique identifier of the attachment. - example: "00000000-abcd-0002-0000-000000000000" + description: The ID of the policy override. + example: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + format: uuid type: string + relationships: + $ref: "#/components/schemas/OrgGroupPolicyOverrideRelationships" type: - $ref: "#/components/schemas/IncidentAttachmentType" + $ref: "#/components/schemas/OrgGroupPolicyOverrideType" required: + - id - type + - attributes type: object - PatchAttachmentRequestDataAttributes: - description: The attributes for updating an attachment. + OrgGroupPolicyOverrideListResponse: + description: Response containing a list of org group policy overrides. properties: - attachment: - $ref: "#/components/schemas/PatchAttachmentRequestDataAttributesAttachment" + data: + description: An array of org group policy overrides. + items: + $ref: "#/components/schemas/OrgGroupPolicyOverrideData" + type: array + meta: + $ref: "#/components/schemas/OrgGroupPaginationMeta" + required: + - data type: object - PatchAttachmentRequestDataAttributesAttachment: - description: The updated attachment object. + OrgGroupPolicyOverrideRelationships: + description: Relationships of an org group policy override. properties: - documentUrl: - description: The updated URL for the attachment. - example: https://app.datadoghq.com/notebook/124/Postmortem-IR-124 - type: string - title: - description: The updated title for the attachment. - example: Postmortem-IR-124 - type: string + org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" + org_group_policy: + $ref: "#/components/schemas/OrgGroupPolicyRelationshipToOne" type: object - PatchComponentRequest: - description: Request object for updating a component. - example: - data: - attributes: - name: Metrics Intake Service - position: 4 - id: 1234abcd-12ab-34cd-56ef-123456abcdef - type: components + OrgGroupPolicyOverrideResponse: + description: Response containing a single org group policy override. properties: data: - $ref: "#/components/schemas/PatchComponentRequestData" + $ref: "#/components/schemas/OrgGroupPolicyOverrideData" + required: + - data type: object - PatchComponentRequestData: - description: The data object for updating a component. + OrgGroupPolicyOverrideSortOption: + default: id + description: Field to sort overrides by. + enum: + - id + - -id + - org_uuid + - -org_uuid + example: id + type: string + x-enum-varnames: + - ID + - MINUS_ID + - ORG_UUID + - MINUS_ORG_UUID + OrgGroupPolicyOverrideType: + description: Org group policy overrides resource type. + enum: + - org_group_policy_overrides + example: org_group_policy_overrides + type: string + x-enum-varnames: + - ORG_GROUP_POLICY_OVERRIDES + OrgGroupPolicyOverrideUpdateAttributes: + description: Attributes for updating a policy override. + properties: + org_site: + description: The site of the organization. + example: "datadoghq.com" + type: string + org_uuid: + description: The UUID of the organization. + example: "c3d4e5f6-a7b8-9012-cdef-012345678901" + format: uuid + type: string + required: + - org_uuid + - org_site + type: object + OrgGroupPolicyOverrideUpdateData: + description: Data for updating a policy override. properties: attributes: - $ref: "#/components/schemas/PatchComponentRequestDataAttributes" + $ref: "#/components/schemas/OrgGroupPolicyOverrideUpdateAttributes" id: - description: The ID of the component. - example: "1234abcd-12ab-34cd-56ef-123456abcdef" + description: The ID of the policy override. + example: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" format: uuid type: string type: - $ref: "#/components/schemas/StatusPagesComponentGroupType" + $ref: "#/components/schemas/OrgGroupPolicyOverrideType" required: - - attributes - id - type + - attributes type: object - PatchComponentRequestDataAttributes: - description: The supported attributes for updating a component. + OrgGroupPolicyOverrideUpdateRequest: + description: Request to update an org group policy override. properties: - name: - description: The name of the component. - example: Web App - type: string - position: - description: The position of the component. If the component belongs to a group, the position is relative to the other components in the group. - example: 1 - format: int64 - type: integer - type: object - PatchDegradationRequest: - description: Request object for updating a degradation. - example: data: - attributes: - components_affected: - - id: 1234abcd-12ab-34cd-56ef-123456abcdef - status: operational - description: We've deployed a fix and latency has returned to normal. This issue has been resolved. - status: resolved - id: 1234abcd-12ab-34cd-56ef-123456abcdef - type: degradations + $ref: "#/components/schemas/OrgGroupPolicyOverrideUpdateData" + required: + - data + type: object + OrgGroupPolicyRelationshipToOne: + description: Relationship to a single org group policy. properties: data: - $ref: "#/components/schemas/PatchDegradationRequestData" + $ref: "#/components/schemas/OrgGroupPolicyRelationshipToOneData" + required: + - data type: object - PatchDegradationRequestData: - description: The data object for updating a degradation. + OrgGroupPolicyRelationshipToOneData: + description: A reference to an org group policy. properties: - attributes: - $ref: "#/components/schemas/PatchDegradationRequestDataAttributes" id: - description: The ID of the degradation. - example: "1234abcd-12ab-34cd-56ef-123456abcdef" + description: The ID of the policy. + example: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" format: uuid type: string type: - $ref: "#/components/schemas/PatchDegradationRequestDataType" + $ref: "#/components/schemas/OrgGroupPolicyType" required: - - attributes - id - type type: object - PatchDegradationRequestDataAttributes: - description: The supported attributes for updating a degradation. + OrgGroupPolicyRelationships: + description: Relationships of an org group policy. properties: - components_affected: - description: The components affected by the degradation. - example: - - id: 1234abcd-12ab-34cd-56ef-123456abcdef - status: operational - items: - $ref: "#/components/schemas/PatchDegradationRequestDataAttributesComponentsAffectedItems" - type: array - description: - description: The description of the degradation. - example: We've deployed a fix and latency has returned to normal. This issue has been resolved. - type: string - status: - $ref: "#/components/schemas/PatchDegradationRequestDataAttributesStatus" - example: resolved - title: - description: The title of the degradation. - example: Elevated API Latency - type: string + org_group: + $ref: "#/components/schemas/OrgGroupRelationshipToOne" type: object - PatchDegradationRequestDataAttributesComponentsAffectedItems: - description: A component affected by a degradation. + OrgGroupPolicyResponse: + description: Response containing a single org group policy. properties: - id: - description: The ID of the component. Must be a component of type `component`. - example: "1234abcd-12ab-34cd-56ef-123456abcdef" - format: uuid - type: string - name: - description: The name of the component. - readOnly: true - type: string - status: - $ref: "#/components/schemas/StatusPagesComponentDataAttributesStatus" + data: + $ref: "#/components/schemas/OrgGroupPolicyData" required: - - id - - status + - data type: object - PatchDegradationRequestDataAttributesStatus: - description: The status of the degradation. + OrgGroupPolicySortOption: + default: id + description: Field to sort policies by. enum: - - investigating - - identified - - monitoring - - resolved + - id + - -id + - name + - -name + example: id type: string x-enum-varnames: - - INVESTIGATING - - IDENTIFIED - - MONITORING - - RESOLVED - PatchDegradationRequestDataType: - default: degradations - description: Degradations resource type. + - ID + - MINUS_ID + - NAME + - MINUS_NAME + OrgGroupPolicyType: + description: Org group policies resource type. enum: - - degradations - example: degradations + - org_group_policies + example: org_group_policies type: string x-enum-varnames: - - DEGRADATIONS - PatchIncidentNotificationTemplateRequest: - description: Update request for a notification template. + - ORG_GROUP_POLICIES + OrgGroupPolicyUpdateAttributes: + description: Attributes for updating an org group policy. + properties: + content: + additionalProperties: {} + description: The policy content as key-value pairs. + example: + value: "UTC" + type: object + type: object + OrgGroupPolicyUpdateData: + description: Data for updating an org group policy. + properties: + attributes: + $ref: "#/components/schemas/OrgGroupPolicyUpdateAttributes" + id: + description: The ID of the policy. + example: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + format: uuid + type: string + type: + $ref: "#/components/schemas/OrgGroupPolicyType" + required: + - id + - type + - attributes + type: object + OrgGroupPolicyUpdateRequest: + description: Request to update an org group policy. properties: data: - $ref: "#/components/schemas/IncidentNotificationTemplateUpdateData" + $ref: "#/components/schemas/OrgGroupPolicyUpdateData" required: - data type: object - PatchMaintenanceRequest: - description: Request object for updating a maintenance. - example: - data: - attributes: - completed_date: "2026-02-18T20:01:13.332360075Z" - in_progress_description: We are currently performing maintenance on the API to improve performance for 40 minutes. - scheduled_description: We will be performing maintenance on the API to improve performance for 40 minutes. - start_date: "2026-02-18T19:21:13.332360075Z" - title: API Maintenance - id: 1234abcd-12ab-34cd-56ef-123456abcdef - type: maintenances + OrgGroupRelationshipToOne: + description: Relationship to a single org group. properties: data: - $ref: "#/components/schemas/PatchMaintenanceRequestData" + $ref: "#/components/schemas/OrgGroupRelationshipToOneData" + required: + - data type: object - PatchMaintenanceRequestData: - description: The data object for updating a maintenance. + OrgGroupRelationshipToOneData: + description: A reference to an org group. properties: - attributes: - $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributes" id: - description: The ID of the maintenance. - example: "1234abcd-12ab-34cd-56ef-123456abcdef" + description: The ID of the org group. + example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" format: uuid type: string type: - $ref: "#/components/schemas/PatchMaintenanceRequestDataType" + $ref: "#/components/schemas/OrgGroupType" required: - - attributes - - type - id + - type type: object - PatchMaintenanceRequestDataAttributes: - description: The supported attributes for updating a maintenance. + OrgGroupRelationships: + description: Relationships of an org group. properties: - completed_date: - description: Timestamp of when the maintenance was completed. - format: date-time - type: string - completed_description: - description: The description shown when the maintenance is completed. - type: string - components_affected: - description: The components affected by the maintenance. - items: - $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItems" - type: array - in_progress_description: - description: The description shown while the maintenance is in progress. - type: string - scheduled_description: - description: The description shown when the maintenance is scheduled. - type: string - start_date: - description: Timestamp of when the maintenance is scheduled to start. - format: date-time - type: string - status: - $ref: "#/components/schemas/MaintenanceDataAttributesStatus" - description: The status of the maintenance. - title: - description: The title of the maintenance. - type: string + memberships: + $ref: "#/components/schemas/OrgGroupMembershipsRelationship" type: object - PatchMaintenanceRequestDataAttributesComponentsAffectedItems: - description: A component affected by a maintenance. + OrgGroupResponse: + description: Response containing a single org group. properties: - id: - description: The ID of the component. Must be a component of type `component`. - example: "1234abcd-12ab-34cd-56ef-123456abcdef" - format: uuid - type: string - name: - description: The name of the component. - readOnly: true - type: string - status: - $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus" + data: + $ref: "#/components/schemas/OrgGroupData" required: - - id - - status + - data type: object - PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus: - description: The status of the component. + OrgGroupSortOption: + default: uuid + description: Field to sort org groups by. enum: - - operational - - maintenance - example: operational + - name + - -name + - uuid + - -uuid + example: name type: string x-enum-varnames: - - OPERATIONAL - - MAINTENANCE - PatchMaintenanceRequestDataType: - default: maintenances - description: Maintenances resource type. + - NAME + - MINUS_NAME + - UUID + - MINUS_UUID + OrgGroupType: + description: Org groups resource type. enum: - - maintenances - example: maintenances + - org_groups + example: org_groups type: string x-enum-varnames: - - MAINTENANCES + - ORG_GROUPS + OrgGroupUpdateAttributes: + description: Attributes for updating an org group. + properties: + name: + description: The name of the org group. + example: "Updated Org Group Name" + type: string + required: + - name + type: object + OrgGroupUpdateData: + description: Data for updating an org group. + properties: + attributes: + $ref: "#/components/schemas/OrgGroupUpdateAttributes" + id: + description: The ID of the org group. + example: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + format: uuid + type: string + type: + $ref: "#/components/schemas/OrgGroupType" + required: + - id + - type + - attributes + type: object + OrgGroupUpdateRequest: + description: Request to update an org group. + properties: + data: + $ref: "#/components/schemas/OrgGroupUpdateData" + required: + - data + type: object + Organization: + description: Organization object. + properties: + attributes: + $ref: "#/components/schemas/OrganizationAttributes" + id: + description: ID of the organization. + type: string + type: + $ref: "#/components/schemas/OrganizationsType" + required: + - type + type: object + OrganizationAttributes: + description: Attributes of the organization. + properties: + created_at: + description: Creation time of the organization. + format: date-time + type: string + description: + description: Description of the organization. + type: string + disabled: + description: Whether or not the organization is disabled. + type: boolean + modified_at: + description: Time of last organization modification. + format: date-time + type: string + name: + description: Name of the organization. + type: string + public_id: + description: Public ID of the organization. + type: string + sharing: + description: Sharing type of the organization. + type: string + url: + description: URL of the site that this organization exists at. + type: string + type: object + OrganizationsType: + default: orgs + description: Organizations resource type. + enum: + - orgs + example: orgs + type: string + x-enum-varnames: + - ORGS + OutboundEdge: + description: The definition of `OutboundEdge` object. + properties: + branchName: + description: The `OutboundEdge` `branchName`. + example: "" + type: string + nextStepName: + description: The `OutboundEdge` `nextStepName`. + example: "" + type: string + required: + - nextStepName + - branchName + type: object + OutcomeType: + default: outcome + description: The JSON:API type for an outcome. + enum: + - outcome + example: outcome + type: string + x-enum-varnames: + - OUTCOME + OutcomesBatchAttributes: + description: The JSON:API attributes for a batched set of scorecard outcomes. + properties: + results: + description: Set of scorecard outcomes to update. + items: + $ref: "#/components/schemas/OutcomesBatchRequestItem" + type: array + type: object + OutcomesBatchRequest: + description: Scorecard outcomes batch request. + properties: + data: + $ref: "#/components/schemas/OutcomesBatchRequestData" + type: object + OutcomesBatchRequestData: + description: Scorecard outcomes batch request data. + properties: + attributes: + $ref: "#/components/schemas/OutcomesBatchAttributes" + type: + $ref: "#/components/schemas/OutcomesBatchType" + type: object + OutcomesBatchRequestItem: + description: Scorecard outcome for a specific rule, for a given service within a batched update. + properties: + remarks: + description: >- + Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks. + example: 'See: Services' + type: string + rule_id: + $ref: "#/components/schemas/RuleId" + service_name: + description: The unique name for a service in the catalog. + example: my-service + type: string + state: + $ref: "#/components/schemas/State" + required: + - rule_id + - service_name + - state + type: object + OutcomesBatchResponse: + description: Scorecard outcomes batch response. + properties: + data: + $ref: "#/components/schemas/OutcomesBatchResponseData" + example: + - attributes: + service_name: my-service + state: pass + id: "outcome-abc123" + type: rule-outcome + meta: + $ref: "#/components/schemas/OutcomesBatchResponseMeta" + required: + - data + - meta + type: object + OutcomesBatchResponseAttributes: + description: The JSON:API attributes for an outcome. + properties: + created_at: + description: Creation time of the rule outcome. + format: date-time + type: string + modified_at: + description: Time of last rule outcome modification. + format: date-time + type: string + remarks: + description: >- + Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks. + example: 'See: Services' + type: string + service_name: + description: The unique name for a service in the catalog. + example: my-service + type: string + state: + $ref: "#/components/schemas/State" + type: object + OutcomesBatchResponseData: + description: List of rule outcomes which were affected during the bulk operation. + items: + $ref: "#/components/schemas/OutcomesResponseDataItem" + type: array + OutcomesBatchResponseMeta: + description: Metadata pertaining to the bulk operation. + properties: + total_received: + description: Total number of scorecard results received during the bulk operation. + format: int64 + type: integer + total_updated: + description: Total number of scorecard results modified during the bulk operation. + format: int64 + type: integer + type: object + OutcomesBatchType: + default: batched-outcome + description: The JSON:API type for scorecard outcomes. + enum: [batched-outcome] + example: batched-outcome + type: string + x-enum-varnames: [BATCHED_OUTCOME] + OutcomesResponse: + description: Scorecard outcomes - the result of a rule for a service. + properties: + data: + $ref: "#/components/schemas/OutcomesResponseData" + included: + $ref: "#/components/schemas/OutcomesResponseIncluded" + links: + $ref: "#/components/schemas/OutcomesResponseLinks" + type: object + OutcomesResponseData: + description: List of rule outcomes. + items: + $ref: "#/components/schemas/OutcomesResponseDataItem" + type: array + OutcomesResponseDataItem: + description: A single rule outcome. + properties: + attributes: + $ref: "#/components/schemas/OutcomesBatchResponseAttributes" + id: + description: The unique ID for a rule outcome. + type: string + relationships: + $ref: "#/components/schemas/RuleOutcomeRelationships" + type: + $ref: "#/components/schemas/OutcomeType" + type: object + OutcomesResponseIncluded: + description: Array of rule details. + items: + $ref: "#/components/schemas/OutcomesResponseIncludedItem" + type: array + OutcomesResponseIncludedItem: + description: Attributes of the included rule. + properties: + attributes: + $ref: "#/components/schemas/OutcomesResponseIncludedRuleAttributes" + id: + $ref: "#/components/schemas/RuleId" + type: + $ref: "#/components/schemas/RuleType" + type: object + OutcomesResponseIncludedRuleAttributes: + description: Details of a rule. + properties: + name: + description: Name of the rule. + example: Team Defined + type: string + scorecard_name: + description: The scorecard name to which this rule must belong. + example: Observability Best Practices + type: string + type: object + OutcomesResponseLinks: + description: Links attributes. + properties: + next: + description: |- + Link for the next set of results. + example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=100" + type: string + type: object + OutputSchema: + description: "A list of output parameters for the workflow." + properties: + parameters: + description: The `OutputSchema` `parameters`. + items: + $ref: "#/components/schemas/OutputSchemaParameters" + type: array + type: object + OutputSchemaParameters: + description: The definition of `OutputSchemaParameters` object. + properties: + defaultValue: + description: The `OutputSchemaParameters` `defaultValue`. + description: + description: The `OutputSchemaParameters` `description`. + type: string + label: + description: The `OutputSchemaParameters` `label`. + type: string + name: + description: The `OutputSchemaParameters` `name`. + example: "" + type: string + type: + $ref: "#/components/schemas/OutputSchemaParametersType" + value: + description: The `OutputSchemaParameters` `value`. + required: + - name + - type + type: object + OutputSchemaParametersType: + description: The definition of `OutputSchemaParametersType` object. + enum: + - STRING + - NUMBER + - BOOLEAN + - OBJECT + - ARRAY_STRING + - ARRAY_NUMBER + - ARRAY_BOOLEAN + - ARRAY_OBJECT + example: STRING + type: string + x-enum-varnames: + - STRING + - NUMBER + - BOOLEAN + - OBJECT + - ARRAY_STRING + - ARRAY_NUMBER + - ARRAY_BOOLEAN + - ARRAY_OBJECT + OverwriteAllocationsRequest: + description: Request to overwrite targeting rules (allocations) for a feature flag in an environment. + properties: + data: + description: Targeting rules (allocations) to replace existing ones with. + items: + $ref: "#/components/schemas/AllocationDataRequest" + type: array + required: + - data + type: object + PageUrgency: + default: high + description: On-Call Page urgency level. + enum: + - low + - high + example: high + type: string + x-enum-varnames: + - LOW + - HIGH + PaginatedResponseMeta: + description: Metadata for scores response. + properties: + count: + description: Number of entities in this response. + example: 10 + format: int64 + type: integer + limit: + description: Pagination limit. + example: 10 + format: int64 + type: integer + offset: + description: Pagination offset. + example: 0 + format: int64 + type: integer + total: + description: Total number of entities available. + example: 150 + format: int64 + type: integer + required: + - count + - total + - limit + - offset + type: object + Pagination: + description: Pagination object. + properties: + total_count: + description: Total count. + format: int64 + type: integer + total_filtered_count: + description: Total count of elements matched by the filter. + format: int64 + type: integer + type: object + PaginationMeta: + description: Response metadata. + properties: + page: + $ref: "#/components/schemas/PaginationMetaPage" + readOnly: true + type: object + PaginationMetaPage: + description: Offset-based pagination schema. + example: + first_offset: 0 + last_offset: 900 + limit: 100 + next_offset: 100 + offset: 0 + prev_offset: 100 + total: 1000 + type: offset_limit + properties: + first_offset: + description: Integer representing the offset to fetch the first page of results. + example: 0 + format: int64 + type: integer + last_offset: + description: Integer representing the offset to fetch the last page of results. + example: 900 + format: int64 + nullable: true + type: integer + limit: + description: Integer representing the number of elements to be returned in the results. + example: 100 + format: int64 + type: integer + next_offset: + description: >- + Integer representing the index of the first element in the next page of results. Equal to page size added to the current offset. + example: 100 + format: int64 + nullable: true + type: integer + offset: + description: Integer representing the index of the first element in the results. + example: 0 + format: int64 + type: integer + prev_offset: + description: Integer representing the index of the first element in the previous page of results. + example: 100 + format: int64 + nullable: true + type: integer + total: + description: Integer representing the total number of elements available. + example: 1000 + format: int64 + nullable: true + type: integer + type: + $ref: "#/components/schemas/PaginationMetaPageType" + type: object + PaginationMetaPageType: + default: offset_limit + description: The pagination type used for offset-based pagination. + enum: + - offset_limit + example: offset_limit + type: string + x-enum-varnames: + - OFFSET_LIMIT + Parameter: + description: The definition of `Parameter` object. + properties: + name: + description: The `Parameter` `name`. + example: "" + type: string + value: + description: The `Parameter` `value`. + required: + - name + - value + type: object + PartialAPIKey: + description: Partial Datadog API key. + properties: + attributes: + $ref: "#/components/schemas/PartialAPIKeyAttributes" + id: + description: ID of the API key. + type: string + relationships: + $ref: "#/components/schemas/APIKeyRelationships" + type: + $ref: "#/components/schemas/APIKeysType" + type: object + PartialAPIKeyAttributes: + description: Attributes of a partial API key. + properties: + category: + description: The category of the API key. + type: string + created_at: + description: Creation date of the API key. + example: "2020-11-23T10:00:00.000Z" + readOnly: true + type: string + date_last_used: + description: Date the API Key was last used. + example: "2020-11-27T10:00:00.000Z" + format: date-time + nullable: true + readOnly: true + type: string + last4: + description: The last four characters of the API key. + example: "abcd" + maxLength: 4 + minLength: 4 + readOnly: true + type: string + modified_at: + description: Date the API key was last modified. + example: "2020-11-23T10:00:00.000Z" + readOnly: true + type: string + name: + description: Name of the API key. + example: "API Key for submitting metrics" + type: string + remote_config_read_enabled: + description: The remote config read enabled status. + type: boolean + type: object + PartialApplicationKey: + description: Partial Datadog application key. + properties: + attributes: + $ref: "#/components/schemas/PartialApplicationKeyAttributes" + id: + description: ID of the application key. + type: string + relationships: + $ref: "#/components/schemas/ApplicationKeyRelationships" + type: + $ref: "#/components/schemas/ApplicationKeysType" + type: object + PartialApplicationKeyAttributes: + description: Attributes of a partial application key. + properties: + created_at: + description: Creation date of the application key. + example: "2020-11-23T10:00:00.000Z" + readOnly: true + type: string + last4: + description: The last four characters of the application key. + example: "abcd" + maxLength: 4 + minLength: 4 + readOnly: true + type: string + last_used_at: + description: Last usage timestamp of the application key. + example: "2020-12-20T10:00:00.000Z" + nullable: true + readOnly: true + type: string + name: + description: Name of the application key. + example: "Application Key for managing dashboards" + type: string + scopes: + description: Array of scopes to grant the application key. + example: ["dashboards_read", "dashboards_write", "dashboards_public_share"] + items: + description: Name of scope. + type: string + nullable: true + type: array + type: object + PartialApplicationKeyResponse: + description: Response for retrieving a partial application key. + properties: + data: + $ref: "#/components/schemas/PartialApplicationKey" + included: + description: Array of objects related to the application key. + items: + $ref: "#/components/schemas/ApplicationKeyResponseIncludedItem" + type: array + type: object + PatchAttachmentRequest: + description: Request to update an attachment. + properties: + data: + $ref: "#/components/schemas/PatchAttachmentRequestData" + type: object + PatchAttachmentRequestData: + description: Attachment data for an update request. + properties: + attributes: + $ref: "#/components/schemas/PatchAttachmentRequestDataAttributes" + id: + description: The unique identifier of the attachment. + example: "00000000-abcd-0002-0000-000000000000" + type: string + type: + $ref: "#/components/schemas/IncidentAttachmentType" + required: + - type + type: object + PatchAttachmentRequestDataAttributes: + description: The attributes for updating an attachment. + properties: + attachment: + $ref: "#/components/schemas/PatchAttachmentRequestDataAttributesAttachment" + type: object + PatchAttachmentRequestDataAttributesAttachment: + description: The updated attachment object. + properties: + documentUrl: + description: The updated URL for the attachment. + example: https://app.datadoghq.com/notebook/124/Postmortem-IR-124 + type: string + title: + description: The updated title for the attachment. + example: Postmortem-IR-124 + type: string + type: object + PatchComponentRequest: + description: Request object for updating a component. + example: + data: + attributes: + name: Metrics Intake Service + position: 4 + id: 1234abcd-12ab-34cd-56ef-123456abcdef + type: components + properties: + data: + $ref: "#/components/schemas/PatchComponentRequestData" + type: object + PatchComponentRequestData: + description: The data object for updating a component. + properties: + attributes: + $ref: "#/components/schemas/PatchComponentRequestDataAttributes" + id: + description: The ID of the component. + example: "1234abcd-12ab-34cd-56ef-123456abcdef" + format: uuid + type: string + type: + $ref: "#/components/schemas/StatusPagesComponentGroupType" + required: + - attributes + - id + - type + type: object + PatchComponentRequestDataAttributes: + description: The supported attributes for updating a component. + properties: + name: + description: The name of the component. + example: Web App + type: string + position: + description: The position of the component. If the component belongs to a group, the position is relative to the other components in the group. + example: 1 + format: int64 + type: integer + type: object + PatchDegradationRequest: + description: Request object for updating a degradation. + example: + data: + attributes: + components_affected: + - id: 1234abcd-12ab-34cd-56ef-123456abcdef + status: operational + description: We've deployed a fix and latency has returned to normal. This issue has been resolved. + status: resolved + id: 1234abcd-12ab-34cd-56ef-123456abcdef + type: degradations + properties: + data: + $ref: "#/components/schemas/PatchDegradationRequestData" + type: object + PatchDegradationRequestData: + description: The data object for updating a degradation. + properties: + attributes: + $ref: "#/components/schemas/PatchDegradationRequestDataAttributes" + id: + description: The ID of the degradation. + example: "1234abcd-12ab-34cd-56ef-123456abcdef" + format: uuid + type: string + type: + $ref: "#/components/schemas/PatchDegradationRequestDataType" + required: + - attributes + - id + - type + type: object + PatchDegradationRequestDataAttributes: + description: The supported attributes for updating a degradation. + properties: + components_affected: + description: The components affected by the degradation. + example: + - id: 1234abcd-12ab-34cd-56ef-123456abcdef + status: operational + items: + $ref: "#/components/schemas/PatchDegradationRequestDataAttributesComponentsAffectedItems" + type: array + description: + description: The description of the degradation. + example: We've deployed a fix and latency has returned to normal. This issue has been resolved. + type: string + status: + $ref: "#/components/schemas/PatchDegradationRequestDataAttributesStatus" + example: resolved + title: + description: The title of the degradation. + example: Elevated API Latency + type: string + type: object + PatchDegradationRequestDataAttributesComponentsAffectedItems: + description: A component affected by a degradation. + properties: + id: + description: The ID of the component. Must be a component of type `component`. + example: "1234abcd-12ab-34cd-56ef-123456abcdef" + format: uuid + type: string + name: + description: The name of the component. + readOnly: true + type: string + status: + $ref: "#/components/schemas/StatusPagesComponentDataAttributesStatus" + required: + - id + - status + type: object + PatchDegradationRequestDataAttributesStatus: + description: The status of the degradation. + enum: + - investigating + - identified + - monitoring + - resolved + type: string + x-enum-varnames: + - INVESTIGATING + - IDENTIFIED + - MONITORING + - RESOLVED + PatchDegradationRequestDataType: + default: degradations + description: Degradations resource type. + enum: + - degradations + example: degradations + type: string + x-enum-varnames: + - DEGRADATIONS + PatchIncidentNotificationTemplateRequest: + description: Update request for a notification template. + properties: + data: + $ref: "#/components/schemas/IncidentNotificationTemplateUpdateData" + required: + - data + type: object + PatchMaintenanceRequest: + description: Request object for updating a maintenance. + example: + data: + attributes: + completed_date: "2026-02-18T20:01:13.332360075Z" + in_progress_description: We are currently performing maintenance on the API to improve performance for 40 minutes. + scheduled_description: We will be performing maintenance on the API to improve performance for 40 minutes. + start_date: "2026-02-18T19:21:13.332360075Z" + title: API Maintenance + id: 1234abcd-12ab-34cd-56ef-123456abcdef + type: maintenances + properties: + data: + $ref: "#/components/schemas/PatchMaintenanceRequestData" + type: object + PatchMaintenanceRequestData: + description: The data object for updating a maintenance. + properties: + attributes: + $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributes" + id: + description: The ID of the maintenance. + example: "1234abcd-12ab-34cd-56ef-123456abcdef" + format: uuid + type: string + type: + $ref: "#/components/schemas/PatchMaintenanceRequestDataType" + required: + - attributes + - type + - id + type: object + PatchMaintenanceRequestDataAttributes: + description: The supported attributes for updating a maintenance. + properties: + completed_date: + description: Timestamp of when the maintenance was completed. + format: date-time + type: string + completed_description: + description: The description shown when the maintenance is completed. + type: string + components_affected: + description: The components affected by the maintenance. + items: + $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItems" + type: array + in_progress_description: + description: The description shown while the maintenance is in progress. + type: string + scheduled_description: + description: The description shown when the maintenance is scheduled. + type: string + start_date: + description: Timestamp of when the maintenance is scheduled to start. + format: date-time + type: string + status: + $ref: "#/components/schemas/MaintenanceDataAttributesStatus" + description: The status of the maintenance. + title: + description: The title of the maintenance. + type: string + type: object + PatchMaintenanceRequestDataAttributesComponentsAffectedItems: + description: A component affected by a maintenance. + properties: + id: + description: The ID of the component. Must be a component of type `component`. + example: "1234abcd-12ab-34cd-56ef-123456abcdef" + format: uuid + type: string + name: + description: The name of the component. + readOnly: true + type: string + status: + $ref: "#/components/schemas/PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus" + required: + - id + - status + type: object + PatchMaintenanceRequestDataAttributesComponentsAffectedItemsStatus: + description: The status of the component. + enum: + - operational + - maintenance + example: operational + type: string + x-enum-varnames: + - OPERATIONAL + - MAINTENANCE + PatchMaintenanceRequestDataType: + default: maintenances + description: Maintenances resource type. + enum: + - maintenances + example: maintenances + type: string + x-enum-varnames: + - MAINTENANCES PatchNotificationRuleParameters: description: Body of the notification rule patch request. properties: @@ -97477,410 +98543,989 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ListInterfaceTagsResponse" + $ref: "#/components/schemas/ListInterfaceTagsResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List tags for an interface + tags: + - Network Device Monitoring + patch: + description: Updates the tags associated with the specified interface. + operationId: UpdateInterfaceUserTags + parameters: + - description: The ID of the interface for which to update tags. + example: example:1.2.3.4:1 + in: path + name: interface_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ListInterfaceTagsResponse" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ListInterfaceTagsResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update the tags for an interface + tags: + - Network Device Monitoring + /api/v2/network/connections/aggregate: + get: + description: Get all aggregated connections. + operationId: GetAggregatedConnections + parameters: + - description: Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. + in: query + name: from + schema: + format: int64 + type: integer + - description: Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. + in: query + name: to + schema: + format: int64 + type: integer + - description: Comma-separated list of fields to group connections by. The maximum number of group_by(s) is 10. + in: query + name: group_by + schema: + type: string + - description: Comma-separated list of tags to filter connections by. + in: query + name: tags + schema: + type: string + - description: The number of connections to be returned. The maximum value is 7500. The default is 100. + in: query + name: limit + schema: + default: 100 + format: int32 + maximum: 7500 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SingleAggregatedConnectionResponseArray" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all aggregated connections + tags: + - Cloud Network Monitoring + /api/v2/network/dns/aggregate: + get: + description: Get all aggregated DNS traffic. + operationId: GetAggregatedDns + parameters: + - description: Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. + in: query + name: from + schema: + format: int64 + type: integer + - description: Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. + in: query + name: to + schema: + format: int64 + type: integer + - description: Comma-separated list of fields to group DNS traffic by. The server side defaults to `network.dns_query` if unspecified. `server_ungrouped` may be used if groups are not desired. The maximum number of group_by(s) is 10. + in: query + name: group_by + schema: + type: string + - description: Comma-separated list of tags to filter DNS traffic by. + in: query + name: tags + schema: + type: string + - description: The number of aggregated DNS entries to be returned. The maximum value is 7500. The default is 100. + in: query + name: limit + schema: + default: 100 + format: int32 + maximum: 7500 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SingleAggregatedDnsResponseArray" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all aggregated DNS traffic + tags: + - Cloud Network Monitoring + /api/v2/obs-pipelines/pipelines: + get: + description: Retrieve a list of pipelines. + operationId: ListPipelines + parameters: + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/PageNumber" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ListPipelinesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List pipelines + tags: + - Observability Pipelines + "x-permission": + operator: OR + permissions: + - observability_pipelines_read + post: + description: Create a new pipeline. + operationId: CreatePipeline + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ObservabilityPipelineSpec" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ObservabilityPipeline" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a new pipeline + tags: + - Observability Pipelines + "x-permission": + operator: OR + permissions: + - observability_pipelines_deploy + /api/v2/obs-pipelines/pipelines/validate: + post: + description: |- + Validates a pipeline configuration without creating or updating any resources. + Returns a list of validation errors, if any. + operationId: ValidatePipeline + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ObservabilityPipelineSpec" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ValidationResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Validate an observability pipeline + tags: + - Observability Pipelines + "x-permission": + operator: OR + permissions: + - observability_pipelines_read + /api/v2/obs-pipelines/pipelines/{pipeline_id}: + delete: + description: Delete a pipeline. + operationId: DeletePipeline + parameters: + - description: The ID of the pipeline to delete. + in: path + name: pipeline_id + required: true + schema: + type: string + responses: + "204": + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a pipeline + tags: + - Observability Pipelines + "x-permission": + operator: OR + permissions: + - observability_pipelines_delete + get: + description: Get a specific pipeline by its ID. + operationId: GetPipeline + parameters: + - description: The ID of the pipeline to retrieve. + in: path + name: pipeline_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ObservabilityPipeline" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a specific pipeline + tags: + - Observability Pipelines + "x-permission": + operator: OR + permissions: + - observability_pipelines_read + put: + description: Update a pipeline. + operationId: UpdatePipeline + parameters: + - description: The ID of the pipeline to update. + in: path + name: pipeline_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ObservabilityPipeline" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ObservabilityPipeline" description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" "403": - $ref: "#/components/responses/ForbiddenResponse" + $ref: "#/components/responses/NotAuthorizedResponse" "404": $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: List tags for an interface + summary: Update a pipeline tags: - - Network Device Monitoring - patch: - description: Updates the tags associated with the specified interface. - operationId: UpdateInterfaceUserTags + - Observability Pipelines + "x-permission": + operator: OR + permissions: + - observability_pipelines_deploy + /api/v2/on-call/escalation-policies: + post: + description: Create a new On-Call escalation policy + operationId: CreateOnCallEscalationPolicy parameters: - - description: The ID of the interface for which to update tags. - example: example:1.2.3.4:1 - in: path - name: interface_id - required: true + - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`." + in: query + name: include schema: type: string requestBody: content: application/json: schema: - $ref: "#/components/schemas/ListInterfaceTagsResponse" + $ref: "#/components/schemas/EscalationPolicyCreateRequest" required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/ListInterfaceTagsResponse" - description: OK + $ref: "#/components/schemas/EscalationPolicy" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" "403": $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Update the tags for an interface + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create On-Call escalation policy tags: - - Network Device Monitoring - /api/v2/network/connections/aggregate: - get: - description: Get all aggregated connections. - operationId: GetAggregatedConnections + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_write + /api/v2/on-call/escalation-policies/{policy_id}: + delete: + description: Delete an On-Call escalation policy + operationId: DeleteOnCallEscalationPolicy parameters: - - description: Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. - in: query - name: from - schema: - format: int64 - type: integer - - description: Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. - in: query - name: to - schema: - format: int64 - type: integer - - description: Comma-separated list of fields to group connections by. The maximum number of group_by(s) is 10. - in: query - name: group_by - schema: - type: string - - description: Comma-separated list of tags to filter connections by. - in: query - name: tags + - description: The ID of the escalation policy + in: path + name: policy_id + required: true schema: + example: a3000000-0000-0000-0000-000000000000 type: string - - description: The number of connections to be returned. The maximum value is 7500. The default is 100. - in: query - name: limit - schema: - default: 100 - format: int32 - maximum: 7500 - minimum: 1 - type: integer responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/SingleAggregatedConnectionResponseArray" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" + "204": + description: No Content + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get all aggregated connections + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete On-Call escalation policy tags: - - Cloud Network Monitoring - /api/v2/network/dns/aggregate: + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_write get: - description: Get all aggregated DNS traffic. - operationId: GetAggregatedDns + description: Get an On-Call escalation policy + operationId: GetOnCallEscalationPolicy parameters: - - description: Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. - in: query - name: from - schema: - format: int64 - type: integer - - description: Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`. - in: query - name: to - schema: - format: int64 - type: integer - - description: Comma-separated list of fields to group DNS traffic by. The server side defaults to `network.dns_query` if unspecified. `server_ungrouped` may be used if groups are not desired. The maximum number of group_by(s) is 10. - in: query - name: group_by + - description: The ID of the escalation policy + in: path + name: policy_id + required: true schema: + example: a3000000-0000-0000-0000-000000000000 type: string - - description: Comma-separated list of tags to filter DNS traffic by. + - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`." in: query - name: tags + name: include schema: type: string - - description: The number of aggregated DNS entries to be returned. The maximum value is 7500. The default is 100. - in: query - name: limit - schema: - default: 100 - format: int32 - maximum: 7500 - minimum: 1 - type: integer responses: "200": content: application/json: schema: - $ref: "#/components/schemas/SingleAggregatedDnsResponseArray" + $ref: "#/components/schemas/EscalationPolicy" description: OK "400": $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get all aggregated DNS traffic + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get On-Call escalation policy tags: - - Cloud Network Monitoring - /api/v2/obs-pipelines/pipelines: - get: - description: Retrieve a list of pipelines. - operationId: ListPipelines + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_read + put: + description: Update an On-Call escalation policy + operationId: UpdateOnCallEscalationPolicy parameters: - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageNumber" + - description: The ID of the escalation policy + in: path + name: policy_id + required: true + schema: + example: a3000000-0000-0000-0000-000000000000 + type: string + - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`." + in: query + name: include + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EscalationPolicyUpdateRequest" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ListPipelinesResponse" + $ref: "#/components/schemas/EscalationPolicy" description: OK "400": $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" "403": - $ref: "#/components/responses/NotAuthorizedResponse" + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: List pipelines + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update On-Call escalation policy tags: - - Observability Pipelines + - On-Call "x-permission": - operator: OR + operator: AND permissions: - - observability_pipelines_read + - on_call_write + /api/v2/on-call/pages: post: - description: Create a new pipeline. - operationId: CreatePipeline + description: |- + Trigger a new On-Call Page. + operationId: CreateOnCallPage requestBody: content: application/json: schema: - $ref: "#/components/schemas/ObservabilityPipelineSpec" + $ref: "#/components/schemas/CreatePageRequest" required: true responses: - "201": + "200": content: application/json: schema: - $ref: "#/components/schemas/ObservabilityPipeline" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "403": - $ref: "#/components/responses/NotAuthorizedResponse" - "409": - $ref: "#/components/responses/ConflictResponse" + $ref: "#/components/schemas/CreatePageResponse" + description: OK. "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Create a new pipeline + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + servers: + - url: https://{site} + variables: + site: + default: navy.oncall.datadoghq.com + description: The globally available endpoint for On-Call. + enum: + - lava.oncall.datadoghq.com + - saffron.oncall.datadoghq.com + - navy.oncall.datadoghq.com + - coral.oncall.datadoghq.com + - teal.oncall.datadoghq.com + - beige.oncall.datadoghq.eu + - url: "{protocol}://{name}" + variables: + name: + default: api.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: api + description: The subdomain where the API is deployed. + summary: Create On-Call Page tags: - - Observability Pipelines - "x-permission": - operator: OR - permissions: - - observability_pipelines_deploy - /api/v2/obs-pipelines/pipelines/validate: + - On-Call Paging + /api/v2/on-call/pages/{page_id}/acknowledge: post: description: |- - Validates a pipeline configuration without creating or updating any resources. - Returns a list of validation errors, if any. - operationId: ValidatePipeline + Acknowledges an On-Call Page. + operationId: AcknowledgeOnCallPage + parameters: + - description: The page ID. + in: path + name: page_id + required: true + schema: + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + format: uuid + type: string + responses: + "202": + description: Accepted. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + servers: + - url: https://{site} + variables: + site: + default: navy.oncall.datadoghq.com + description: The globally available endpoint for On-Call. + enum: + - lava.oncall.datadoghq.com + - saffron.oncall.datadoghq.com + - navy.oncall.datadoghq.com + - coral.oncall.datadoghq.com + - teal.oncall.datadoghq.com + - beige.oncall.datadoghq.eu + - url: "{protocol}://{name}" + variables: + name: + default: api.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: api + description: The subdomain where the API is deployed. + summary: Acknowledge On-Call Page + tags: + - On-Call Paging + /api/v2/on-call/pages/{page_id}/escalate: + post: + description: |- + Escalates an On-Call Page. + operationId: EscalateOnCallPage + parameters: + - description: The page ID. + in: path + name: page_id + required: true + schema: + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + format: uuid + type: string + responses: + "202": + description: Accepted. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + servers: + - url: https://{site} + variables: + site: + default: navy.oncall.datadoghq.com + description: The globally available endpoint for On-Call. + enum: + - lava.oncall.datadoghq.com + - saffron.oncall.datadoghq.com + - navy.oncall.datadoghq.com + - coral.oncall.datadoghq.com + - teal.oncall.datadoghq.com + - beige.oncall.datadoghq.eu + - url: "{protocol}://{name}" + variables: + name: + default: api.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: api + description: The subdomain where the API is deployed. + summary: Escalate On-Call Page + tags: + - On-Call Paging + /api/v2/on-call/pages/{page_id}/resolve: + post: + description: |- + Resolves an On-Call Page. + operationId: ResolveOnCallPage + parameters: + - description: The page ID. + in: path + name: page_id + required: true + schema: + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + format: uuid + type: string + responses: + "202": + description: Accepted. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + servers: + - url: https://{site} + variables: + site: + default: navy.oncall.datadoghq.com + description: The globally available endpoint for On-Call. + enum: + - lava.oncall.datadoghq.com + - saffron.oncall.datadoghq.com + - navy.oncall.datadoghq.com + - coral.oncall.datadoghq.com + - teal.oncall.datadoghq.com + - beige.oncall.datadoghq.eu + - url: "{protocol}://{name}" + variables: + name: + default: api.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: api + description: The subdomain where the API is deployed. + summary: Resolve On-Call Page + tags: + - On-Call Paging + /api/v2/on-call/schedules: + post: + description: Create a new On-Call schedule + operationId: CreateOnCallSchedule + parameters: + - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`." + in: query + name: include + schema: + type: string requestBody: content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/ObservabilityPipelineSpec" + $ref: "#/components/schemas/ScheduleCreateRequest" required: true responses: - "200": + "201": content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/ValidationResponse" - description: OK + $ref: "#/components/schemas/Schedule" + description: Created "400": $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" "403": - $ref: "#/components/responses/NotAuthorizedResponse" + $ref: "#/components/responses/ForbiddenResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Validate an observability pipeline + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create On-Call schedule tags: - - Observability Pipelines + - On-Call "x-permission": - operator: OR + operator: AND permissions: - - observability_pipelines_read - /api/v2/obs-pipelines/pipelines/{pipeline_id}: + - on_call_write + /api/v2/on-call/schedules/{schedule_id}: delete: - description: Delete a pipeline. - operationId: DeletePipeline + description: Delete an On-Call schedule + operationId: DeleteOnCallSchedule parameters: - - description: The ID of the pipeline to delete. + - description: The ID of the schedule in: path - name: pipeline_id + name: schedule_id required: true schema: + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d type: string responses: "204": - description: OK + description: No Content + "401": + $ref: "#/components/responses/UnauthorizedResponse" "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden + $ref: "#/components/responses/ForbiddenResponse" "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Conflict + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Delete a pipeline + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete On-Call schedule tags: - - Observability Pipelines + - On-Call "x-permission": - operator: OR + operator: AND permissions: - - observability_pipelines_delete + - on_call_write get: - description: Get a specific pipeline by its ID. - operationId: GetPipeline + description: Get an On-Call schedule + operationId: GetOnCallSchedule parameters: - - description: The ID of the pipeline to retrieve. + - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`." + in: query + name: include + schema: + type: string + - description: The ID of the schedule in: path - name: pipeline_id + name: schedule_id required: true schema: + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d type: string responses: "200": content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/ObservabilityPipeline" + $ref: "#/components/schemas/Schedule" description: OK + "401": + $ref: "#/components/responses/UnauthorizedResponse" "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get a specific pipeline + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get On-Call schedule tags: - - Observability Pipelines + - On-Call "x-permission": - operator: OR + operator: AND permissions: - - observability_pipelines_read + - on_call_read put: - description: Update a pipeline. - operationId: UpdatePipeline + description: Update a new On-Call schedule + operationId: UpdateOnCallSchedule parameters: - - description: The ID of the pipeline to update. + - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`." + in: query + name: include + schema: + type: string + - description: The ID of the schedule in: path - name: pipeline_id + name: schedule_id required: true schema: + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d type: string requestBody: content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/ObservabilityPipeline" + $ref: "#/components/schemas/ScheduleUpdateRequest" required: true responses: "200": content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/ObservabilityPipeline" + $ref: "#/components/schemas/Schedule" description: OK "400": $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" "403": - $ref: "#/components/responses/NotAuthorizedResponse" + $ref: "#/components/responses/ForbiddenResponse" "404": $ref: "#/components/responses/NotFoundResponse" - "409": - $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Update a pipeline + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update On-Call schedule tags: - - Observability Pipelines + - On-Call "x-permission": - operator: OR + operator: AND permissions: - - observability_pipelines_deploy - /api/v2/on-call/escalation-policies: - post: - description: Create a new On-Call escalation policy - operationId: CreateOnCallEscalationPolicy + - on_call_write + /api/v2/on-call/schedules/{schedule_id}/on-call: + get: + description: "Retrieves the user who is on-call for the specified schedule at a given time." + operationId: GetScheduleOnCallUser parameters: - - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`." + - description: "Specifies related resources to include in the response as a comma-separated list. Allowed value: `user`." in: query name: include schema: type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/EscalationPolicyCreateRequest" - required: true + - description: The ID of the schedule. + in: path + name: schedule_id + required: true + schema: + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + - description: Retrieves the on-call user at the given timestamp in RFC3339 format (for example, `2025-05-07T02:53:01Z` or `2025-05-07T02:53:01+00:00`). When using timezone offsets with `+` or `-`, ensure proper URL encoding (`+` should be encoded as `%2B`). Defaults to the current time if omitted. + in: query + name: filter[at_ts] + schema: + example: "2025-05-07T02:53:01Z" + type: string responses: - "201": + "200": content: application/json: schema: - $ref: "#/components/schemas/EscalationPolicy" - description: Created + $ref: "#/components/schemas/Shift" + description: OK "400": $ref: "#/components/responses/BadRequestResponse" "401": $ref: "#/components/responses/UnauthorizedResponse" "403": $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Create On-Call escalation policy + summary: Get scheduled on-call user tags: - On-Call "x-permission": operator: AND permissions: - - on_call_write - /api/v2/on-call/escalation-policies/{policy_id}: - delete: - description: Delete an On-Call escalation policy - operationId: DeleteOnCallEscalationPolicy + - on_call_read + /api/v2/on-call/teams/{team_id}/on-call: + get: + description: Get a team's on-call users at a given time + operationId: GetTeamOnCallUsers parameters: - - description: The ID of the escalation policy + - description: "Comma-separated list of included relationships to be returned. Allowed values: `responders`, `escalations`, `escalations.responders`." + in: query + name: include + schema: + type: string + - description: The team ID in: path - name: policy_id + name: team_id required: true schema: - example: a3000000-0000-0000-0000-000000000000 + example: 27590dae-47be-4a7d-9abf-8f4e45124020 type: string responses: - "204": - description: No Content + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TeamOnCallResponders" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" "401": $ref: "#/components/responses/UnauthorizedResponse" "403": @@ -97893,25 +99538,26 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Delete On-Call escalation policy + summary: Get team on-call users tags: - On-Call "x-permission": operator: AND permissions: - - on_call_write + - on_call_read + /api/v2/on-call/teams/{team_id}/routing-rules: get: - description: Get an On-Call escalation policy - operationId: GetOnCallEscalationPolicy + description: Get a team's On-Call routing rules + operationId: GetOnCallTeamRoutingRules parameters: - - description: The ID of the escalation policy + - description: The team ID in: path - name: policy_id + name: team_id required: true schema: - example: a3000000-0000-0000-0000-000000000000 + example: 27590dae-47be-4a7d-9abf-8f4e45124020 type: string - - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`." + - description: "Comma-separated list of included relationships to be returned. Allowed values: `rules`, `rules.policy`." in: query name: include schema: @@ -97921,23 +99567,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/EscalationPolicy" + $ref: "#/components/schemas/TeamRoutingRules" description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get On-Call escalation policy + summary: Get On-Call team routing rules tags: - On-Call "x-permission": @@ -97945,17 +99583,17 @@ paths: permissions: - on_call_read put: - description: Update an On-Call escalation policy - operationId: UpdateOnCallEscalationPolicy + description: Set a team's On-Call routing rules + operationId: SetOnCallTeamRoutingRules parameters: - - description: The ID of the escalation policy + - description: The team ID in: path - name: policy_id + name: team_id required: true schema: - example: a3000000-0000-0000-0000-000000000000 + example: 27590dae-47be-4a7d-9abf-8f4e45124020 type: string - - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `steps`, `steps.targets`." + - description: "Comma-separated list of included relationships to be returned. Allowed values: `rules`, `rules.policy`." in: query name: include schema: @@ -97964,14 +99602,46 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/EscalationPolicyUpdateRequest" + $ref: "#/components/schemas/TeamRoutingRulesRequest" required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/EscalationPolicy" + $ref: "#/components/schemas/TeamRoutingRules" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Set On-Call team routing rules + tags: + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_write + /api/v2/on-call/users/{user_id}/notification-channels: + get: + description: List the notification channels for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: ListUserNotificationChannels + parameters: + - description: The user ID + in: path + name: user_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000000 + type: string + responses: + "200": + content: + "application/json": + schema: + $ref: "#/components/schemas/ListNotificationChannelsResponse" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -97987,256 +99657,215 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Update On-Call escalation policy + summary: List On-Call notification channels for a user tags: - On-Call "x-permission": operator: AND permissions: - - on_call_write - /api/v2/on-call/pages: + - on_call_read post: - description: |- - Trigger a new On-Call Page. - operationId: CreateOnCallPage + description: Create a new notification channel for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: CreateUserNotificationChannel + parameters: + - description: The user ID + in: path + name: user_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000000 + type: string requestBody: content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/CreatePageRequest" + $ref: "#/components/schemas/CreateUserNotificationChannelRequest" required: true responses: - "200": + "201": content: - application/json: + "application/json": schema: - $ref: "#/components/schemas/CreatePageResponse" - description: OK. + $ref: "#/components/schemas/NotificationChannel" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - servers: - - url: https://{site} - variables: - site: - default: navy.oncall.datadoghq.com - description: The globally available endpoint for On-Call. - enum: - - lava.oncall.datadoghq.com - - saffron.oncall.datadoghq.com - - navy.oncall.datadoghq.com - - coral.oncall.datadoghq.com - - teal.oncall.datadoghq.com - - beige.oncall.datadoghq.eu - - url: "{protocol}://{name}" - variables: - name: - default: api.datadoghq.com - description: Full site DNS name. - protocol: - default: https - description: The protocol for accessing the API. - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: Any Datadog deployment. - subdomain: - default: api - description: The subdomain where the API is deployed. - summary: Create On-Call Page + summary: Create an On-Call notification channel for a user tags: - - On-Call Paging - /api/v2/on-call/pages/{page_id}/acknowledge: - post: - description: |- - Acknowledges an On-Call Page. - operationId: AcknowledgeOnCallPage + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_respond + /api/v2/on-call/users/{user_id}/notification-channels/{channel_id}: + delete: + description: Delete a notification channel for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: DeleteUserNotificationChannel parameters: - - description: The page ID. + - description: The user ID in: path - name: page_id + name: user_id required: true schema: - example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f - format: uuid + example: 00000000-0000-0000-0000-000000000000 + type: string + - description: The channel ID + in: path + name: channel_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000000 type: string responses: - "202": - description: Accepted. + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - servers: - - url: https://{site} - variables: - site: - default: navy.oncall.datadoghq.com - description: The globally available endpoint for On-Call. - enum: - - lava.oncall.datadoghq.com - - saffron.oncall.datadoghq.com - - navy.oncall.datadoghq.com - - coral.oncall.datadoghq.com - - teal.oncall.datadoghq.com - - beige.oncall.datadoghq.eu - - url: "{protocol}://{name}" - variables: - name: - default: api.datadoghq.com - description: Full site DNS name. - protocol: - default: https - description: The protocol for accessing the API. - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: Any Datadog deployment. - subdomain: - default: api - description: The subdomain where the API is deployed. - summary: Acknowledge On-Call Page + summary: Delete an On-Call notification channel for a user tags: - - On-Call Paging - /api/v2/on-call/pages/{page_id}/escalate: - post: - description: |- - Escalates an On-Call Page. - operationId: EscalateOnCallPage + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_respond + get: + description: Get a notification channel for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: GetUserNotificationChannel parameters: - - description: The page ID. + - description: The user ID in: path - name: page_id + name: user_id required: true schema: - example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f - format: uuid + example: 00000000-0000-0000-0000-000000000000 + type: string + - description: The channel ID + in: path + name: channel_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000000 type: string responses: - "202": - description: Accepted. + "200": + content: + "application/json": + schema: + $ref: "#/components/schemas/NotificationChannel" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - servers: - - url: https://{site} - variables: - site: - default: navy.oncall.datadoghq.com - description: The globally available endpoint for On-Call. - enum: - - lava.oncall.datadoghq.com - - saffron.oncall.datadoghq.com - - navy.oncall.datadoghq.com - - coral.oncall.datadoghq.com - - teal.oncall.datadoghq.com - - beige.oncall.datadoghq.eu - - url: "{protocol}://{name}" - variables: - name: - default: api.datadoghq.com - description: Full site DNS name. - protocol: - default: https - description: The protocol for accessing the API. - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: Any Datadog deployment. - subdomain: - default: api - description: The subdomain where the API is deployed. - summary: Escalate On-Call Page + summary: Get an On-Call notification channel for a user tags: - - On-Call Paging - /api/v2/on-call/pages/{page_id}/resolve: - post: - description: |- - Resolves an On-Call Page. - operationId: ResolveOnCallPage + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_read + /api/v2/on-call/users/{user_id}/notification-rules: + get: + description: List the notification rules for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: ListUserNotificationRules parameters: - - description: The page ID. + - description: "Comma-separated list of included relationships to be returned. Allowed values: `channel`." + in: query + name: include + schema: + type: string + - description: The user ID in: path - name: page_id + name: user_id required: true schema: - example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f - format: uuid + example: 00000000-0000-0000-0000-000000000000 type: string responses: - "202": - description: Accepted. + "200": + content: + "application/json": + schema: + $ref: "#/components/schemas/ListOnCallNotificationRulesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - servers: - - url: https://{site} - variables: - site: - default: navy.oncall.datadoghq.com - description: The globally available endpoint for On-Call. - enum: - - lava.oncall.datadoghq.com - - saffron.oncall.datadoghq.com - - navy.oncall.datadoghq.com - - coral.oncall.datadoghq.com - - teal.oncall.datadoghq.com - - beige.oncall.datadoghq.eu - - url: "{protocol}://{name}" - variables: - name: - default: api.datadoghq.com - description: Full site DNS name. - protocol: - default: https - description: The protocol for accessing the API. - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: Any Datadog deployment. - subdomain: - default: api - description: The subdomain where the API is deployed. - summary: Resolve On-Call Page + summary: List On-Call notification rules for a user tags: - - On-Call Paging - /api/v2/on-call/schedules: + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_read post: - description: Create a new On-Call schedule - operationId: CreateOnCallSchedule + description: Create a new notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: CreateUserNotificationRule parameters: - - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`." - in: query - name: include + - description: The user ID + in: path + name: user_id + required: true schema: + example: 00000000-0000-0000-0000-000000000000 type: string requestBody: content: "application/json": schema: - $ref: "#/components/schemas/ScheduleCreateRequest" + $ref: "#/components/schemas/CreateOnCallNotificationRuleRequest" required: true responses: "201": content: "application/json": schema: - $ref: "#/components/schemas/Schedule" + $ref: "#/components/schemas/OnCallNotificationRule" description: Created "400": $ref: "#/components/responses/BadRequestResponse" @@ -98244,34 +99873,45 @@ paths: $ref: "#/components/responses/UnauthorizedResponse" "403": $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Create On-Call schedule + summary: Create an On-Call notification rule for a user tags: - On-Call "x-permission": operator: AND permissions: - - on_call_write - /api/v2/on-call/schedules/{schedule_id}: + - on_call_respond + /api/v2/on-call/users/{user_id}/notification-rules/{rule_id}: delete: - description: Delete an On-Call schedule - operationId: DeleteOnCallSchedule + description: Delete a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: DeleteUserNotificationRule parameters: - - description: The ID of the schedule + - description: The user ID in: path - name: schedule_id + name: user_id required: true schema: - example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + example: 00000000-0000-0000-0000-000000000000 + type: string + - description: The rule ID + in: path + name: rule_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000000 type: string responses: "204": description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" "401": $ref: "#/components/responses/UnauthorizedResponse" "403": @@ -98284,36 +99924,45 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Delete On-Call schedule + summary: Delete an On-Call notification rule for a user tags: - On-Call "x-permission": - operator: AND + operator: OR permissions: - - on_call_write + - on_call_respond get: - description: Get an On-Call schedule - operationId: GetOnCallSchedule + description: Get a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: GetUserNotificationRule parameters: - - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`." - in: query - name: include + - description: The user ID + in: path + name: user_id + required: true schema: + example: 00000000-0000-0000-0000-000000000000 type: string - - description: The ID of the schedule + - description: The rule ID in: path - name: schedule_id + name: rule_id required: true schema: - example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + example: 00000000-0000-0000-0000-000000000000 + type: string + - description: "Comma-separated list of included relationships to be returned. Allowed values: `channel`." + in: query + name: include + schema: type: string responses: "200": content: "application/json": schema: - $ref: "#/components/schemas/Schedule" + $ref: "#/components/schemas/OnCallNotificationRule" description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" "401": $ref: "#/components/responses/UnauthorizedResponse" "403": @@ -98326,41 +99975,48 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get On-Call schedule + summary: Get an On-Call notification rule for a user tags: - On-Call "x-permission": - operator: AND + operator: OR permissions: - on_call_read put: - description: Update a new On-Call schedule - operationId: UpdateOnCallSchedule + description: Update a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission + operationId: UpdateUserNotificationRule parameters: - - description: "Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`." - in: query - name: include + - description: The user ID + in: path + name: user_id + required: true schema: + example: 00000000-0000-0000-0000-000000000000 type: string - - description: The ID of the schedule + - description: The rule ID in: path - name: schedule_id + name: rule_id required: true schema: - example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + example: 00000000-0000-0000-0000-000000000000 + type: string + - description: "Comma-separated list of included relationships to be returned. Allowed values: `channel`." + in: query + name: include + schema: type: string requestBody: content: "application/json": schema: - $ref: "#/components/schemas/ScheduleUpdateRequest" + $ref: "#/components/schemas/UpdateOnCallNotificationRuleRequest" required: true responses: "200": content: "application/json": schema: - $ref: "#/components/schemas/Schedule" + $ref: "#/components/schemas/OnCallNotificationRule" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -98376,42 +100032,153 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Update On-Call schedule + summary: Update an On-Call notification rule for a user tags: - On-Call "x-permission": - operator: AND + operator: OR permissions: - - on_call_write - /api/v2/on-call/schedules/{schedule_id}/on-call: + - on_call_read + /api/v2/org_configs: get: - description: "Retrieves the user who is on-call for the specified schedule at a given time." - operationId: GetScheduleOnCallUser + description: Returns all Org Configs (name, description, and value). + operationId: ListOrgConfigs + responses: + "200": + content: + application/json: + schema: {$ref: "#/components/schemas/OrgConfigListResponse"} + description: OK + "400": {$ref: "#/components/responses/BadRequestResponse"} + "401": {$ref: "#/components/responses/UnauthorizedResponse"} + "403": {$ref: "#/components/responses/ForbiddenResponse"} + "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + summary: List Org Configs + tags: [Organizations] + "x-permission": + operator: OPEN + permissions: [] + /api/v2/org_configs/{org_config_name}: + get: + description: Return the name, description, and value of a specific Org Config. + operationId: GetOrgConfig + parameters: [$ref: "#/components/parameters/OrgConfigName"] + responses: + "200": + content: + application/json: + schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + description: OK + "400": {$ref: "#/components/responses/BadRequestResponse"} + "401": {$ref: "#/components/responses/UnauthorizedResponse"} + "403": {$ref: "#/components/responses/ForbiddenResponse"} + "404": {$ref: "#/components/responses/NotFoundResponse"} + "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + summary: Get a specific Org Config value + tags: [Organizations] + "x-permission": + operator: OPEN + permissions: [] + patch: + description: Update the value of a specific Org Config. + operationId: UpdateOrgConfig + parameters: [$ref: "#/components/parameters/OrgConfigName"] + requestBody: + content: + application/json: + schema: {$ref: "#/components/schemas/OrgConfigWriteRequest"} + required: true + responses: + "200": + content: + application/json: + schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + description: OK + "400": {$ref: "#/components/responses/BadRequestResponse"} + "401": {$ref: "#/components/responses/UnauthorizedResponse"} + "403": {$ref: "#/components/responses/ForbiddenResponse"} + "404": {$ref: "#/components/responses/NotFoundResponse"} + "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + summary: Update a specific Org Config + tags: [Organizations] + "x-permission": + operator: OR + permissions: + - org_management + /api/v2/org_connections: + get: + description: Returns a list of org connections. + operationId: ListOrgConnections parameters: - - description: "Specifies related resources to include in the response as a comma-separated list. Allowed value: `user`." + - description: The Org ID of the sink org. + example: "0879ce27-29a1-481f-a12e-bc2a48ec9ae1" in: query - name: include + name: sink_org_id + required: false schema: type: string - - description: The ID of the schedule. - in: path - name: schedule_id - required: true + - description: The Org ID of the source org. + example: "0879ce27-29a1-481f-a12e-bc2a48ec9ae1" + in: query + name: source_org_id + required: false schema: - example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d type: string - - description: Retrieves the on-call user at the given timestamp in RFC3339 format (for example, `2025-05-07T02:53:01Z` or `2025-05-07T02:53:01+00:00`). When using timezone offsets with `+` or `-`, ensure proper URL encoding (`+` should be encoded as `%2B`). Defaults to the current time if omitted. + - description: The limit of number of entries you want to return. Default is 1000. + example: 1000 in: query - name: filter[at_ts] + name: limit + required: false schema: - example: "2025-05-07T02:53:01Z" - type: string + format: int64 + type: integer + - description: The pagination offset which you want to query from. Default is 0. + example: 0 + in: query + name: offset + required: false + schema: + format: int64 + type: integer responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Shift" + $ref: "#/components/schemas/OrgConnectionListResponse" + description: OK + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_connections_read + summary: List Org Connections + tags: ["Org Connections"] + "x-permission": + operator: OR + permissions: + - org_connections_read + post: + description: Create a new org connection between the current org and a target org. + operationId: CreateOrgConnections + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrgConnectionCreateRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OrgConnectionResponse" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -98421,42 +100188,69 @@ paths: $ref: "#/components/responses/ForbiddenResponse" "404": $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get scheduled on-call user - tags: - - On-Call + - AuthZ: + - org_connections_write + summary: Create Org Connection + tags: ["Org Connections"] + x-codegen-request-body-name: body "x-permission": - operator: AND + operator: OR permissions: - - on_call_read - /api/v2/on-call/teams/{team_id}/on-call: - get: - description: Get a team's on-call users at a given time - operationId: GetTeamOnCallUsers + - org_connections_write + /api/v2/org_connections/{connection_id}: + delete: + description: Delete an existing org connection. + operationId: DeleteOrgConnections parameters: - - description: "Comma-separated list of included relationships to be returned. Allowed values: `responders`, `escalations`, `escalations.responders`." - in: query - name: include - schema: - type: string - - description: The team ID - in: path - name: team_id - required: true - schema: - example: 27590dae-47be-4a7d-9abf-8f4e45124020 - type: string + - $ref: "#/components/parameters/OrgConnectionId" + responses: + "200": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_connections_write + summary: Delete Org Connection + tags: ["Org Connections"] + "x-permission": + operator: OR + permissions: + - org_connections_write + patch: + description: Update an existing org connection. + operationId: UpdateOrgConnections + parameters: + - $ref: "#/components/parameters/OrgConnectionId" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrgConnectionUpdateRequest" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/TeamOnCallResponders" + $ref: "#/components/schemas/OrgConnectionResponse" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -98471,742 +100265,1222 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get team on-call users - tags: - - On-Call + - AuthZ: + - org_connections_write + summary: Update Org Connection + tags: ["Org Connections"] "x-permission": - operator: AND + operator: OR permissions: - - on_call_read - /api/v2/on-call/teams/{team_id}/routing-rules: + - org_connections_write + /api/v2/org_group_memberships: get: - description: Get a team's On-Call routing rules - operationId: GetOnCallTeamRoutingRules + description: >- + List organization group memberships. Filter by org group ID or org UUID. At least one of `filter[org_group_id]` or `filter[org_uuid]` must be provided. When filtering by org UUID, returns a single-item list with the membership for that org. + operationId: ListOrgGroupMemberships parameters: - - description: The team ID - in: path - name: team_id - required: true - schema: - example: 27590dae-47be-4a7d-9abf-8f4e45124020 - type: string - - description: "Comma-separated list of included relationships to be returned. Allowed values: `rules`, `rules.policy`." - in: query - name: include - schema: - type: string + - $ref: "#/components/parameters/OrgGroupMembershipFilterOrgGroupId" + - $ref: "#/components/parameters/OrgGroupMembershipFilterOrgUuid" + - $ref: "#/components/parameters/OrgGroupPageNumber" + - $ref: "#/components/parameters/OrgGroupPageSize" + - $ref: "#/components/parameters/MembershipSort" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + org_name: "Acme Corp" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_memberships + meta: + page: + total_count: 1 + schema: + $ref: "#/components/schemas/OrgGroupMembershipListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List org group memberships + tags: [Org Groups] + "x-permission": + operator: OR + permissions: + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_memberships/bulk: + patch: + description: >- + Move a batch of organizations from one org group to another. This is an atomic operation. Maximum 100 orgs per request. + operationId: BulkUpdateOrgGroupMemberships + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + orgs: + - org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + relationships: + source_org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + target_org_group: + data: + id: "d4e5f6a7-b890-1234-cdef-567890abcdef" + type: org_groups + type: org_group_membership_bulk_updates + schema: + $ref: "#/components/schemas/OrgGroupMembershipBulkUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-16T14:00:00Z" + org_name: "Acme Corp" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + relationships: + org_group: + data: + id: "d4e5f6a7-b890-1234-cdef-567890abcdef" + type: org_groups + type: org_group_memberships + schema: + $ref: "#/components/schemas/OrgGroupMembershipListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Bulk update org group memberships + tags: [Org Groups] + "x-permission": + operator: OR + permissions: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_memberships/{org_group_membership_id}: + get: + description: Get a specific organization group membership by its ID. + operationId: GetOrgGroupMembership + parameters: + - $ref: "#/components/parameters/OrgGroupMembershipId" responses: "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + org_name: "Acme Corp" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_memberships + schema: + $ref: "#/components/schemas/OrgGroupMembershipResponse" + description: OK + "400": content: application/json: schema: - $ref: "#/components/schemas/TeamRoutingRules" - description: OK + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Get On-Call team routing rules - tags: - - On-Call + summary: Get an org group membership + tags: [Org Groups] "x-permission": - operator: AND + operator: OR permissions: - - on_call_read - put: - description: Set a team's On-Call routing rules - operationId: SetOnCallTeamRoutingRules + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Move an organization to a different org group by updating its membership. + operationId: UpdateOrgGroupMembership parameters: - - description: The team ID - in: path - name: team_id - required: true - schema: - example: 27590dae-47be-4a7d-9abf-8f4e45124020 - type: string - - description: "Comma-separated list of included relationships to be returned. Allowed values: `rules`, `rules.policy`." - in: query - name: include - schema: - type: string + - $ref: "#/components/parameters/OrgGroupMembershipId" requestBody: content: application/json: + examples: + default: + value: + data: + id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_memberships schema: - $ref: "#/components/schemas/TeamRoutingRulesRequest" + $ref: "#/components/schemas/OrgGroupMembershipUpdateRequest" required: true responses: "200": content: application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-16T14:00:00Z" + org_name: "Acme Corp" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_memberships schema: - $ref: "#/components/schemas/TeamRoutingRules" + $ref: "#/components/schemas/OrgGroupMembershipResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Set On-Call team routing rules - tags: - - On-Call + summary: Update an org group membership + tags: [Org Groups] "x-permission": - operator: AND + operator: OR permissions: - - on_call_write - /api/v2/on-call/users/{user_id}/notification-channels: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_policies: get: - description: List the notification channels for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: ListUserNotificationChannels + description: List policies for an organization group. Requires a filter on org group ID. + operationId: ListOrgGroupPolicies parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string + - $ref: "#/components/parameters/OrgGroupPolicyFilterOrgGroupId" + - $ref: "#/components/parameters/OrgGroupPolicyFilterPolicyName" + - $ref: "#/components/parameters/OrgGroupPageNumber" + - $ref: "#/components/parameters/OrgGroupPageSize" + - $ref: "#/components/parameters/PolicySort" responses: "200": content: - "application/json": + application/json: + examples: + default: + value: + data: + - attributes: + content: + value: "UTC" + enforced_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + policy_name: "monitor_timezone" + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_policies + meta: + page: + total_count: 1 schema: - $ref: "#/components/schemas/ListNotificationChannelsResponse" + $ref: "#/components/schemas/OrgGroupPolicyListResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List On-Call notification channels for a user - tags: - - On-Call + summary: List org group policies + tags: [Org Groups] "x-permission": - operator: AND + operator: OR permissions: - - on_call_read + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: - description: Create a new notification channel for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: CreateUserNotificationChannel - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string + description: Create a new policy for an organization group. + operationId: CreateOrgGroupPolicy requestBody: content: - "application/json": + application/json: + examples: + default: + value: + data: + attributes: + content: + value: "UTC" + policy_name: "monitor_timezone" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_policies schema: - $ref: "#/components/schemas/CreateUserNotificationChannelRequest" + $ref: "#/components/schemas/OrgGroupPolicyCreateRequest" required: true responses: "201": content: - "application/json": + application/json: + examples: + default: + value: + data: + attributes: + content: + value: "UTC" + enforced_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + policy_name: "monitor_timezone" + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_policies schema: - $ref: "#/components/schemas/NotificationChannel" + $ref: "#/components/schemas/OrgGroupPolicyResponse" description: Created "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Create an On-Call notification channel for a user - tags: - - On-Call + summary: Create an org group policy + tags: [Org Groups] "x-permission": - operator: AND + operator: OR permissions: - - on_call_respond - /api/v2/on-call/users/{user_id}/notification-channels/{channel_id}: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_policies/{org_group_policy_id}: delete: - description: Delete a notification channel for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: DeleteUserNotificationChannel + description: Delete an organization group policy by its ID. + operationId: DeleteOrgGroupPolicy parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The channel ID - in: path - name: channel_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string + - $ref: "#/components/parameters/OrgGroupPolicyId" responses: "204": description: No Content "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Delete an On-Call notification channel for a user - tags: - - On-Call + summary: Delete an org group policy + tags: [Org Groups] "x-permission": - operator: AND + operator: OR permissions: - - on_call_respond - get: - description: Get a notification channel for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: GetUserNotificationChannel + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update the content of an existing organization group policy. + operationId: UpdateOrgGroupPolicy parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The channel ID - in: path - name: channel_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string + - $ref: "#/components/parameters/OrgGroupPolicyId" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + content: + value: "US/Eastern" + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + type: org_group_policies + schema: + $ref: "#/components/schemas/OrgGroupPolicyUpdateRequest" + required: true responses: "200": content: - "application/json": + application/json: + examples: + default: + value: + data: + attributes: + content: + value: "US/Eastern" + enforced_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-16T14:00:00Z" + policy_name: "monitor_timezone" + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_policies schema: - $ref: "#/components/schemas/NotificationChannel" + $ref: "#/components/schemas/OrgGroupPolicyResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Get an On-Call notification channel for a user - tags: - - On-Call + summary: Update an org group policy + tags: [Org Groups] "x-permission": - operator: AND + operator: OR permissions: - - on_call_read - /api/v2/on-call/users/{user_id}/notification-rules: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_policy_configs: get: - description: List the notification rules for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: ListUserNotificationRules - parameters: - - description: "Comma-separated list of included relationships to be returned. Allowed values: `channel`." - in: query - name: include - schema: - type: string - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string + description: List all org configs that are eligible to be used as organization group policies. + operationId: ListOrgGroupPolicyConfigs responses: "200": content: - "application/json": + application/json: + examples: + default: + value: + data: + - attributes: + allowed_values: ["UTC", "US/Eastern", "US/Pacific"] + default_value: "UTC" + description: "The default timezone for monitors." + name: "monitor_timezone" + value_type: "string" + id: "monitor_timezone" + type: org_group_policy_configs schema: - $ref: "#/components/schemas/ListOnCallNotificationRulesResponse" + $ref: "#/components/schemas/OrgGroupPolicyConfigListResponse" description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List On-Call notification rules for a user - tags: - - On-Call - "x-permission": - operator: AND - permissions: - - on_call_read - post: - description: Create a new notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: CreateUserNotificationRule - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - requestBody: - content: - "application/json": - schema: - $ref: "#/components/schemas/CreateOnCallNotificationRuleRequest" - required: true - responses: - "201": content: - "application/json": + application/json: schema: - $ref: "#/components/schemas/OnCallNotificationRule" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Create an On-Call notification rule for a user - tags: - - On-Call - "x-permission": - operator: AND - permissions: - - on_call_respond - /api/v2/on-call/users/{user_id}/notification-rules/{rule_id}: - delete: - description: Delete a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: DeleteUserNotificationRule - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The rule ID - in: path - name: rule_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Delete an On-Call notification rule for a user - tags: - - On-Call + summary: List org group policy configs + tags: [Org Groups] "x-permission": operator: OR permissions: - - on_call_respond + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_policy_overrides: get: - description: Get a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: GetUserNotificationRule - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The rule ID - in: path - name: rule_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: "Comma-separated list of included relationships to be returned. Allowed values: `channel`." - in: query - name: include - schema: - type: string + description: >- + List policy overrides for an organization group. Requires a filter on org group ID. Optionally filter by policy ID. + operationId: ListOrgGroupPolicyOverrides + parameters: + - $ref: "#/components/parameters/OrgGroupPolicyOverrideFilterOrgGroupId" + - $ref: "#/components/parameters/OrgGroupPolicyOverrideFilterPolicyId" + - $ref: "#/components/parameters/OrgGroupPageNumber" + - $ref: "#/components/parameters/OrgGroupPageSize" + - $ref: "#/components/parameters/OverrideSort" responses: "200": content: - "application/json": + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + org_group_policy: + data: + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + type: org_group_policies + type: org_group_policy_overrides + meta: + page: + total_count: 1 schema: - $ref: "#/components/schemas/OnCallNotificationRule" + $ref: "#/components/schemas/OrgGroupPolicyOverrideListResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Get an On-Call notification rule for a user - tags: - - On-Call + summary: List org group policy overrides + tags: [Org Groups] "x-permission": operator: OR permissions: - - on_call_read - put: - description: Update a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission - operationId: UpdateUserNotificationRule - parameters: - - description: The user ID - in: path - name: user_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: The rule ID - in: path - name: rule_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000000 - type: string - - description: "Comma-separated list of included relationships to be returned. Allowed values: `channel`." - in: query - name: include - schema: - type: string + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new policy override for an organization within an org group. + operationId: CreateOrgGroupPolicyOverride requestBody: content: - "application/json": + application/json: + examples: + default: + value: + data: + attributes: + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + org_group_policy: + data: + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + type: org_group_policies + type: org_group_policy_overrides schema: - $ref: "#/components/schemas/UpdateOnCallNotificationRuleRequest" + $ref: "#/components/schemas/OrgGroupPolicyOverrideCreateRequest" required: true responses: - "200": + "201": content: - "application/json": + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + org_group_policy: + data: + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + type: org_group_policies + type: org_group_policy_overrides schema: - $ref: "#/components/schemas/OnCallNotificationRule" - description: OK + $ref: "#/components/schemas/OrgGroupPolicyOverrideResponse" + description: Created "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Update an On-Call notification rule for a user - tags: - - On-Call + summary: Create an org group policy override + tags: [Org Groups] "x-permission": operator: OR permissions: - - on_call_read - /api/v2/org_configs: - get: - description: Returns all Org Configs (name, description, and value). - operationId: ListOrgConfigs + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_group_policy_overrides/{org_group_policy_override_id}: + delete: + description: Delete an organization group policy override by its ID. + operationId: DeleteOrgGroupPolicyOverride + parameters: + - $ref: "#/components/parameters/OrgGroupPolicyOverrideId" responses: - "200": + "204": + description: No Content + "400": content: application/json: - schema: {$ref: "#/components/schemas/OrgConfigListResponse"} - description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} - summary: List Org Configs - tags: [Organizations] - "x-permission": - operator: OPEN - permissions: [] - /api/v2/org_configs/{org_config_name}: - get: - description: Return the name, description, and value of a specific Org Config. - operationId: GetOrgConfig - parameters: [$ref: "#/components/parameters/OrgConfigName"] - responses: - "200": + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": content: application/json: - schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} - description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "404": {$ref: "#/components/responses/NotFoundResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} - summary: Get a specific Org Config value - tags: [Organizations] + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an org group policy override + tags: [Org Groups] "x-permission": - operator: OPEN - permissions: [] + operator: OR + permissions: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: - description: Update the value of a specific Org Config. - operationId: UpdateOrgConfig - parameters: [$ref: "#/components/parameters/OrgConfigName"] + description: Update an existing organization group policy override. + operationId: UpdateOrgGroupPolicyOverride + parameters: + - $ref: "#/components/parameters/OrgGroupPolicyOverrideId" requestBody: content: application/json: - schema: {$ref: "#/components/schemas/OrgConfigWriteRequest"} + examples: + default: + value: + data: + attributes: + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + type: org_group_policy_overrides + schema: + $ref: "#/components/schemas/OrgGroupPolicyOverrideUpdateRequest" required: true responses: "200": content: application/json: - schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-16T14:00:00Z" + org_site: "datadoghq.com" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + org_group_policy: + data: + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + type: org_group_policies + type: org_group_policy_overrides + schema: + $ref: "#/components/schemas/OrgGroupPolicyOverrideResponse" description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "404": {$ref: "#/components/responses/NotFoundResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} - summary: Update a specific Org Config - tags: [Organizations] + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update an org group policy override + tags: [Org Groups] "x-permission": operator: OR permissions: - - org_management - /api/v2/org_connections: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_groups: get: - description: Returns a list of org connections. - operationId: ListOrgConnections + description: List all organization groups that the requesting organization has access to. + operationId: ListOrgGroups parameters: - - description: The Org ID of the sink org. - example: "0879ce27-29a1-481f-a12e-bc2a48ec9ae1" - in: query - name: sink_org_id - required: false - schema: - type: string - - description: The Org ID of the source org. - example: "0879ce27-29a1-481f-a12e-bc2a48ec9ae1" - in: query - name: source_org_id - required: false - schema: - type: string - - description: The limit of number of entries you want to return. Default is 1000. - example: 1000 - in: query - name: limit - required: false - schema: - format: int64 - type: integer - - description: The pagination offset which you want to query from. Default is 0. - example: 0 - in: query - name: offset - required: false - schema: - format: int64 - type: integer + - $ref: "#/components/parameters/OrgGroupPageNumber" + - $ref: "#/components/parameters/OrgGroupPageSize" + - $ref: "#/components/parameters/OrgGroupSort" + - $ref: "#/components/parameters/OrgGroupInclude" responses: "200": content: application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + name: "My Org Group" + owner_org_site: "datadoghq.com" + owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + meta: + page: + total_count: 1 schema: - $ref: "#/components/schemas/OrgConnectionListResponse" + $ref: "#/components/schemas/OrgGroupListResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - org_connections_read - summary: List Org Connections - tags: ["Org Connections"] + summary: List org groups + tags: [Org Groups] "x-permission": operator: OR permissions: - - org_connections_read + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: - description: Create a new org connection between the current org and a target org. - operationId: CreateOrgConnections + description: Create a new organization group. + operationId: CreateOrgGroup requestBody: content: application/json: + examples: + default: + value: + data: + attributes: + name: "My Org Group" + type: org_groups schema: - $ref: "#/components/schemas/OrgConnectionCreateRequest" + $ref: "#/components/schemas/OrgGroupCreateRequest" required: true responses: - "200": + "201": content: application/json: - schema: - $ref: "#/components/schemas/OrgConnectionResponse" - description: OK + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + name: "My Org Group" + owner_org_site: "datadoghq.com" + owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + schema: + $ref: "#/components/schemas/OrgGroupResponse" + description: Created "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "409": - $ref: "#/components/responses/ConflictResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - org_connections_write - summary: Create Org Connection - tags: ["Org Connections"] - x-codegen-request-body-name: body + summary: Create an org group + tags: [Org Groups] "x-permission": operator: OR permissions: - - org_connections_write - /api/v2/org_connections/{connection_id}: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org_groups/{org_group_id}: delete: - description: Delete an existing org connection. - operationId: DeleteOrgConnections + description: Delete an organization group by its ID. + operationId: DeleteOrgGroup parameters: - - $ref: "#/components/parameters/OrgConnectionId" + - $ref: "#/components/parameters/OrgGroupId" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an org group + tags: [Org Groups] + "x-permission": + operator: OR + permissions: + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a specific organization group by its ID. + operationId: GetOrgGroup + parameters: + - $ref: "#/components/parameters/OrgGroupId" responses: "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + name: "My Org Group" + owner_org_site: "datadoghq.com" + owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + schema: + $ref: "#/components/schemas/OrgGroupResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - org_connections_write - summary: Delete Org Connection - tags: ["Org Connections"] + summary: Get an org group + tags: [Org Groups] "x-permission": operator: OR permissions: - - org_connections_write + - org_group_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: - description: Update an existing org connection. - operationId: UpdateOrgConnections + description: Update the name of an existing organization group. + operationId: UpdateOrgGroup parameters: - - $ref: "#/components/parameters/OrgConnectionId" + - $ref: "#/components/parameters/OrgGroupId" requestBody: content: application/json: + examples: + default: + value: + data: + attributes: + name: "Updated Org Group Name" + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups schema: - $ref: "#/components/schemas/OrgConnectionUpdateRequest" + $ref: "#/components/schemas/OrgGroupUpdateRequest" required: true responses: "200": content: application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-16T14:00:00Z" + name: "Updated Org Group Name" + owner_org_site: "datadoghq.com" + owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups schema: - $ref: "#/components/schemas/OrgConnectionResponse" + $ref: "#/components/schemas/OrgGroupResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - org_connections_write - summary: Update Org Connection - tags: ["Org Connections"] + summary: Update an org group + tags: [Org Groups] "x-permission": operator: OR permissions: - - org_connections_write + - org_group_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/permissions: get: description: |- @@ -116683,6 +118957,9 @@ tags: - description: |- Manage connections between organizations. Org connections allow for controlled sharing of data between different Datadog organizations. See the [Cross-Organization Visibiltiy](https://docs.datadoghq.com/account_management/org_settings/cross_org_visibility/) page for more information. name: Org Connections + - description: >- + Manage organization groups, memberships, policies, policy overrides, and policy configurations. + name: Org Groups - description: Create, edit, and manage your organizations. Read more about [multi-org accounts](https://docs.datadoghq.com/account_management/multi_organization). externalDocs: description: Find out more at diff --git a/features/v2/org_groups.feature b/features/v2/org_groups.feature new file mode 100644 index 000000000000..73cce63cd8eb --- /dev/null +++ b/features/v2/org_groups.feature @@ -0,0 +1,400 @@ +@endpoint(org-groups) @endpoint(org-groups-v2) +Feature: Org Groups + Manage organization groups, memberships, policies, policy overrides, and + policy configurations. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OrgGroups" API + + @generated @skip @team:DataDog/org-management + Scenario: Bulk update org group memberships returns "Bad Request" response + Given operation "BulkUpdateOrgGroupMemberships" enabled + And new "BulkUpdateOrgGroupMemberships" request + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Bulk update org group memberships returns "Not Found" response + Given operation "BulkUpdateOrgGroupMemberships" enabled + And new "BulkUpdateOrgGroupMemberships" request + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Bulk update org group memberships returns "OK" response + Given operation "BulkUpdateOrgGroupMemberships" enabled + And new "BulkUpdateOrgGroupMemberships" request + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Create an org group policy override returns "Bad Request" response + Given operation "CreateOrgGroupPolicyOverride" enabled + And new "CreateOrgGroupPolicyOverride" request + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + 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 override returns "Conflict" response + Given operation "CreateOrgGroupPolicyOverride" enabled + And new "CreateOrgGroupPolicyOverride" request + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/org-management + Scenario: Create an org group policy override returns "Created" response + Given operation "CreateOrgGroupPolicyOverride" enabled + And new "CreateOrgGroupPolicyOverride" request + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/org-management + 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"}, "policy_name": "monitor_timezone"}, "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"}, "policy_name": "monitor_timezone"}, "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"}, "policy_name": "monitor_timezone"}, "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 + + @generated @skip @team:DataDog/org-management + Scenario: Create an org group returns "Bad Request" response + Given operation "CreateOrgGroup" enabled + And new "CreateOrgGroup" request + And body with value {"data": {"attributes": {"name": "My Org Group"}, "type": "org_groups"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Create an org group returns "Conflict" response + Given operation "CreateOrgGroup" enabled + And new "CreateOrgGroup" request + And body with value {"data": {"attributes": {"name": "My Org Group"}, "type": "org_groups"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/org-management + Scenario: Create an org group returns "Created" response + Given operation "CreateOrgGroup" enabled + And new "CreateOrgGroup" request + And body with value {"data": {"attributes": {"name": "My Org Group"}, "type": "org_groups"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group policy override returns "Bad Request" response + Given operation "DeleteOrgGroupPolicyOverride" enabled + And new "DeleteOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group policy override returns "No Content" response + Given operation "DeleteOrgGroupPolicyOverride" enabled + And new "DeleteOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group policy override returns "Not Found" response + Given operation "DeleteOrgGroupPolicyOverride" enabled + And new "DeleteOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group policy returns "Bad Request" response + Given operation "DeleteOrgGroupPolicy" enabled + And new "DeleteOrgGroupPolicy" request + And request contains "org_group_policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group policy returns "No Content" response + Given operation "DeleteOrgGroupPolicy" enabled + And new "DeleteOrgGroupPolicy" request + And request contains "org_group_policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group policy returns "Not Found" response + Given operation "DeleteOrgGroupPolicy" enabled + And new "DeleteOrgGroupPolicy" request + And request contains "org_group_policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group returns "Bad Request" response + Given operation "DeleteOrgGroup" enabled + And new "DeleteOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group returns "No Content" response + Given operation "DeleteOrgGroup" enabled + And new "DeleteOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/org-management + Scenario: Delete an org group returns "Not Found" response + Given operation "DeleteOrgGroup" enabled + And new "DeleteOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group membership returns "Bad Request" response + Given operation "GetOrgGroupMembership" enabled + And new "GetOrgGroupMembership" request + And request contains "org_group_membership_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group membership returns "Not Found" response + Given operation "GetOrgGroupMembership" enabled + And new "GetOrgGroupMembership" request + And request contains "org_group_membership_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group membership returns "OK" response + Given operation "GetOrgGroupMembership" enabled + And new "GetOrgGroupMembership" request + And request contains "org_group_membership_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group returns "Bad Request" response + Given operation "GetOrgGroup" enabled + And new "GetOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group returns "Not Found" response + Given operation "GetOrgGroup" enabled + And new "GetOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group returns "OK" response + Given operation "GetOrgGroup" enabled + And new "GetOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: List org group memberships returns "Bad Request" response + Given operation "ListOrgGroupMemberships" enabled + And new "ListOrgGroupMemberships" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: List org group memberships returns "OK" response + Given operation "ListOrgGroupMemberships" enabled + And new "ListOrgGroupMemberships" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: List org group policies returns "Bad Request" response + Given operation "ListOrgGroupPolicies" enabled + And new "ListOrgGroupPolicies" request + And request contains "filter[org_group_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: List org group policies returns "OK" response + Given operation "ListOrgGroupPolicies" enabled + And new "ListOrgGroupPolicies" request + And request contains "filter[org_group_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: List org group policy configs returns "OK" response + Given operation "ListOrgGroupPolicyConfigs" enabled + And new "ListOrgGroupPolicyConfigs" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: List org group policy overrides returns "Bad Request" response + Given operation "ListOrgGroupPolicyOverrides" enabled + And new "ListOrgGroupPolicyOverrides" request + And request contains "filter[org_group_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: List org group policy overrides returns "OK" response + Given operation "ListOrgGroupPolicyOverrides" enabled + And new "ListOrgGroupPolicyOverrides" request + And request contains "filter[org_group_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: List org groups returns "Bad Request" response + Given operation "ListOrgGroups" enabled + And new "ListOrgGroups" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: List org groups returns "OK" response + Given operation "ListOrgGroups" enabled + And new "ListOrgGroups" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group membership returns "Bad Request" response + Given operation "UpdateOrgGroupMembership" enabled + And new "UpdateOrgGroupMembership" request + And request contains "org_group_membership_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "f1e2d3c4-b5a6-7890-1234-567890abcdef", "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_memberships"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group membership returns "Not Found" response + Given operation "UpdateOrgGroupMembership" enabled + And new "UpdateOrgGroupMembership" request + And request contains "org_group_membership_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "f1e2d3c4-b5a6-7890-1234-567890abcdef", "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_memberships"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group membership returns "OK" response + Given operation "UpdateOrgGroupMembership" enabled + And new "UpdateOrgGroupMembership" request + And request contains "org_group_membership_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "f1e2d3c4-b5a6-7890-1234-567890abcdef", "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_memberships"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group policy override returns "Bad Request" response + Given operation "UpdateOrgGroupPolicyOverride" enabled + And new "UpdateOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group policy override returns "Not Found" response + Given operation "UpdateOrgGroupPolicyOverride" enabled + And new "UpdateOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group policy override returns "OK" response + Given operation "UpdateOrgGroupPolicyOverride" enabled + And new "UpdateOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group policy returns "Bad Request" response + 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"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group policy returns "Not Found" response + 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"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group policy returns "OK" response + 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"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group returns "Bad Request" response + Given operation "UpdateOrgGroup" enabled + And new "UpdateOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Updated Org Group Name"}, "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group returns "Not Found" response + Given operation "UpdateOrgGroup" enabled + And new "UpdateOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Updated Org Group Name"}, "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Update an org group returns "OK" response + Given operation "UpdateOrgGroup" enabled + And new "UpdateOrgGroup" request + And request contains "org_group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Updated Org Group Name"}, "id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 078ced2bd84f..a4836a0c6463 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4060,6 +4060,132 @@ "type": "idempotent" } }, + "ListOrgGroupMemberships": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "BulkUpdateOrgGroupMemberships": { + "tag": "Org Groups", + "undo": { + "type": "idempotent" + } + }, + "GetOrgGroupMembership": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "UpdateOrgGroupMembership": { + "tag": "Org Groups", + "undo": { + "type": "idempotent" + } + }, + "ListOrgGroupPolicies": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "CreateOrgGroupPolicy": { + "tag": "Org Groups", + "undo": { + "operationId": "DeleteOrgGroupPolicy", + "parameters": [ + { + "name": "org_group_policy_id", + "source": "data.id" + } + ] + } + }, + "DeleteOrgGroupPolicy": { + "tag": "Org Groups", + "undo": { + "type": "unsafe" + } + }, + "UpdateOrgGroupPolicy": { + "tag": "Org Groups", + "undo": { + "type": "idempotent" + } + }, + "ListOrgGroupPolicyConfigs": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "ListOrgGroupPolicyOverrides": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "CreateOrgGroupPolicyOverride": { + "tag": "Org Groups", + "undo": { + "operationId": "DeleteOrgGroupPolicyOverride", + "parameters": [ + { + "name": "org_group_policy_override_id", + "source": "data.id" + } + ] + } + }, + "DeleteOrgGroupPolicyOverride": { + "tag": "Org Groups", + "undo": { + "type": "unsafe" + } + }, + "UpdateOrgGroupPolicyOverride": { + "tag": "Org Groups", + "undo": { + "type": "idempotent" + } + }, + "ListOrgGroups": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "CreateOrgGroup": { + "tag": "Org Groups", + "undo": { + "operationId": "DeleteOrgGroup", + "parameters": [ + { + "name": "org_group_id", + "source": "data.id" + } + ] + } + }, + "DeleteOrgGroup": { + "tag": "Org Groups", + "undo": { + "type": "unsafe" + } + }, + "GetOrgGroup": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, + "UpdateOrgGroup": { + "tag": "Org Groups", + "undo": { + "type": "idempotent" + } + }, "ListPermissions": { "tag": "Roles", "undo": { diff --git a/packages/datadog-api-client/README.md b/packages/datadog-api-client/README.md index 21007088b80c..eb7985b6241a 100644 --- a/packages/datadog-api-client/README.md +++ b/packages/datadog-api-client/README.md @@ -423,6 +423,7 @@ apiInstance | On-Call Paging | @datadog/datadog-api-client-on-call-paging | [README.md](../../services/on-call-paging/README.md) | | Opsgenie Integration | @datadog/datadog-api-client-opsgenie-integration | [README.md](../../services/opsgenie-integration/README.md) | | Org Connections | @datadog/datadog-api-client-org-connections | [README.md](../../services/org-connections/README.md) | +| Org Groups | @datadog/datadog-api-client-org-groups | [README.md](../../services/org-groups/README.md) | | Organizations | @datadog/datadog-api-client-organizations | [README.md](../../services/organizations/README.md) | | PagerDuty Integration | @datadog/datadog-api-client-pager-duty-integration | [README.md](../../services/pager-duty-integration/README.md) | | Powerpack | @datadog/datadog-api-client-powerpack | [README.md](../../services/powerpack/README.md) | diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index a1b4b0679339..2af048aad2c8 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -9257,6 +9257,204 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "OrgConnectionResponse", }, + "OrgGroupsApi.V2.ListOrgGroupMemberships": { + filterOrgGroupId: { + type: "string", + format: "uuid", + }, + filterOrgUuid: { + type: "string", + format: "uuid", + }, + pageNumber: { + type: "number", + format: "int64", + }, + pageSize: { + type: "number", + format: "int64", + }, + sort: { + type: "OrgGroupMembershipSortOption", + format: "", + }, + operationResponseType: "OrgGroupMembershipListResponse", + }, + "OrgGroupsApi.V2.BulkUpdateOrgGroupMemberships": { + body: { + type: "OrgGroupMembershipBulkUpdateRequest", + format: "", + }, + operationResponseType: "OrgGroupMembershipListResponse", + }, + "OrgGroupsApi.V2.GetOrgGroupMembership": { + orgGroupMembershipId: { + type: "string", + format: "uuid", + }, + operationResponseType: "OrgGroupMembershipResponse", + }, + "OrgGroupsApi.V2.UpdateOrgGroupMembership": { + orgGroupMembershipId: { + type: "string", + format: "uuid", + }, + body: { + type: "OrgGroupMembershipUpdateRequest", + format: "", + }, + operationResponseType: "OrgGroupMembershipResponse", + }, + "OrgGroupsApi.V2.ListOrgGroupPolicies": { + filterOrgGroupId: { + type: "string", + format: "uuid", + }, + filterPolicyName: { + type: "string", + format: "", + }, + pageNumber: { + type: "number", + format: "int64", + }, + pageSize: { + type: "number", + format: "int64", + }, + sort: { + type: "OrgGroupPolicySortOption", + format: "", + }, + operationResponseType: "OrgGroupPolicyListResponse", + }, + "OrgGroupsApi.V2.CreateOrgGroupPolicy": { + body: { + type: "OrgGroupPolicyCreateRequest", + format: "", + }, + operationResponseType: "OrgGroupPolicyResponse", + }, + "OrgGroupsApi.V2.DeleteOrgGroupPolicy": { + orgGroupPolicyId: { + type: "string", + format: "uuid", + }, + operationResponseType: "{}", + }, + "OrgGroupsApi.V2.UpdateOrgGroupPolicy": { + orgGroupPolicyId: { + type: "string", + format: "uuid", + }, + body: { + type: "OrgGroupPolicyUpdateRequest", + format: "", + }, + operationResponseType: "OrgGroupPolicyResponse", + }, + "OrgGroupsApi.V2.ListOrgGroupPolicyConfigs": { + operationResponseType: "OrgGroupPolicyConfigListResponse", + }, + "OrgGroupsApi.V2.ListOrgGroupPolicyOverrides": { + filterOrgGroupId: { + type: "string", + format: "uuid", + }, + filterPolicyId: { + type: "string", + format: "uuid", + }, + pageNumber: { + type: "number", + format: "int64", + }, + pageSize: { + type: "number", + format: "int64", + }, + sort: { + type: "OrgGroupPolicyOverrideSortOption", + format: "", + }, + operationResponseType: "OrgGroupPolicyOverrideListResponse", + }, + "OrgGroupsApi.V2.CreateOrgGroupPolicyOverride": { + body: { + type: "OrgGroupPolicyOverrideCreateRequest", + format: "", + }, + operationResponseType: "OrgGroupPolicyOverrideResponse", + }, + "OrgGroupsApi.V2.DeleteOrgGroupPolicyOverride": { + orgGroupPolicyOverrideId: { + type: "string", + format: "uuid", + }, + operationResponseType: "{}", + }, + "OrgGroupsApi.V2.UpdateOrgGroupPolicyOverride": { + orgGroupPolicyOverrideId: { + type: "string", + format: "uuid", + }, + body: { + type: "OrgGroupPolicyOverrideUpdateRequest", + format: "", + }, + operationResponseType: "OrgGroupPolicyOverrideResponse", + }, + "OrgGroupsApi.V2.ListOrgGroups": { + pageNumber: { + type: "number", + format: "int64", + }, + pageSize: { + type: "number", + format: "int64", + }, + sort: { + type: "OrgGroupSortOption", + format: "", + }, + include: { + type: "Array", + format: "", + }, + operationResponseType: "OrgGroupListResponse", + }, + "OrgGroupsApi.V2.CreateOrgGroup": { + body: { + type: "OrgGroupCreateRequest", + format: "", + }, + operationResponseType: "OrgGroupResponse", + }, + "OrgGroupsApi.V2.GetOrgGroup": { + orgGroupId: { + type: "string", + format: "uuid", + }, + operationResponseType: "OrgGroupResponse", + }, + "OrgGroupsApi.V2.DeleteOrgGroup": { + orgGroupId: { + type: "string", + format: "uuid", + }, + operationResponseType: "{}", + }, + "OrgGroupsApi.V2.UpdateOrgGroup": { + orgGroupId: { + type: "string", + format: "uuid", + }, + body: { + type: "OrgGroupUpdateRequest", + format: "", + }, + operationResponseType: "OrgGroupResponse", + }, "RolesApi.V2.ListPermissions": { operationResponseType: "PermissionsResponse", }, diff --git a/services/observability_pipelines/src/v2/models/ObservabilityPipelineParseGrokProcessorRule.ts b/services/observability_pipelines/src/v2/models/ObservabilityPipelineParseGrokProcessorRule.ts index 0ee91d90c919..52516d4893f6 100644 --- a/services/observability_pipelines/src/v2/models/ObservabilityPipelineParseGrokProcessorRule.ts +++ b/services/observability_pipelines/src/v2/models/ObservabilityPipelineParseGrokProcessorRule.ts @@ -14,7 +14,7 @@ export class ObservabilityPipelineParseGrokProcessorRule { */ "matchRules": Array; /** - * The value of the source field in log events to be processed by the Grok rules. + * The name of the field in the log event to apply the Grok rules to. */ "source": string; /** diff --git a/services/org_groups/.yarnrc.yml b/services/org_groups/.yarnrc.yml new file mode 100644 index 000000000000..3186f3f0795a --- /dev/null +++ b/services/org_groups/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/services/org_groups/README.md b/services/org_groups/README.md new file mode 100644 index 000000000000..10a96dc7c150 --- /dev/null +++ b/services/org_groups/README.md @@ -0,0 +1,44 @@ +# @datadog/datadog-api-client-org-groups + +## Description + +Manage organization groups, memberships, policies, policy overrides, and policy configurations. + +## Navigation + +- [Installation](#installation) +- [Getting Started](#getting-started) + +## Installation + +```sh +# NPM +npm install @datadog/datadog-api-client-org-groups +# Yarn +yarn add @datadog/datadog-api-client-org-groups +``` + +## Getting Started +```ts +import { createConfiguration } from "@datadog/datadog-api-client"; +import { OrgGroupsApiV2 } from "@datadog/datadog-api-client-org-groups"; +import { v2 } from "@datadog/datadog-api-client-org-groups"; + +const configuration = createConfiguration(); +// Enable unstable operations +const configurationOpts = { + unstableOperations: { + "OrgGroupsApi.v2.listOrgGroupMemberships": true + } +} + +const configuration = createConfiguration(configurationOpts); +const apiInstance = new OrgGroupsApiV2(configuration); +const params = {/* parameters */}; + +apiInstance.listOrgGroupMemberships(params).then((data) => { + console.log("API called successfully. Returned data: " + JSON.stringify(data)); +}).catch((error) => { + console.error("Error calling API: " + error); +}); +``` \ No newline at end of file diff --git a/services/org_groups/package.json b/services/org_groups/package.json new file mode 100644 index 000000000000..33c88b6228ec --- /dev/null +++ b/services/org_groups/package.json @@ -0,0 +1,43 @@ +{ + "name": "@datadog/datadog-api-client-org-groups", + "description": "", + "author": "", + "keywords": [ + "api", + "fetch", + "typescript" + ], + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/DataDog/datadog-api-client-typescript.git", + "directory": "services/org-groups" + }, + "files": [ + "dist/**/*" + ], + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "prepack": "yarn workspace @datadog/datadog-api-client build && yarn build", + "build": "yarn generate-version-files && tsc", + "generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts" + }, + "dependencies": { + "@datadog/datadog-api-client": "^2.0.0-beta.2" + }, + "devDependencies": { + "typescript": "5.8.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "version": "0.0.1", + "packageManager": "yarn@4.9.1" +} diff --git a/services/org_groups/src/index.ts b/services/org_groups/src/index.ts new file mode 100644 index 000000000000..dd35a76d91cc --- /dev/null +++ b/services/org_groups/src/index.ts @@ -0,0 +1,3 @@ +export * as v2 from "./v2"; + +export { OrgGroupsApi as OrgGroupsApiV2 } from "./v2/OrgGroupsApi"; diff --git a/services/org_groups/src/v2/OrgGroupsApi.ts b/services/org_groups/src/v2/OrgGroupsApi.ts new file mode 100644 index 000000000000..f1d89a353a3d --- /dev/null +++ b/services/org_groups/src/v2/OrgGroupsApi.ts @@ -0,0 +1,3300 @@ +import { + ApiException, + BaseAPIRequestFactory, + BaseServerConfiguration, + buildUserAgent, + Configuration, + createConfiguration, + deserialize, + getPreferredMediaType, + HttpMethod, + isBrowser, + logger, + normalizeMediaType, + parse, + RequiredError, + RequestContext, + ResponseContext, + serialize, + ServerConfiguration, + stringify, + applySecurityAuthentication, +} from "@datadog/datadog-api-client"; + +import { TypingInfo } from "./models/TypingInfo"; +import { APIErrorResponse } from "./models/APIErrorResponse"; +import { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +import { OrgGroupCreateRequest } from "./models/OrgGroupCreateRequest"; +import { OrgGroupIncludeOption } from "./models/OrgGroupIncludeOption"; +import { OrgGroupListResponse } from "./models/OrgGroupListResponse"; +import { OrgGroupMembershipBulkUpdateRequest } from "./models/OrgGroupMembershipBulkUpdateRequest"; +import { OrgGroupMembershipListResponse } from "./models/OrgGroupMembershipListResponse"; +import { OrgGroupMembershipResponse } from "./models/OrgGroupMembershipResponse"; +import { OrgGroupMembershipSortOption } from "./models/OrgGroupMembershipSortOption"; +import { OrgGroupMembershipUpdateRequest } from "./models/OrgGroupMembershipUpdateRequest"; +import { OrgGroupPolicyConfigListResponse } from "./models/OrgGroupPolicyConfigListResponse"; +import { OrgGroupPolicyCreateRequest } from "./models/OrgGroupPolicyCreateRequest"; +import { OrgGroupPolicyListResponse } from "./models/OrgGroupPolicyListResponse"; +import { OrgGroupPolicyOverrideCreateRequest } from "./models/OrgGroupPolicyOverrideCreateRequest"; +import { OrgGroupPolicyOverrideListResponse } from "./models/OrgGroupPolicyOverrideListResponse"; +import { OrgGroupPolicyOverrideResponse } from "./models/OrgGroupPolicyOverrideResponse"; +import { OrgGroupPolicyOverrideSortOption } from "./models/OrgGroupPolicyOverrideSortOption"; +import { OrgGroupPolicyOverrideUpdateRequest } from "./models/OrgGroupPolicyOverrideUpdateRequest"; +import { OrgGroupPolicyResponse } from "./models/OrgGroupPolicyResponse"; +import { OrgGroupPolicySortOption } from "./models/OrgGroupPolicySortOption"; +import { OrgGroupPolicyUpdateRequest } from "./models/OrgGroupPolicyUpdateRequest"; +import { OrgGroupResponse } from "./models/OrgGroupResponse"; +import { OrgGroupSortOption } from "./models/OrgGroupSortOption"; +import { OrgGroupUpdateRequest } from "./models/OrgGroupUpdateRequest"; +import { version } from "../version"; + +export class OrgGroupsApiRequestFactory extends BaseAPIRequestFactory { + public userAgent: string | undefined; + + public constructor(configuration: Configuration) { + super(configuration); + if (!isBrowser) { + this.userAgent = buildUserAgent("org-groups", version); + } + } + public async bulkUpdateOrgGroupMemberships( + body: OrgGroupMembershipBulkUpdateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "OrgGroupsApi.v2.bulkUpdateOrgGroupMemberships" + ] + ) { + throw new Error( + "Unstable operation 'bulkUpdateOrgGroupMemberships' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.bulkUpdateOrgGroupMemberships'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "bulkUpdateOrgGroupMemberships"); + } + + // Path Params + const localVarPath = "/api/v2/org_group_memberships/bulk"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.bulkUpdateOrgGroupMemberships", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupMembershipBulkUpdateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createOrgGroup( + body: OrgGroupCreateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.createOrgGroup"]) { + throw new Error( + "Unstable operation 'createOrgGroup' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.createOrgGroup'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createOrgGroup"); + } + + // Path Params + const localVarPath = "/api/v2/org_groups"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.createOrgGroup", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupCreateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createOrgGroupPolicy( + body: OrgGroupPolicyCreateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.createOrgGroupPolicy"]) { + throw new Error( + "Unstable operation 'createOrgGroupPolicy' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.createOrgGroupPolicy'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createOrgGroupPolicy"); + } + + // Path Params + const localVarPath = "/api/v2/org_group_policies"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.createOrgGroupPolicy", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupPolicyCreateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createOrgGroupPolicyOverride( + body: OrgGroupPolicyOverrideCreateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "OrgGroupsApi.v2.createOrgGroupPolicyOverride" + ] + ) { + throw new Error( + "Unstable operation 'createOrgGroupPolicyOverride' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.createOrgGroupPolicyOverride'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createOrgGroupPolicyOverride"); + } + + // Path Params + const localVarPath = "/api/v2/org_group_policy_overrides"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.createOrgGroupPolicyOverride", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupPolicyOverrideCreateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteOrgGroup( + orgGroupId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.deleteOrgGroup"]) { + throw new Error( + "Unstable operation 'deleteOrgGroup' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.deleteOrgGroup'] = true`", + ); + } + + // verify required parameter 'orgGroupId' is not null or undefined + if (orgGroupId === null || orgGroupId === undefined) { + throw new RequiredError("orgGroupId", "deleteOrgGroup"); + } + + // Path Params + const localVarPath = "/api/v2/org_groups/{org_group_id}".replace( + "{org_group_id}", + encodeURIComponent(String(orgGroupId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.deleteOrgGroup", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteOrgGroupPolicy( + orgGroupPolicyId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.deleteOrgGroupPolicy"]) { + throw new Error( + "Unstable operation 'deleteOrgGroupPolicy' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.deleteOrgGroupPolicy'] = true`", + ); + } + + // verify required parameter 'orgGroupPolicyId' is not null or undefined + if (orgGroupPolicyId === null || orgGroupPolicyId === undefined) { + throw new RequiredError("orgGroupPolicyId", "deleteOrgGroupPolicy"); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_policies/{org_group_policy_id}".replace( + "{org_group_policy_id}", + encodeURIComponent(String(orgGroupPolicyId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.deleteOrgGroupPolicy", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteOrgGroupPolicyOverride( + orgGroupPolicyOverrideId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "OrgGroupsApi.v2.deleteOrgGroupPolicyOverride" + ] + ) { + throw new Error( + "Unstable operation 'deleteOrgGroupPolicyOverride' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.deleteOrgGroupPolicyOverride'] = true`", + ); + } + + // verify required parameter 'orgGroupPolicyOverrideId' is not null or undefined + if ( + orgGroupPolicyOverrideId === null || + orgGroupPolicyOverrideId === undefined + ) { + throw new RequiredError( + "orgGroupPolicyOverrideId", + "deleteOrgGroupPolicyOverride", + ); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_policy_overrides/{org_group_policy_override_id}".replace( + "{org_group_policy_override_id}", + encodeURIComponent(String(orgGroupPolicyOverrideId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.deleteOrgGroupPolicyOverride", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getOrgGroup( + orgGroupId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.getOrgGroup"]) { + throw new Error( + "Unstable operation 'getOrgGroup' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.getOrgGroup'] = true`", + ); + } + + // verify required parameter 'orgGroupId' is not null or undefined + if (orgGroupId === null || orgGroupId === undefined) { + throw new RequiredError("orgGroupId", "getOrgGroup"); + } + + // Path Params + const localVarPath = "/api/v2/org_groups/{org_group_id}".replace( + "{org_group_id}", + encodeURIComponent(String(orgGroupId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.getOrgGroup", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getOrgGroupMembership( + orgGroupMembershipId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.getOrgGroupMembership"]) { + throw new Error( + "Unstable operation 'getOrgGroupMembership' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.getOrgGroupMembership'] = true`", + ); + } + + // verify required parameter 'orgGroupMembershipId' is not null or undefined + if (orgGroupMembershipId === null || orgGroupMembershipId === undefined) { + throw new RequiredError("orgGroupMembershipId", "getOrgGroupMembership"); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_memberships/{org_group_membership_id}".replace( + "{org_group_membership_id}", + encodeURIComponent(String(orgGroupMembershipId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.getOrgGroupMembership", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listOrgGroupMemberships( + filterOrgGroupId?: string, + filterOrgUuid?: string, + pageNumber?: number, + pageSize?: number, + sort?: OrgGroupMembershipSortOption, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["OrgGroupsApi.v2.listOrgGroupMemberships"] + ) { + throw new Error( + "Unstable operation 'listOrgGroupMemberships' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.listOrgGroupMemberships'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/v2/org_group_memberships"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.listOrgGroupMemberships", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (filterOrgGroupId !== undefined) { + requestContext.setQueryParam( + "filter[org_group_id]", + serialize(filterOrgGroupId, TypingInfo, "string", "uuid"), + "", + ); + } + if (filterOrgUuid !== undefined) { + requestContext.setQueryParam( + "filter[org_uuid]", + serialize(filterOrgUuid, TypingInfo, "string", "uuid"), + "", + ); + } + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + serialize(pageNumber, TypingInfo, "number", "int64"), + "", + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + serialize(pageSize, TypingInfo, "number", "int64"), + "", + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + serialize(sort, TypingInfo, "OrgGroupMembershipSortOption", ""), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listOrgGroupPolicies( + filterOrgGroupId: string, + filterPolicyName?: string, + pageNumber?: number, + pageSize?: number, + sort?: OrgGroupPolicySortOption, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.listOrgGroupPolicies"]) { + throw new Error( + "Unstable operation 'listOrgGroupPolicies' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.listOrgGroupPolicies'] = true`", + ); + } + + // verify required parameter 'filterOrgGroupId' is not null or undefined + if (filterOrgGroupId === null || filterOrgGroupId === undefined) { + throw new RequiredError("filterOrgGroupId", "listOrgGroupPolicies"); + } + + // Path Params + const localVarPath = "/api/v2/org_group_policies"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.listOrgGroupPolicies", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (filterOrgGroupId !== undefined) { + requestContext.setQueryParam( + "filter[org_group_id]", + serialize(filterOrgGroupId, TypingInfo, "string", "uuid"), + "", + ); + } + if (filterPolicyName !== undefined) { + requestContext.setQueryParam( + "filter[policy_name]", + serialize(filterPolicyName, TypingInfo, "string", ""), + "", + ); + } + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + serialize(pageNumber, TypingInfo, "number", "int64"), + "", + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + serialize(pageSize, TypingInfo, "number", "int64"), + "", + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + serialize(sort, TypingInfo, "OrgGroupPolicySortOption", ""), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listOrgGroupPolicyConfigs( + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["OrgGroupsApi.v2.listOrgGroupPolicyConfigs"] + ) { + throw new Error( + "Unstable operation 'listOrgGroupPolicyConfigs' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.listOrgGroupPolicyConfigs'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/v2/org_group_policy_configs"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.listOrgGroupPolicyConfigs", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listOrgGroupPolicyOverrides( + filterOrgGroupId: string, + filterPolicyId?: string, + pageNumber?: number, + pageSize?: number, + sort?: OrgGroupPolicyOverrideSortOption, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["OrgGroupsApi.v2.listOrgGroupPolicyOverrides"] + ) { + throw new Error( + "Unstable operation 'listOrgGroupPolicyOverrides' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.listOrgGroupPolicyOverrides'] = true`", + ); + } + + // verify required parameter 'filterOrgGroupId' is not null or undefined + if (filterOrgGroupId === null || filterOrgGroupId === undefined) { + throw new RequiredError( + "filterOrgGroupId", + "listOrgGroupPolicyOverrides", + ); + } + + // Path Params + const localVarPath = "/api/v2/org_group_policy_overrides"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.listOrgGroupPolicyOverrides", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (filterOrgGroupId !== undefined) { + requestContext.setQueryParam( + "filter[org_group_id]", + serialize(filterOrgGroupId, TypingInfo, "string", "uuid"), + "", + ); + } + if (filterPolicyId !== undefined) { + requestContext.setQueryParam( + "filter[policy_id]", + serialize(filterPolicyId, TypingInfo, "string", "uuid"), + "", + ); + } + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + serialize(pageNumber, TypingInfo, "number", "int64"), + "", + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + serialize(pageSize, TypingInfo, "number", "int64"), + "", + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + serialize(sort, TypingInfo, "OrgGroupPolicyOverrideSortOption", ""), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listOrgGroups( + pageNumber?: number, + pageSize?: number, + sort?: OrgGroupSortOption, + include?: Array, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.listOrgGroups"]) { + throw new Error( + "Unstable operation 'listOrgGroups' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.listOrgGroups'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/v2/org_groups"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.listOrgGroups", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + serialize(pageNumber, TypingInfo, "number", "int64"), + "", + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + serialize(pageSize, TypingInfo, "number", "int64"), + "", + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + serialize(sort, TypingInfo, "OrgGroupSortOption", ""), + "", + ); + } + if (include !== undefined) { + requestContext.setQueryParam( + "include", + serialize(include, TypingInfo, "Array", ""), + "csv", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateOrgGroup( + orgGroupId: string, + body: OrgGroupUpdateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.updateOrgGroup"]) { + throw new Error( + "Unstable operation 'updateOrgGroup' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.updateOrgGroup'] = true`", + ); + } + + // verify required parameter 'orgGroupId' is not null or undefined + if (orgGroupId === null || orgGroupId === undefined) { + throw new RequiredError("orgGroupId", "updateOrgGroup"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateOrgGroup"); + } + + // Path Params + const localVarPath = "/api/v2/org_groups/{org_group_id}".replace( + "{org_group_id}", + encodeURIComponent(String(orgGroupId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.updateOrgGroup", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupUpdateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateOrgGroupMembership( + orgGroupMembershipId: string, + body: OrgGroupMembershipUpdateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["OrgGroupsApi.v2.updateOrgGroupMembership"] + ) { + throw new Error( + "Unstable operation 'updateOrgGroupMembership' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.updateOrgGroupMembership'] = true`", + ); + } + + // verify required parameter 'orgGroupMembershipId' is not null or undefined + if (orgGroupMembershipId === null || orgGroupMembershipId === undefined) { + throw new RequiredError( + "orgGroupMembershipId", + "updateOrgGroupMembership", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateOrgGroupMembership"); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_memberships/{org_group_membership_id}".replace( + "{org_group_membership_id}", + encodeURIComponent(String(orgGroupMembershipId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.updateOrgGroupMembership", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupMembershipUpdateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateOrgGroupPolicy( + orgGroupPolicyId: string, + body: OrgGroupPolicyUpdateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["OrgGroupsApi.v2.updateOrgGroupPolicy"]) { + throw new Error( + "Unstable operation 'updateOrgGroupPolicy' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.updateOrgGroupPolicy'] = true`", + ); + } + + // verify required parameter 'orgGroupPolicyId' is not null or undefined + if (orgGroupPolicyId === null || orgGroupPolicyId === undefined) { + throw new RequiredError("orgGroupPolicyId", "updateOrgGroupPolicy"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateOrgGroupPolicy"); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_policies/{org_group_policy_id}".replace( + "{org_group_policy_id}", + encodeURIComponent(String(orgGroupPolicyId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.updateOrgGroupPolicy", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupPolicyUpdateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateOrgGroupPolicyOverride( + orgGroupPolicyOverrideId: string, + body: OrgGroupPolicyOverrideUpdateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "OrgGroupsApi.v2.updateOrgGroupPolicyOverride" + ] + ) { + throw new Error( + "Unstable operation 'updateOrgGroupPolicyOverride' is disabled. Enable it by setting `configuration.unstableOperations['OrgGroupsApi.v2.updateOrgGroupPolicyOverride'] = true`", + ); + } + + // verify required parameter 'orgGroupPolicyOverrideId' is not null or undefined + if ( + orgGroupPolicyOverrideId === null || + orgGroupPolicyOverrideId === undefined + ) { + throw new RequiredError( + "orgGroupPolicyOverrideId", + "updateOrgGroupPolicyOverride", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateOrgGroupPolicyOverride"); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_policy_overrides/{org_group_policy_override_id}".replace( + "{org_group_policy_override_id}", + encodeURIComponent(String(orgGroupPolicyOverrideId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "OrgGroupsApi.v2.updateOrgGroupPolicyOverride", + OrgGroupsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "OrgGroupPolicyOverrideUpdateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class OrgGroupsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to bulkUpdateOrgGroupMemberships + * @throws ApiException if the response code was not in [200, 299] + */ + public async bulkUpdateOrgGroupMemberships( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupMembershipListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipListResponse", + ) as OrgGroupMembershipListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupMembershipListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipListResponse", + "", + ) as OrgGroupMembershipListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrgGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async createOrgGroup( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: OrgGroupResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupResponse", + ) as OrgGroupResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupResponse", + "", + ) as OrgGroupResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrgGroupPolicy + * @throws ApiException if the response code was not in [200, 299] + */ + public async createOrgGroupPolicy( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: OrgGroupPolicyResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyResponse", + ) as OrgGroupPolicyResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyResponse", + "", + ) as OrgGroupPolicyResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrgGroupPolicyOverride + * @throws ApiException if the response code was not in [200, 299] + */ + public async createOrgGroupPolicyOverride( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: OrgGroupPolicyOverrideResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyOverrideResponse", + ) as OrgGroupPolicyOverrideResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyOverrideResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyOverrideResponse", + "", + ) as OrgGroupPolicyOverrideResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrgGroup(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgGroupPolicy + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrgGroupPolicy(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgGroupPolicyOverride + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrgGroupPolicyOverride( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getOrgGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async getOrgGroup( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupResponse", + ) as OrgGroupResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupResponse", + "", + ) as OrgGroupResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getOrgGroupMembership + * @throws ApiException if the response code was not in [200, 299] + */ + public async getOrgGroupMembership( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupMembershipResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipResponse", + ) as OrgGroupMembershipResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupMembershipResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipResponse", + "", + ) as OrgGroupMembershipResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listOrgGroupMemberships + * @throws ApiException if the response code was not in [200, 299] + */ + public async listOrgGroupMemberships( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupMembershipListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipListResponse", + ) as OrgGroupMembershipListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupMembershipListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipListResponse", + "", + ) as OrgGroupMembershipListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listOrgGroupPolicies + * @throws ApiException if the response code was not in [200, 299] + */ + public async listOrgGroupPolicies( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyListResponse", + ) as OrgGroupPolicyListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyListResponse", + "", + ) as OrgGroupPolicyListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listOrgGroupPolicyConfigs + * @throws ApiException if the response code was not in [200, 299] + */ + public async listOrgGroupPolicyConfigs( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyConfigListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyConfigListResponse", + ) as OrgGroupPolicyConfigListResponse; + return body; + } + if (response.httpStatusCode === 401 || response.httpStatusCode === 403) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyConfigListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyConfigListResponse", + "", + ) as OrgGroupPolicyConfigListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listOrgGroupPolicyOverrides + * @throws ApiException if the response code was not in [200, 299] + */ + public async listOrgGroupPolicyOverrides( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyOverrideListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyOverrideListResponse", + ) as OrgGroupPolicyOverrideListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyOverrideListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyOverrideListResponse", + "", + ) as OrgGroupPolicyOverrideListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listOrgGroups + * @throws ApiException if the response code was not in [200, 299] + */ + public async listOrgGroups( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupListResponse", + ) as OrgGroupListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupListResponse", + "", + ) as OrgGroupListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrgGroup + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrgGroup( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupResponse", + ) as OrgGroupResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupResponse", + "", + ) as OrgGroupResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrgGroupMembership + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrgGroupMembership( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupMembershipResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipResponse", + ) as OrgGroupMembershipResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupMembershipResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupMembershipResponse", + "", + ) as OrgGroupMembershipResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrgGroupPolicy + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrgGroupPolicy( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyResponse", + ) as OrgGroupPolicyResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyResponse", + "", + ) as OrgGroupPolicyResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrgGroupPolicyOverride + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrgGroupPolicyOverride( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyOverrideResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyOverrideResponse", + ) as OrgGroupPolicyOverrideResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyOverrideResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "OrgGroupPolicyOverrideResponse", + "", + ) as OrgGroupPolicyOverrideResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } +} + +export interface OrgGroupsApiBulkUpdateOrgGroupMembershipsRequest { + /** + * @type OrgGroupMembershipBulkUpdateRequest + */ + body: OrgGroupMembershipBulkUpdateRequest; +} + +export interface OrgGroupsApiCreateOrgGroupRequest { + /** + * @type OrgGroupCreateRequest + */ + body: OrgGroupCreateRequest; +} + +export interface OrgGroupsApiCreateOrgGroupPolicyRequest { + /** + * @type OrgGroupPolicyCreateRequest + */ + body: OrgGroupPolicyCreateRequest; +} + +export interface OrgGroupsApiCreateOrgGroupPolicyOverrideRequest { + /** + * @type OrgGroupPolicyOverrideCreateRequest + */ + body: OrgGroupPolicyOverrideCreateRequest; +} + +export interface OrgGroupsApiDeleteOrgGroupRequest { + /** + * The ID of the org group. + * @type string + */ + orgGroupId: string; +} + +export interface OrgGroupsApiDeleteOrgGroupPolicyRequest { + /** + * The ID of the org group policy. + * @type string + */ + orgGroupPolicyId: string; +} + +export interface OrgGroupsApiDeleteOrgGroupPolicyOverrideRequest { + /** + * The ID of the org group policy override. + * @type string + */ + orgGroupPolicyOverrideId: string; +} + +export interface OrgGroupsApiGetOrgGroupRequest { + /** + * The ID of the org group. + * @type string + */ + orgGroupId: string; +} + +export interface OrgGroupsApiGetOrgGroupMembershipRequest { + /** + * The ID of the org group membership. + * @type string + */ + orgGroupMembershipId: string; +} + +export interface OrgGroupsApiListOrgGroupMembershipsRequest { + /** + * Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided. + * @type string + */ + filterOrgGroupId?: string; + /** + * Filter memberships by org UUID. Returns a single-item list. + * @type string + */ + filterOrgUuid?: string; + /** + * The page number to return. + * @type number + */ + pageNumber?: number; + /** + * The number of items per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`. + * @type OrgGroupMembershipSortOption + */ + sort?: OrgGroupMembershipSortOption; +} + +export interface OrgGroupsApiListOrgGroupPoliciesRequest { + /** + * Filter policies by org group ID. + * @type string + */ + filterOrgGroupId: string; + /** + * Filter policies by policy name. + * @type string + */ + filterPolicyName?: string; + /** + * The page number to return. + * @type number + */ + pageNumber?: number; + /** + * The number of items per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * Field to sort policies by. Supported values: `id`, `name`, `-id`, `-name`. Defaults to `id`. + * @type OrgGroupPolicySortOption + */ + sort?: OrgGroupPolicySortOption; +} + +export interface OrgGroupsApiListOrgGroupPolicyOverridesRequest { + /** + * Filter policy overrides by org group ID. + * @type string + */ + filterOrgGroupId: string; + /** + * Filter policy overrides by policy ID. + * @type string + */ + filterPolicyId?: string; + /** + * The page number to return. + * @type number + */ + pageNumber?: number; + /** + * The number of items per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * Field to sort overrides by. Supported values: `id`, `org_uuid`, `-id`, `-org_uuid`. Defaults to `id`. + * @type OrgGroupPolicyOverrideSortOption + */ + sort?: OrgGroupPolicyOverrideSortOption; +} + +export interface OrgGroupsApiListOrgGroupsRequest { + /** + * The page number to return. + * @type number + */ + pageNumber?: number; + /** + * The number of items per page. Maximum is 1000. + * @type number + */ + pageSize?: number; + /** + * Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`. + * @type OrgGroupSortOption + */ + sort?: OrgGroupSortOption; + /** + * List of related resources to include. + * @type Array + */ + include?: Array; +} + +export interface OrgGroupsApiUpdateOrgGroupRequest { + /** + * The ID of the org group. + * @type string + */ + orgGroupId: string; + /** + * @type OrgGroupUpdateRequest + */ + body: OrgGroupUpdateRequest; +} + +export interface OrgGroupsApiUpdateOrgGroupMembershipRequest { + /** + * The ID of the org group membership. + * @type string + */ + orgGroupMembershipId: string; + /** + * @type OrgGroupMembershipUpdateRequest + */ + body: OrgGroupMembershipUpdateRequest; +} + +export interface OrgGroupsApiUpdateOrgGroupPolicyRequest { + /** + * The ID of the org group policy. + * @type string + */ + orgGroupPolicyId: string; + /** + * @type OrgGroupPolicyUpdateRequest + */ + body: OrgGroupPolicyUpdateRequest; +} + +export interface OrgGroupsApiUpdateOrgGroupPolicyOverrideRequest { + /** + * The ID of the org group policy override. + * @type string + */ + orgGroupPolicyOverrideId: string; + /** + * @type OrgGroupPolicyOverrideUpdateRequest + */ + body: OrgGroupPolicyOverrideUpdateRequest; +} + +export class OrgGroupsApi { + private requestFactory: OrgGroupsApiRequestFactory; + private responseProcessor: OrgGroupsApiResponseProcessor; + private configuration: Configuration; + + static operationServers: { [key: string]: BaseServerConfiguration[] } = {}; + + public constructor( + configuration?: Configuration, + requestFactory?: OrgGroupsApiRequestFactory, + responseProcessor?: OrgGroupsApiResponseProcessor, + ) { + this.configuration = configuration || createConfiguration(); + this.requestFactory = + requestFactory || new OrgGroupsApiRequestFactory(this.configuration); + this.responseProcessor = + responseProcessor || new OrgGroupsApiResponseProcessor(); + } + + /** + * Move a batch of organizations from one org group to another. This is an atomic operation. Maximum 100 orgs per request. + * @param param The request object + */ + public bulkUpdateOrgGroupMemberships( + param: OrgGroupsApiBulkUpdateOrgGroupMembershipsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.bulkUpdateOrgGroupMemberships(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.bulkUpdateOrgGroupMemberships( + responseContext, + ); + }); + }); + } + + /** + * Create a new organization group. + * @param param The request object + */ + public createOrgGroup( + param: OrgGroupsApiCreateOrgGroupRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createOrgGroup( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createOrgGroup(responseContext); + }); + }); + } + + /** + * Create a new policy for an organization group. + * @param param The request object + */ + public createOrgGroupPolicy( + param: OrgGroupsApiCreateOrgGroupPolicyRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createOrgGroupPolicy( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createOrgGroupPolicy(responseContext); + }); + }); + } + + /** + * Create a new policy override for an organization within an org group. + * @param param The request object + */ + public createOrgGroupPolicyOverride( + param: OrgGroupsApiCreateOrgGroupPolicyOverrideRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.createOrgGroupPolicyOverride(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createOrgGroupPolicyOverride( + responseContext, + ); + }); + }); + } + + /** + * Delete an organization group by its ID. + * @param param The request object + */ + public deleteOrgGroup( + param: OrgGroupsApiDeleteOrgGroupRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.deleteOrgGroup( + param.orgGroupId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteOrgGroup(responseContext); + }); + }); + } + + /** + * Delete an organization group policy by its ID. + * @param param The request object + */ + public deleteOrgGroupPolicy( + param: OrgGroupsApiDeleteOrgGroupPolicyRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.deleteOrgGroupPolicy( + param.orgGroupPolicyId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteOrgGroupPolicy(responseContext); + }); + }); + } + + /** + * Delete an organization group policy override by its ID. + * @param param The request object + */ + public deleteOrgGroupPolicyOverride( + param: OrgGroupsApiDeleteOrgGroupPolicyOverrideRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.deleteOrgGroupPolicyOverride( + param.orgGroupPolicyOverrideId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteOrgGroupPolicyOverride( + responseContext, + ); + }); + }); + } + + /** + * Get a specific organization group by its ID. + * @param param The request object + */ + public getOrgGroup( + param: OrgGroupsApiGetOrgGroupRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getOrgGroup( + param.orgGroupId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getOrgGroup(responseContext); + }); + }); + } + + /** + * Get a specific organization group membership by its ID. + * @param param The request object + */ + public getOrgGroupMembership( + param: OrgGroupsApiGetOrgGroupMembershipRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getOrgGroupMembership( + param.orgGroupMembershipId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getOrgGroupMembership(responseContext); + }); + }); + } + + /** + * List organization group memberships. Filter by org group ID or org UUID. At least one of `filter[org_group_id]` or `filter[org_uuid]` must be provided. When filtering by org UUID, returns a single-item list with the membership for that org. + * @param param The request object + */ + public listOrgGroupMemberships( + param: OrgGroupsApiListOrgGroupMembershipsRequest = {}, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.listOrgGroupMemberships( + param.filterOrgGroupId, + param.filterOrgUuid, + param.pageNumber, + param.pageSize, + param.sort, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listOrgGroupMemberships( + responseContext, + ); + }); + }); + } + + /** + * List policies for an organization group. Requires a filter on org group ID. + * @param param The request object + */ + public listOrgGroupPolicies( + param: OrgGroupsApiListOrgGroupPoliciesRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.listOrgGroupPolicies( + param.filterOrgGroupId, + param.filterPolicyName, + param.pageNumber, + param.pageSize, + param.sort, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listOrgGroupPolicies(responseContext); + }); + }); + } + + /** + * List all org configs that are eligible to be used as organization group policies. + * @param param The request object + */ + public listOrgGroupPolicyConfigs( + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.listOrgGroupPolicyConfigs(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listOrgGroupPolicyConfigs( + responseContext, + ); + }); + }); + } + + /** + * List policy overrides for an organization group. Requires a filter on org group ID. Optionally filter by policy ID. + * @param param The request object + */ + public listOrgGroupPolicyOverrides( + param: OrgGroupsApiListOrgGroupPolicyOverridesRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.listOrgGroupPolicyOverrides( + param.filterOrgGroupId, + param.filterPolicyId, + param.pageNumber, + param.pageSize, + param.sort, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listOrgGroupPolicyOverrides( + responseContext, + ); + }); + }); + } + + /** + * List all organization groups that the requesting organization has access to. + * @param param The request object + */ + public listOrgGroups( + param: OrgGroupsApiListOrgGroupsRequest = {}, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.listOrgGroups( + param.pageNumber, + param.pageSize, + param.sort, + param.include, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listOrgGroups(responseContext); + }); + }); + } + + /** + * Update the name of an existing organization group. + * @param param The request object + */ + public updateOrgGroup( + param: OrgGroupsApiUpdateOrgGroupRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateOrgGroup( + param.orgGroupId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateOrgGroup(responseContext); + }); + }); + } + + /** + * Move an organization to a different org group by updating its membership. + * @param param The request object + */ + public updateOrgGroupMembership( + param: OrgGroupsApiUpdateOrgGroupMembershipRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateOrgGroupMembership( + param.orgGroupMembershipId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateOrgGroupMembership( + responseContext, + ); + }); + }); + } + + /** + * Update the content of an existing organization group policy. + * @param param The request object + */ + public updateOrgGroupPolicy( + param: OrgGroupsApiUpdateOrgGroupPolicyRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateOrgGroupPolicy( + param.orgGroupPolicyId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateOrgGroupPolicy(responseContext); + }); + }); + } + + /** + * Update an existing organization group policy override. + * @param param The request object + */ + public updateOrgGroupPolicyOverride( + param: OrgGroupsApiUpdateOrgGroupPolicyOverrideRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.updateOrgGroupPolicyOverride( + param.orgGroupPolicyOverrideId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateOrgGroupPolicyOverride( + responseContext, + ); + }); + }); + } +} diff --git a/services/org_groups/src/v2/index.ts b/services/org_groups/src/v2/index.ts new file mode 100644 index 000000000000..452f59793f03 --- /dev/null +++ b/services/org_groups/src/v2/index.ts @@ -0,0 +1,95 @@ +export { + OrgGroupsApiBulkUpdateOrgGroupMembershipsRequest, + OrgGroupsApiCreateOrgGroupRequest, + OrgGroupsApiCreateOrgGroupPolicyRequest, + OrgGroupsApiCreateOrgGroupPolicyOverrideRequest, + OrgGroupsApiDeleteOrgGroupRequest, + OrgGroupsApiDeleteOrgGroupPolicyRequest, + OrgGroupsApiDeleteOrgGroupPolicyOverrideRequest, + OrgGroupsApiGetOrgGroupRequest, + OrgGroupsApiGetOrgGroupMembershipRequest, + OrgGroupsApiListOrgGroupMembershipsRequest, + OrgGroupsApiListOrgGroupPoliciesRequest, + OrgGroupsApiListOrgGroupPolicyOverridesRequest, + OrgGroupsApiListOrgGroupsRequest, + OrgGroupsApiUpdateOrgGroupRequest, + OrgGroupsApiUpdateOrgGroupMembershipRequest, + OrgGroupsApiUpdateOrgGroupPolicyRequest, + OrgGroupsApiUpdateOrgGroupPolicyOverrideRequest, + OrgGroupsApi, +} from "./OrgGroupsApi"; + +export { APIErrorResponse } from "./models/APIErrorResponse"; +export { GlobalOrgIdentifier } from "./models/GlobalOrgIdentifier"; +export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem"; +export { JSONAPIErrorItemSource } from "./models/JSONAPIErrorItemSource"; +export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +export { OrgGroupAttributes } from "./models/OrgGroupAttributes"; +export { OrgGroupCreateAttributes } from "./models/OrgGroupCreateAttributes"; +export { OrgGroupCreateData } from "./models/OrgGroupCreateData"; +export { OrgGroupCreateRequest } from "./models/OrgGroupCreateRequest"; +export { OrgGroupData } from "./models/OrgGroupData"; +export { OrgGroupIncludeOption } from "./models/OrgGroupIncludeOption"; +export { OrgGroupListResponse } from "./models/OrgGroupListResponse"; +export { OrgGroupMembershipAttributes } from "./models/OrgGroupMembershipAttributes"; +export { OrgGroupMembershipBulkUpdateAttributes } from "./models/OrgGroupMembershipBulkUpdateAttributes"; +export { OrgGroupMembershipBulkUpdateData } from "./models/OrgGroupMembershipBulkUpdateData"; +export { OrgGroupMembershipBulkUpdateRelationships } from "./models/OrgGroupMembershipBulkUpdateRelationships"; +export { OrgGroupMembershipBulkUpdateRequest } from "./models/OrgGroupMembershipBulkUpdateRequest"; +export { OrgGroupMembershipBulkUpdateType } from "./models/OrgGroupMembershipBulkUpdateType"; +export { OrgGroupMembershipData } from "./models/OrgGroupMembershipData"; +export { OrgGroupMembershipListResponse } from "./models/OrgGroupMembershipListResponse"; +export { OrgGroupMembershipRelationshipData } from "./models/OrgGroupMembershipRelationshipData"; +export { OrgGroupMembershipRelationships } from "./models/OrgGroupMembershipRelationships"; +export { OrgGroupMembershipResponse } from "./models/OrgGroupMembershipResponse"; +export { OrgGroupMembershipSortOption } from "./models/OrgGroupMembershipSortOption"; +export { OrgGroupMembershipsRelationship } from "./models/OrgGroupMembershipsRelationship"; +export { OrgGroupMembershipType } from "./models/OrgGroupMembershipType"; +export { OrgGroupMembershipUpdateData } from "./models/OrgGroupMembershipUpdateData"; +export { OrgGroupMembershipUpdateRelationships } from "./models/OrgGroupMembershipUpdateRelationships"; +export { OrgGroupMembershipUpdateRequest } from "./models/OrgGroupMembershipUpdateRequest"; +export { OrgGroupPaginationMeta } from "./models/OrgGroupPaginationMeta"; +export { OrgGroupPaginationMetaPage } from "./models/OrgGroupPaginationMetaPage"; +export { OrgGroupPolicyAttributes } from "./models/OrgGroupPolicyAttributes"; +export { OrgGroupPolicyConfigAttributes } from "./models/OrgGroupPolicyConfigAttributes"; +export { OrgGroupPolicyConfigData } from "./models/OrgGroupPolicyConfigData"; +export { OrgGroupPolicyConfigListResponse } from "./models/OrgGroupPolicyConfigListResponse"; +export { OrgGroupPolicyConfigType } from "./models/OrgGroupPolicyConfigType"; +export { OrgGroupPolicyCreateAttributes } from "./models/OrgGroupPolicyCreateAttributes"; +export { OrgGroupPolicyCreateData } from "./models/OrgGroupPolicyCreateData"; +export { OrgGroupPolicyCreateRelationships } from "./models/OrgGroupPolicyCreateRelationships"; +export { OrgGroupPolicyCreateRequest } from "./models/OrgGroupPolicyCreateRequest"; +export { OrgGroupPolicyData } from "./models/OrgGroupPolicyData"; +export { OrgGroupPolicyListResponse } from "./models/OrgGroupPolicyListResponse"; +export { OrgGroupPolicyOverrideAttributes } from "./models/OrgGroupPolicyOverrideAttributes"; +export { OrgGroupPolicyOverrideCreateAttributes } from "./models/OrgGroupPolicyOverrideCreateAttributes"; +export { OrgGroupPolicyOverrideCreateData } from "./models/OrgGroupPolicyOverrideCreateData"; +export { OrgGroupPolicyOverrideCreateRelationships } from "./models/OrgGroupPolicyOverrideCreateRelationships"; +export { OrgGroupPolicyOverrideCreateRequest } from "./models/OrgGroupPolicyOverrideCreateRequest"; +export { OrgGroupPolicyOverrideData } from "./models/OrgGroupPolicyOverrideData"; +export { OrgGroupPolicyOverrideListResponse } from "./models/OrgGroupPolicyOverrideListResponse"; +export { OrgGroupPolicyOverrideRelationships } from "./models/OrgGroupPolicyOverrideRelationships"; +export { OrgGroupPolicyOverrideResponse } from "./models/OrgGroupPolicyOverrideResponse"; +export { OrgGroupPolicyOverrideSortOption } from "./models/OrgGroupPolicyOverrideSortOption"; +export { OrgGroupPolicyOverrideType } from "./models/OrgGroupPolicyOverrideType"; +export { OrgGroupPolicyOverrideUpdateAttributes } from "./models/OrgGroupPolicyOverrideUpdateAttributes"; +export { OrgGroupPolicyOverrideUpdateData } from "./models/OrgGroupPolicyOverrideUpdateData"; +export { OrgGroupPolicyOverrideUpdateRequest } from "./models/OrgGroupPolicyOverrideUpdateRequest"; +export { OrgGroupPolicyRelationships } from "./models/OrgGroupPolicyRelationships"; +export { OrgGroupPolicyRelationshipToOne } from "./models/OrgGroupPolicyRelationshipToOne"; +export { OrgGroupPolicyRelationshipToOneData } from "./models/OrgGroupPolicyRelationshipToOneData"; +export { OrgGroupPolicyResponse } from "./models/OrgGroupPolicyResponse"; +export { OrgGroupPolicySortOption } from "./models/OrgGroupPolicySortOption"; +export { OrgGroupPolicyType } from "./models/OrgGroupPolicyType"; +export { OrgGroupPolicyUpdateAttributes } from "./models/OrgGroupPolicyUpdateAttributes"; +export { OrgGroupPolicyUpdateData } from "./models/OrgGroupPolicyUpdateData"; +export { OrgGroupPolicyUpdateRequest } from "./models/OrgGroupPolicyUpdateRequest"; +export { OrgGroupRelationships } from "./models/OrgGroupRelationships"; +export { OrgGroupRelationshipToOne } from "./models/OrgGroupRelationshipToOne"; +export { OrgGroupRelationshipToOneData } from "./models/OrgGroupRelationshipToOneData"; +export { OrgGroupResponse } from "./models/OrgGroupResponse"; +export { OrgGroupSortOption } from "./models/OrgGroupSortOption"; +export { OrgGroupType } from "./models/OrgGroupType"; +export { OrgGroupUpdateAttributes } from "./models/OrgGroupUpdateAttributes"; +export { OrgGroupUpdateData } from "./models/OrgGroupUpdateData"; +export { OrgGroupUpdateRequest } from "./models/OrgGroupUpdateRequest"; diff --git a/services/org_groups/src/v2/models/APIErrorResponse.ts b/services/org_groups/src/v2/models/APIErrorResponse.ts new file mode 100644 index 000000000000..58d6c35b80f0 --- /dev/null +++ b/services/org_groups/src/v2/models/APIErrorResponse.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * API error response. + */ +export class APIErrorResponse { + /** + * A list of errors. + */ + "errors": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + errors: { + baseName: "errors", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return APIErrorResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/GlobalOrgIdentifier.ts b/services/org_groups/src/v2/models/GlobalOrgIdentifier.ts new file mode 100644 index 000000000000..f8947565d0ca --- /dev/null +++ b/services/org_groups/src/v2/models/GlobalOrgIdentifier.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * A unique identifier for an organization including its site. + */ +export class GlobalOrgIdentifier { + /** + * The site of the organization. + */ + "orgSite": string; + /** + * The UUID of the organization. + */ + "orgUuid": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgSite: { + baseName: "org_site", + type: "string", + required: true, + }, + orgUuid: { + baseName: "org_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GlobalOrgIdentifier.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/JSONAPIErrorItem.ts b/services/org_groups/src/v2/models/JSONAPIErrorItem.ts new file mode 100644 index 000000000000..a1ca45cd463c --- /dev/null +++ b/services/org_groups/src/v2/models/JSONAPIErrorItem.ts @@ -0,0 +1,78 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource"; + +/** + * API error response body + */ +export class JSONAPIErrorItem { + /** + * A human-readable explanation specific to this occurrence of the error. + */ + "detail"?: string; + /** + * Non-standard meta-information about the error + */ + "meta"?: { [key: string]: any }; + /** + * References to the source of the error. + */ + "source"?: JSONAPIErrorItemSource; + /** + * Status code of the response. + */ + "status"?: string; + /** + * Short human-readable summary of the error. + */ + "title"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + detail: { + baseName: "detail", + type: "string", + }, + meta: { + baseName: "meta", + type: "{ [key: string]: any; }", + }, + source: { + baseName: "source", + type: "JSONAPIErrorItemSource", + }, + status: { + baseName: "status", + type: "string", + }, + title: { + baseName: "title", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JSONAPIErrorItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/JSONAPIErrorItemSource.ts b/services/org_groups/src/v2/models/JSONAPIErrorItemSource.ts new file mode 100644 index 000000000000..5889114315fa --- /dev/null +++ b/services/org_groups/src/v2/models/JSONAPIErrorItemSource.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * References to the source of the error. + */ +export class JSONAPIErrorItemSource { + /** + * A string indicating the name of a single request header which caused the error. + */ + "header"?: string; + /** + * A string indicating which URI query parameter caused the error. + */ + "parameter"?: string; + /** + * A JSON pointer to the value in the request document that caused the error. + */ + "pointer"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + header: { + baseName: "header", + type: "string", + }, + parameter: { + baseName: "parameter", + type: "string", + }, + pointer: { + baseName: "pointer", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JSONAPIErrorItemSource.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/JSONAPIErrorResponse.ts b/services/org_groups/src/v2/models/JSONAPIErrorResponse.ts new file mode 100644 index 000000000000..68aa04ffc27b --- /dev/null +++ b/services/org_groups/src/v2/models/JSONAPIErrorResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { JSONAPIErrorItem } from "./JSONAPIErrorItem"; + +/** + * API error response. + */ +export class JSONAPIErrorResponse { + /** + * A list of errors. + */ + "errors": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + errors: { + baseName: "errors", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JSONAPIErrorResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupAttributes.ts b/services/org_groups/src/v2/models/OrgGroupAttributes.ts new file mode 100644 index 000000000000..8fda3d7b1b67 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupAttributes.ts @@ -0,0 +1,84 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes of an org group. + */ +export class OrgGroupAttributes { + /** + * Timestamp when the org group was created. + */ + "createdAt": Date; + /** + * Timestamp when the org group was last modified. + */ + "modifiedAt": Date; + /** + * The name of the org group. + */ + "name": string; + /** + * The site of the organization that owns this org group. + */ + "ownerOrgSite": string; + /** + * The UUID of the organization that owns this org group. + */ + "ownerOrgUuid": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + ownerOrgSite: { + baseName: "owner_org_site", + type: "string", + required: true, + }, + ownerOrgUuid: { + baseName: "owner_org_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupCreateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupCreateAttributes.ts new file mode 100644 index 000000000000..9e2f1be4c770 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupCreateAttributes.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for creating an org group. + */ +export class OrgGroupCreateAttributes { + /** + * The name of the org group. + */ + "name": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupCreateData.ts b/services/org_groups/src/v2/models/OrgGroupCreateData.ts new file mode 100644 index 000000000000..58035ae890b3 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupCreateData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupCreateAttributes } from "./OrgGroupCreateAttributes"; +import { OrgGroupType } from "./OrgGroupType"; + +/** + * Data for creating an org group. + */ +export class OrgGroupCreateData { + /** + * Attributes for creating an org group. + */ + "attributes": OrgGroupCreateAttributes; + /** + * Org groups resource type. + */ + "type": OrgGroupType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupCreateAttributes", + required: true, + }, + type: { + baseName: "type", + type: "OrgGroupType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupCreateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupCreateRequest.ts b/services/org_groups/src/v2/models/OrgGroupCreateRequest.ts new file mode 100644 index 000000000000..c00d0c8e54c5 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupCreateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupCreateData } from "./OrgGroupCreateData"; + +/** + * Request to create an org group. + */ +export class OrgGroupCreateRequest { + /** + * Data for creating an org group. + */ + "data": OrgGroupCreateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupCreateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupData.ts b/services/org_groups/src/v2/models/OrgGroupData.ts new file mode 100644 index 000000000000..55db908b0f0b --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupData.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupAttributes } from "./OrgGroupAttributes"; +import { OrgGroupRelationships } from "./OrgGroupRelationships"; +import { OrgGroupType } from "./OrgGroupType"; + +/** + * An org group resource. + */ +export class OrgGroupData { + /** + * Attributes of an org group. + */ + "attributes": OrgGroupAttributes; + /** + * The ID of the org group. + */ + "id": string; + /** + * Relationships of an org group. + */ + "relationships"?: OrgGroupRelationships; + /** + * Org groups resource type. + */ + "type": OrgGroupType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "OrgGroupRelationships", + }, + type: { + baseName: "type", + type: "OrgGroupType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupIncludeOption.ts b/services/org_groups/src/v2/models/OrgGroupIncludeOption.ts new file mode 100644 index 000000000000..ce2d9a427210 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupIncludeOption.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Allowed include options for org group endpoints. + */ +export type OrgGroupIncludeOption = typeof MEMBERSHIPS | UnparsedObject; +export const MEMBERSHIPS = "memberships"; diff --git a/services/org_groups/src/v2/models/OrgGroupListResponse.ts b/services/org_groups/src/v2/models/OrgGroupListResponse.ts new file mode 100644 index 000000000000..74e35b82bd06 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupListResponse.ts @@ -0,0 +1,65 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupData } from "./OrgGroupData"; +import { OrgGroupMembershipData } from "./OrgGroupMembershipData"; +import { OrgGroupPaginationMeta } from "./OrgGroupPaginationMeta"; + +/** + * Response containing a list of org groups. + */ +export class OrgGroupListResponse { + /** + * An array of org groups. + */ + "data": Array; + /** + * Related resources included in the response when requested with the `include` parameter. + */ + "included"?: Array; + /** + * Pagination metadata. + */ + "meta"?: OrgGroupPaginationMeta; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + included: { + baseName: "included", + type: "Array", + }, + meta: { + baseName: "meta", + type: "OrgGroupPaginationMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipAttributes.ts b/services/org_groups/src/v2/models/OrgGroupMembershipAttributes.ts new file mode 100644 index 000000000000..8eef8efe7c0f --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipAttributes.ts @@ -0,0 +1,84 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes of an org group membership. + */ +export class OrgGroupMembershipAttributes { + /** + * Timestamp when the membership was created. + */ + "createdAt": Date; + /** + * Timestamp when the membership was last modified. + */ + "modifiedAt": Date; + /** + * The name of the member organization. + */ + "orgName": string; + /** + * The site of the member organization. + */ + "orgSite": string; + /** + * The UUID of the member organization. + */ + "orgUuid": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + orgName: { + baseName: "org_name", + type: "string", + required: true, + }, + orgSite: { + baseName: "org_site", + type: "string", + required: true, + }, + orgUuid: { + baseName: "org_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateAttributes.ts new file mode 100644 index 000000000000..88967ffd8249 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateAttributes.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { GlobalOrgIdentifier } from "./GlobalOrgIdentifier"; + +/** + * Attributes for bulk updating org group memberships. + */ +export class OrgGroupMembershipBulkUpdateAttributes { + /** + * List of organizations to move. Maximum 100 per request. + */ + "orgs": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgs: { + baseName: "orgs", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipBulkUpdateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateData.ts b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateData.ts new file mode 100644 index 000000000000..7d26a58cc465 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipBulkUpdateAttributes } from "./OrgGroupMembershipBulkUpdateAttributes"; +import { OrgGroupMembershipBulkUpdateRelationships } from "./OrgGroupMembershipBulkUpdateRelationships"; +import { OrgGroupMembershipBulkUpdateType } from "./OrgGroupMembershipBulkUpdateType"; + +/** + * Data for bulk updating org group memberships. + */ +export class OrgGroupMembershipBulkUpdateData { + /** + * Attributes for bulk updating org group memberships. + */ + "attributes": OrgGroupMembershipBulkUpdateAttributes; + /** + * Relationships for bulk updating memberships. + */ + "relationships": OrgGroupMembershipBulkUpdateRelationships; + /** + * Org group membership bulk update resource type. + */ + "type": OrgGroupMembershipBulkUpdateType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupMembershipBulkUpdateAttributes", + required: true, + }, + relationships: { + baseName: "relationships", + type: "OrgGroupMembershipBulkUpdateRelationships", + required: true, + }, + type: { + baseName: "type", + type: "OrgGroupMembershipBulkUpdateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipBulkUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRelationships.ts b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRelationships.ts new file mode 100644 index 000000000000..b15e957d1516 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRelationships.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships for bulk updating memberships. + */ +export class OrgGroupMembershipBulkUpdateRelationships { + /** + * Relationship to a single org group. + */ + "sourceOrgGroup": OrgGroupRelationshipToOne; + /** + * Relationship to a single org group. + */ + "targetOrgGroup": OrgGroupRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + sourceOrgGroup: { + baseName: "source_org_group", + type: "OrgGroupRelationshipToOne", + required: true, + }, + targetOrgGroup: { + baseName: "target_org_group", + type: "OrgGroupRelationshipToOne", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipBulkUpdateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRequest.ts b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRequest.ts new file mode 100644 index 000000000000..702309088a33 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipBulkUpdateData } from "./OrgGroupMembershipBulkUpdateData"; + +/** + * Request to bulk update org group memberships. + */ +export class OrgGroupMembershipBulkUpdateRequest { + /** + * Data for bulk updating org group memberships. + */ + "data": OrgGroupMembershipBulkUpdateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupMembershipBulkUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipBulkUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateType.ts b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateType.ts new file mode 100644 index 000000000000..74e02c044625 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipBulkUpdateType.ts @@ -0,0 +1,10 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Org group membership bulk update resource type. + */ +export type OrgGroupMembershipBulkUpdateType = + | typeof ORG_GROUP_MEMBERSHIP_BULK_UPDATES + | UnparsedObject; +export const ORG_GROUP_MEMBERSHIP_BULK_UPDATES = + "org_group_membership_bulk_updates"; diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipData.ts b/services/org_groups/src/v2/models/OrgGroupMembershipData.ts new file mode 100644 index 000000000000..6d7470076542 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipData.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipAttributes } from "./OrgGroupMembershipAttributes"; +import { OrgGroupMembershipRelationships } from "./OrgGroupMembershipRelationships"; +import { OrgGroupMembershipType } from "./OrgGroupMembershipType"; + +/** + * An org group membership resource. + */ +export class OrgGroupMembershipData { + /** + * Attributes of an org group membership. + */ + "attributes": OrgGroupMembershipAttributes; + /** + * The ID of the org group membership. + */ + "id": string; + /** + * Relationships of an org group membership. + */ + "relationships"?: OrgGroupMembershipRelationships; + /** + * Org group memberships resource type. + */ + "type": OrgGroupMembershipType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupMembershipAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "OrgGroupMembershipRelationships", + }, + type: { + baseName: "type", + type: "OrgGroupMembershipType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipListResponse.ts b/services/org_groups/src/v2/models/OrgGroupMembershipListResponse.ts new file mode 100644 index 000000000000..a337c0673f3b --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipListResponse.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipData } from "./OrgGroupMembershipData"; +import { OrgGroupPaginationMeta } from "./OrgGroupPaginationMeta"; + +/** + * Response containing a list of org group memberships. + */ +export class OrgGroupMembershipListResponse { + /** + * An array of org group memberships. + */ + "data": Array; + /** + * Pagination metadata. + */ + "meta"?: OrgGroupPaginationMeta; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + meta: { + baseName: "meta", + type: "OrgGroupPaginationMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipRelationshipData.ts b/services/org_groups/src/v2/models/OrgGroupMembershipRelationshipData.ts new file mode 100644 index 000000000000..1ba4e31ad1f3 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipRelationshipData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipType } from "./OrgGroupMembershipType"; + +/** + * A reference to an org group membership. + */ +export class OrgGroupMembershipRelationshipData { + /** + * The ID of the membership. + */ + "id": string; + /** + * Org group memberships resource type. + */ + "type": OrgGroupMembershipType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgGroupMembershipType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipRelationships.ts b/services/org_groups/src/v2/models/OrgGroupMembershipRelationships.ts new file mode 100644 index 000000000000..c455027fea84 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipRelationships.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships of an org group membership. + */ +export class OrgGroupMembershipRelationships { + /** + * Relationship to a single org group. + */ + "orgGroup"?: OrgGroupRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgGroup: { + baseName: "org_group", + type: "OrgGroupRelationshipToOne", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipResponse.ts b/services/org_groups/src/v2/models/OrgGroupMembershipResponse.ts new file mode 100644 index 000000000000..f32fe942020e --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipData } from "./OrgGroupMembershipData"; + +/** + * Response containing a single org group membership. + */ +export class OrgGroupMembershipResponse { + /** + * An org group membership resource. + */ + "data": OrgGroupMembershipData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupMembershipData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipSortOption.ts b/services/org_groups/src/v2/models/OrgGroupMembershipSortOption.ts new file mode 100644 index 000000000000..b40b3dd77156 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipSortOption.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Field to sort memberships by. + */ +export type OrgGroupMembershipSortOption = + | typeof NAME + | typeof MINUS_NAME + | typeof UUID + | typeof MINUS_UUID + | UnparsedObject; +export const NAME = "name"; +export const MINUS_NAME = "-name"; +export const UUID = "uuid"; +export const MINUS_UUID = "-uuid"; diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipType.ts b/services/org_groups/src/v2/models/OrgGroupMembershipType.ts new file mode 100644 index 000000000000..b94a54696504 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Org group memberships resource type. + */ +export type OrgGroupMembershipType = + | typeof ORG_GROUP_MEMBERSHIPS + | UnparsedObject; +export const ORG_GROUP_MEMBERSHIPS = "org_group_memberships"; diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipUpdateData.ts b/services/org_groups/src/v2/models/OrgGroupMembershipUpdateData.ts new file mode 100644 index 000000000000..0286f991754e --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipUpdateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipType } from "./OrgGroupMembershipType"; +import { OrgGroupMembershipUpdateRelationships } from "./OrgGroupMembershipUpdateRelationships"; + +/** + * Data for updating an org group membership. + */ +export class OrgGroupMembershipUpdateData { + /** + * The ID of the membership. + */ + "id": string; + /** + * Relationships for updating a membership. + */ + "relationships": OrgGroupMembershipUpdateRelationships; + /** + * Org group memberships resource type. + */ + "type": OrgGroupMembershipType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "OrgGroupMembershipUpdateRelationships", + required: true, + }, + type: { + baseName: "type", + type: "OrgGroupMembershipType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipUpdateRelationships.ts b/services/org_groups/src/v2/models/OrgGroupMembershipUpdateRelationships.ts new file mode 100644 index 000000000000..865cb88934cf --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipUpdateRelationships.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships for updating a membership. + */ +export class OrgGroupMembershipUpdateRelationships { + /** + * Relationship to a single org group. + */ + "orgGroup": OrgGroupRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgGroup: { + baseName: "org_group", + type: "OrgGroupRelationshipToOne", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipUpdateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipUpdateRequest.ts b/services/org_groups/src/v2/models/OrgGroupMembershipUpdateRequest.ts new file mode 100644 index 000000000000..82b809add425 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipUpdateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipUpdateData } from "./OrgGroupMembershipUpdateData"; + +/** + * Request to update an org group membership. + */ +export class OrgGroupMembershipUpdateRequest { + /** + * Data for updating an org group membership. + */ + "data": OrgGroupMembershipUpdateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupMembershipUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupMembershipsRelationship.ts b/services/org_groups/src/v2/models/OrgGroupMembershipsRelationship.ts new file mode 100644 index 000000000000..476c7827e422 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupMembershipsRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipRelationshipData } from "./OrgGroupMembershipRelationshipData"; + +/** + * Relationship to org group memberships. + */ +export class OrgGroupMembershipsRelationship { + /** + * An array of membership relationship references. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupMembershipsRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPaginationMeta.ts b/services/org_groups/src/v2/models/OrgGroupPaginationMeta.ts new file mode 100644 index 000000000000..94a207a13e20 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPaginationMeta.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPaginationMetaPage } from "./OrgGroupPaginationMetaPage"; + +/** + * Pagination metadata. + */ +export class OrgGroupPaginationMeta { + /** + * Page-based pagination details. + */ + "page": OrgGroupPaginationMetaPage; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + page: { + baseName: "page", + type: "OrgGroupPaginationMetaPage", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPaginationMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPaginationMetaPage.ts b/services/org_groups/src/v2/models/OrgGroupPaginationMetaPage.ts new file mode 100644 index 000000000000..7f5911c304be --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPaginationMetaPage.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Page-based pagination details. + */ +export class OrgGroupPaginationMetaPage { + /** + * The total number of items. + */ + "totalCount": number; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + totalCount: { + baseName: "total_count", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPaginationMetaPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyAttributes.ts new file mode 100644 index 000000000000..c0eb756ad369 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyAttributes.ts @@ -0,0 +1,73 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes of an org group policy. + */ +export class OrgGroupPolicyAttributes { + /** + * The policy content as key-value pairs. + */ + "content"?: { [key: string]: any }; + /** + * Timestamp when the policy was enforced. + */ + "enforcedAt": Date; + /** + * Timestamp when the policy was last modified. + */ + "modifiedAt": Date; + /** + * The name of the policy. + */ + "policyName": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "{ [key: string]: any; }", + }, + enforcedAt: { + baseName: "enforced_at", + type: "Date", + required: true, + format: "date-time", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + policyName: { + baseName: "policy_name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyConfigAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyConfigAttributes.ts new file mode 100644 index 000000000000..24bfcc2cedc7 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyConfigAttributes.ts @@ -0,0 +1,81 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes of an org group policy config. + */ +export class OrgGroupPolicyConfigAttributes { + /** + * The allowed values for this config. + */ + "allowedValues": Array; + /** + * The default value for this config. + */ + "defaultValue": any; + /** + * The description of the policy config. + */ + "description": string; + /** + * The name of the policy config. + */ + "name": string; + /** + * The type of the value for this config. + */ + "valueType": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + allowedValues: { + baseName: "allowed_values", + type: "Array", + required: true, + }, + defaultValue: { + baseName: "default_value", + type: "any", + required: true, + }, + description: { + baseName: "description", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + valueType: { + baseName: "value_type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyConfigAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyConfigData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyConfigData.ts new file mode 100644 index 000000000000..d88ec9644f57 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyConfigData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyConfigAttributes } from "./OrgGroupPolicyConfigAttributes"; +import { OrgGroupPolicyConfigType } from "./OrgGroupPolicyConfigType"; + +/** + * An org group policy config resource. + */ +export class OrgGroupPolicyConfigData { + /** + * Attributes of an org group policy config. + */ + "attributes": OrgGroupPolicyConfigAttributes; + /** + * The identifier of the policy config (uses the config name). + */ + "id": string; + /** + * Org group policy configs resource type. + */ + "type": OrgGroupPolicyConfigType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyConfigAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "OrgGroupPolicyConfigType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyConfigData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyConfigListResponse.ts b/services/org_groups/src/v2/models/OrgGroupPolicyConfigListResponse.ts new file mode 100644 index 000000000000..5db82f6aeebb --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyConfigListResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyConfigData } from "./OrgGroupPolicyConfigData"; + +/** + * Response containing a list of org group policy configs. + */ +export class OrgGroupPolicyConfigListResponse { + /** + * An array of org group policy configs. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyConfigListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyConfigType.ts b/services/org_groups/src/v2/models/OrgGroupPolicyConfigType.ts new file mode 100644 index 000000000000..30707b256745 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyConfigType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Org group policy configs resource type. + */ +export type OrgGroupPolicyConfigType = + | typeof ORG_GROUP_POLICY_CONFIGS + | UnparsedObject; +export const ORG_GROUP_POLICY_CONFIGS = "org_group_policy_configs"; diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyCreateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyCreateAttributes.ts new file mode 100644 index 000000000000..3bd6ffd21c7f --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyCreateAttributes.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for creating an org group policy. + */ +export class OrgGroupPolicyCreateAttributes { + /** + * The policy content as key-value pairs. + */ + "content": { [key: string]: any }; + /** + * The name of the policy. + */ + "policyName": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "{ [key: string]: any; }", + required: true, + }, + policyName: { + baseName: "policy_name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyCreateData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyCreateData.ts new file mode 100644 index 000000000000..364ce4fe91b4 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyCreateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyCreateAttributes } from "./OrgGroupPolicyCreateAttributes"; +import { OrgGroupPolicyCreateRelationships } from "./OrgGroupPolicyCreateRelationships"; +import { OrgGroupPolicyType } from "./OrgGroupPolicyType"; + +/** + * Data for creating an org group policy. + */ +export class OrgGroupPolicyCreateData { + /** + * Attributes for creating an org group policy. + */ + "attributes": OrgGroupPolicyCreateAttributes; + /** + * Relationships for creating a policy. + */ + "relationships": OrgGroupPolicyCreateRelationships; + /** + * Org group policies resource type. + */ + "type": OrgGroupPolicyType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyCreateAttributes", + required: true, + }, + relationships: { + baseName: "relationships", + type: "OrgGroupPolicyCreateRelationships", + required: true, + }, + type: { + baseName: "type", + type: "OrgGroupPolicyType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyCreateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyCreateRelationships.ts b/services/org_groups/src/v2/models/OrgGroupPolicyCreateRelationships.ts new file mode 100644 index 000000000000..760d09199067 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyCreateRelationships.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships for creating a policy. + */ +export class OrgGroupPolicyCreateRelationships { + /** + * Relationship to a single org group. + */ + "orgGroup": OrgGroupRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgGroup: { + baseName: "org_group", + type: "OrgGroupRelationshipToOne", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyCreateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyCreateRequest.ts b/services/org_groups/src/v2/models/OrgGroupPolicyCreateRequest.ts new file mode 100644 index 000000000000..8d02339a9fec --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyCreateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyCreateData } from "./OrgGroupPolicyCreateData"; + +/** + * Request to create an org group policy. + */ +export class OrgGroupPolicyCreateRequest { + /** + * Data for creating an org group policy. + */ + "data": OrgGroupPolicyCreateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyCreateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyData.ts new file mode 100644 index 000000000000..9f898dd6e6df --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyData.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyAttributes } from "./OrgGroupPolicyAttributes"; +import { OrgGroupPolicyRelationships } from "./OrgGroupPolicyRelationships"; +import { OrgGroupPolicyType } from "./OrgGroupPolicyType"; + +/** + * An org group policy resource. + */ +export class OrgGroupPolicyData { + /** + * Attributes of an org group policy. + */ + "attributes": OrgGroupPolicyAttributes; + /** + * The ID of the org group policy. + */ + "id": string; + /** + * Relationships of an org group policy. + */ + "relationships"?: OrgGroupPolicyRelationships; + /** + * Org group policies resource type. + */ + "type": OrgGroupPolicyType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "OrgGroupPolicyRelationships", + }, + type: { + baseName: "type", + type: "OrgGroupPolicyType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyListResponse.ts b/services/org_groups/src/v2/models/OrgGroupPolicyListResponse.ts new file mode 100644 index 000000000000..e6a8a44ff158 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyListResponse.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPaginationMeta } from "./OrgGroupPaginationMeta"; +import { OrgGroupPolicyData } from "./OrgGroupPolicyData"; + +/** + * Response containing a list of org group policies. + */ +export class OrgGroupPolicyListResponse { + /** + * An array of org group policies. + */ + "data": Array; + /** + * Pagination metadata. + */ + "meta"?: OrgGroupPaginationMeta; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + meta: { + baseName: "meta", + type: "OrgGroupPaginationMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideAttributes.ts new file mode 100644 index 000000000000..1ea213db7518 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideAttributes.ts @@ -0,0 +1,83 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes of an org group policy override. + */ +export class OrgGroupPolicyOverrideAttributes { + /** + * The override content as key-value pairs. + */ + "content"?: { [key: string]: any }; + /** + * Timestamp when the override was created. + */ + "createdAt": Date; + /** + * Timestamp when the override was last modified. + */ + "modifiedAt": Date; + /** + * The site of the organization that has the override. + */ + "orgSite": string; + /** + * The UUID of the organization that has the override. + */ + "orgUuid": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "{ [key: string]: any; }", + }, + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + orgSite: { + baseName: "org_site", + type: "string", + required: true, + }, + orgUuid: { + baseName: "org_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateAttributes.ts new file mode 100644 index 000000000000..a378558c3715 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateAttributes.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for creating a policy override. + */ +export class OrgGroupPolicyOverrideCreateAttributes { + /** + * The site of the organization. + */ + "orgSite": string; + /** + * The UUID of the organization to grant the override. + */ + "orgUuid": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgSite: { + baseName: "org_site", + type: "string", + required: true, + }, + orgUuid: { + baseName: "org_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateData.ts new file mode 100644 index 000000000000..928fdb044220 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyOverrideCreateAttributes } from "./OrgGroupPolicyOverrideCreateAttributes"; +import { OrgGroupPolicyOverrideCreateRelationships } from "./OrgGroupPolicyOverrideCreateRelationships"; +import { OrgGroupPolicyOverrideType } from "./OrgGroupPolicyOverrideType"; + +/** + * Data for creating an org group policy override. + */ +export class OrgGroupPolicyOverrideCreateData { + /** + * Attributes for creating a policy override. + */ + "attributes": OrgGroupPolicyOverrideCreateAttributes; + /** + * Relationships for creating a policy override. + */ + "relationships": OrgGroupPolicyOverrideCreateRelationships; + /** + * Org group policy overrides resource type. + */ + "type": OrgGroupPolicyOverrideType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyOverrideCreateAttributes", + required: true, + }, + relationships: { + baseName: "relationships", + type: "OrgGroupPolicyOverrideCreateRelationships", + required: true, + }, + type: { + baseName: "type", + type: "OrgGroupPolicyOverrideType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideCreateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRelationships.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRelationships.ts new file mode 100644 index 000000000000..f2d0df7e3b0e --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRelationships.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyRelationshipToOne } from "./OrgGroupPolicyRelationshipToOne"; +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships for creating a policy override. + */ +export class OrgGroupPolicyOverrideCreateRelationships { + /** + * Relationship to a single org group. + */ + "orgGroup": OrgGroupRelationshipToOne; + /** + * Relationship to a single org group policy. + */ + "orgGroupPolicy": OrgGroupPolicyRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgGroup: { + baseName: "org_group", + type: "OrgGroupRelationshipToOne", + required: true, + }, + orgGroupPolicy: { + baseName: "org_group_policy", + type: "OrgGroupPolicyRelationshipToOne", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideCreateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRequest.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRequest.ts new file mode 100644 index 000000000000..ba5766f63078 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideCreateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyOverrideCreateData } from "./OrgGroupPolicyOverrideCreateData"; + +/** + * Request to create an org group policy override. + */ +export class OrgGroupPolicyOverrideCreateRequest { + /** + * Data for creating an org group policy override. + */ + "data": OrgGroupPolicyOverrideCreateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyOverrideCreateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideData.ts new file mode 100644 index 000000000000..72df1f4c164c --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideData.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyOverrideAttributes } from "./OrgGroupPolicyOverrideAttributes"; +import { OrgGroupPolicyOverrideRelationships } from "./OrgGroupPolicyOverrideRelationships"; +import { OrgGroupPolicyOverrideType } from "./OrgGroupPolicyOverrideType"; + +/** + * An org group policy override resource. + */ +export class OrgGroupPolicyOverrideData { + /** + * Attributes of an org group policy override. + */ + "attributes": OrgGroupPolicyOverrideAttributes; + /** + * The ID of the policy override. + */ + "id": string; + /** + * Relationships of an org group policy override. + */ + "relationships"?: OrgGroupPolicyOverrideRelationships; + /** + * Org group policy overrides resource type. + */ + "type": OrgGroupPolicyOverrideType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyOverrideAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "OrgGroupPolicyOverrideRelationships", + }, + type: { + baseName: "type", + type: "OrgGroupPolicyOverrideType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideListResponse.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideListResponse.ts new file mode 100644 index 000000000000..a36582186af9 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideListResponse.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPaginationMeta } from "./OrgGroupPaginationMeta"; +import { OrgGroupPolicyOverrideData } from "./OrgGroupPolicyOverrideData"; + +/** + * Response containing a list of org group policy overrides. + */ +export class OrgGroupPolicyOverrideListResponse { + /** + * An array of org group policy overrides. + */ + "data": Array; + /** + * Pagination metadata. + */ + "meta"?: OrgGroupPaginationMeta; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + meta: { + baseName: "meta", + type: "OrgGroupPaginationMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideRelationships.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideRelationships.ts new file mode 100644 index 000000000000..fe59f5c5880a --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideRelationships.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyRelationshipToOne } from "./OrgGroupPolicyRelationshipToOne"; +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships of an org group policy override. + */ +export class OrgGroupPolicyOverrideRelationships { + /** + * Relationship to a single org group. + */ + "orgGroup"?: OrgGroupRelationshipToOne; + /** + * Relationship to a single org group policy. + */ + "orgGroupPolicy"?: OrgGroupPolicyRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgGroup: { + baseName: "org_group", + type: "OrgGroupRelationshipToOne", + }, + orgGroupPolicy: { + baseName: "org_group_policy", + type: "OrgGroupPolicyRelationshipToOne", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideResponse.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideResponse.ts new file mode 100644 index 000000000000..13889d3dd0c3 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyOverrideData } from "./OrgGroupPolicyOverrideData"; + +/** + * Response containing a single org group policy override. + */ +export class OrgGroupPolicyOverrideResponse { + /** + * An org group policy override resource. + */ + "data": OrgGroupPolicyOverrideData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyOverrideData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideSortOption.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideSortOption.ts new file mode 100644 index 000000000000..8619fe69462b --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideSortOption.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Field to sort overrides by. + */ +export type OrgGroupPolicyOverrideSortOption = + | typeof ID + | typeof MINUS_ID + | typeof ORG_UUID + | typeof MINUS_ORG_UUID + | UnparsedObject; +export const ID = "id"; +export const MINUS_ID = "-id"; +export const ORG_UUID = "org_uuid"; +export const MINUS_ORG_UUID = "-org_uuid"; diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideType.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideType.ts new file mode 100644 index 000000000000..486e2d5ecd0c --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Org group policy overrides resource type. + */ +export type OrgGroupPolicyOverrideType = + | typeof ORG_GROUP_POLICY_OVERRIDES + | UnparsedObject; +export const ORG_GROUP_POLICY_OVERRIDES = "org_group_policy_overrides"; diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts new file mode 100644 index 000000000000..b790e66c642e --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for updating a policy override. + */ +export class OrgGroupPolicyOverrideUpdateAttributes { + /** + * The site of the organization. + */ + "orgSite": string; + /** + * The UUID of the organization. + */ + "orgUuid": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgSite: { + baseName: "org_site", + type: "string", + required: true, + }, + orgUuid: { + baseName: "org_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideUpdateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateData.ts new file mode 100644 index 000000000000..f6d12b683f0f --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyOverrideType } from "./OrgGroupPolicyOverrideType"; +import { OrgGroupPolicyOverrideUpdateAttributes } from "./OrgGroupPolicyOverrideUpdateAttributes"; + +/** + * Data for updating a policy override. + */ +export class OrgGroupPolicyOverrideUpdateData { + /** + * Attributes for updating a policy override. + */ + "attributes": OrgGroupPolicyOverrideUpdateAttributes; + /** + * The ID of the policy override. + */ + "id": string; + /** + * Org group policy overrides resource type. + */ + "type": OrgGroupPolicyOverrideType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyOverrideUpdateAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgGroupPolicyOverrideType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateRequest.ts b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateRequest.ts new file mode 100644 index 000000000000..17caf55e5fa1 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyOverrideUpdateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyOverrideUpdateData } from "./OrgGroupPolicyOverrideUpdateData"; + +/** + * Request to update an org group policy override. + */ +export class OrgGroupPolicyOverrideUpdateRequest { + /** + * Data for updating a policy override. + */ + "data": OrgGroupPolicyOverrideUpdateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyOverrideUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyOverrideUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOne.ts b/services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOne.ts new file mode 100644 index 000000000000..93de7bc23e9b --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOne.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyRelationshipToOneData } from "./OrgGroupPolicyRelationshipToOneData"; + +/** + * Relationship to a single org group policy. + */ +export class OrgGroupPolicyRelationshipToOne { + /** + * A reference to an org group policy. + */ + "data": OrgGroupPolicyRelationshipToOneData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyRelationshipToOneData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyRelationshipToOne.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOneData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOneData.ts new file mode 100644 index 000000000000..bec7696e5c09 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyRelationshipToOneData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyType } from "./OrgGroupPolicyType"; + +/** + * A reference to an org group policy. + */ +export class OrgGroupPolicyRelationshipToOneData { + /** + * The ID of the policy. + */ + "id": string; + /** + * Org group policies resource type. + */ + "type": OrgGroupPolicyType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgGroupPolicyType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyRelationshipToOneData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyRelationships.ts b/services/org_groups/src/v2/models/OrgGroupPolicyRelationships.ts new file mode 100644 index 000000000000..c77325076e45 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyRelationships.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; + +/** + * Relationships of an org group policy. + */ +export class OrgGroupPolicyRelationships { + /** + * Relationship to a single org group. + */ + "orgGroup"?: OrgGroupRelationshipToOne; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + orgGroup: { + baseName: "org_group", + type: "OrgGroupRelationshipToOne", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyResponse.ts b/services/org_groups/src/v2/models/OrgGroupPolicyResponse.ts new file mode 100644 index 000000000000..a1bcd1b565eb --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyData } from "./OrgGroupPolicyData"; + +/** + * Response containing a single org group policy. + */ +export class OrgGroupPolicyResponse { + /** + * An org group policy resource. + */ + "data": OrgGroupPolicyData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicySortOption.ts b/services/org_groups/src/v2/models/OrgGroupPolicySortOption.ts new file mode 100644 index 000000000000..e3bc35989d53 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicySortOption.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Field to sort policies by. + */ +export type OrgGroupPolicySortOption = + | typeof ID + | typeof MINUS_ID + | typeof NAME + | typeof MINUS_NAME + | UnparsedObject; +export const ID = "id"; +export const MINUS_ID = "-id"; +export const NAME = "name"; +export const MINUS_NAME = "-name"; diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyType.ts b/services/org_groups/src/v2/models/OrgGroupPolicyType.ts new file mode 100644 index 000000000000..2d536f50513c --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Org group policies resource type. + */ +export type OrgGroupPolicyType = typeof ORG_GROUP_POLICIES | UnparsedObject; +export const ORG_GROUP_POLICIES = "org_group_policies"; diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyUpdateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupPolicyUpdateAttributes.ts new file mode 100644 index 000000000000..c107c9016378 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyUpdateAttributes.ts @@ -0,0 +1,44 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for updating an org group policy. + */ +export class OrgGroupPolicyUpdateAttributes { + /** + * The policy content as key-value pairs. + */ + "content"?: { [key: string]: any }; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "{ [key: string]: any; }", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyUpdateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyUpdateData.ts b/services/org_groups/src/v2/models/OrgGroupPolicyUpdateData.ts new file mode 100644 index 000000000000..6325e6996445 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyUpdateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyType } from "./OrgGroupPolicyType"; +import { OrgGroupPolicyUpdateAttributes } from "./OrgGroupPolicyUpdateAttributes"; + +/** + * Data for updating an org group policy. + */ +export class OrgGroupPolicyUpdateData { + /** + * Attributes for updating an org group policy. + */ + "attributes": OrgGroupPolicyUpdateAttributes; + /** + * The ID of the policy. + */ + "id": string; + /** + * Org group policies resource type. + */ + "type": OrgGroupPolicyType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupPolicyUpdateAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgGroupPolicyType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupPolicyUpdateRequest.ts b/services/org_groups/src/v2/models/OrgGroupPolicyUpdateRequest.ts new file mode 100644 index 000000000000..9962c260bc79 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupPolicyUpdateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupPolicyUpdateData } from "./OrgGroupPolicyUpdateData"; + +/** + * Request to update an org group policy. + */ +export class OrgGroupPolicyUpdateRequest { + /** + * Data for updating an org group policy. + */ + "data": OrgGroupPolicyUpdateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupPolicyUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupPolicyUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupRelationshipToOne.ts b/services/org_groups/src/v2/models/OrgGroupRelationshipToOne.ts new file mode 100644 index 000000000000..a398312db9e1 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupRelationshipToOne.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupRelationshipToOneData } from "./OrgGroupRelationshipToOneData"; + +/** + * Relationship to a single org group. + */ +export class OrgGroupRelationshipToOne { + /** + * A reference to an org group. + */ + "data": OrgGroupRelationshipToOneData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupRelationshipToOneData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupRelationshipToOne.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupRelationshipToOneData.ts b/services/org_groups/src/v2/models/OrgGroupRelationshipToOneData.ts new file mode 100644 index 000000000000..acbfa85c6f85 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupRelationshipToOneData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupType } from "./OrgGroupType"; + +/** + * A reference to an org group. + */ +export class OrgGroupRelationshipToOneData { + /** + * The ID of the org group. + */ + "id": string; + /** + * Org groups resource type. + */ + "type": OrgGroupType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgGroupType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupRelationshipToOneData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupRelationships.ts b/services/org_groups/src/v2/models/OrgGroupRelationships.ts new file mode 100644 index 000000000000..eb6c27712775 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupRelationships.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupMembershipsRelationship } from "./OrgGroupMembershipsRelationship"; + +/** + * Relationships of an org group. + */ +export class OrgGroupRelationships { + /** + * Relationship to org group memberships. + */ + "memberships"?: OrgGroupMembershipsRelationship; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + memberships: { + baseName: "memberships", + type: "OrgGroupMembershipsRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupResponse.ts b/services/org_groups/src/v2/models/OrgGroupResponse.ts new file mode 100644 index 000000000000..826599b5dba5 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupData } from "./OrgGroupData"; + +/** + * Response containing a single org group. + */ +export class OrgGroupResponse { + /** + * An org group resource. + */ + "data": OrgGroupData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupSortOption.ts b/services/org_groups/src/v2/models/OrgGroupSortOption.ts new file mode 100644 index 000000000000..7c7ec3cbcae5 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupSortOption.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Field to sort org groups by. + */ +export type OrgGroupSortOption = + | typeof NAME + | typeof MINUS_NAME + | typeof UUID + | typeof MINUS_UUID + | UnparsedObject; +export const NAME = "name"; +export const MINUS_NAME = "-name"; +export const UUID = "uuid"; +export const MINUS_UUID = "-uuid"; diff --git a/services/org_groups/src/v2/models/OrgGroupType.ts b/services/org_groups/src/v2/models/OrgGroupType.ts new file mode 100644 index 000000000000..84c7f46726c3 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Org groups resource type. + */ +export type OrgGroupType = typeof ORG_GROUPS | UnparsedObject; +export const ORG_GROUPS = "org_groups"; diff --git a/services/org_groups/src/v2/models/OrgGroupUpdateAttributes.ts b/services/org_groups/src/v2/models/OrgGroupUpdateAttributes.ts new file mode 100644 index 000000000000..1278cba3d2d4 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupUpdateAttributes.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for updating an org group. + */ +export class OrgGroupUpdateAttributes { + /** + * The name of the org group. + */ + "name": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupUpdateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupUpdateData.ts b/services/org_groups/src/v2/models/OrgGroupUpdateData.ts new file mode 100644 index 000000000000..27fed920f6e0 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupUpdateData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupType } from "./OrgGroupType"; +import { OrgGroupUpdateAttributes } from "./OrgGroupUpdateAttributes"; + +/** + * Data for updating an org group. + */ +export class OrgGroupUpdateData { + /** + * Attributes for updating an org group. + */ + "attributes": OrgGroupUpdateAttributes; + /** + * The ID of the org group. + */ + "id": string; + /** + * Org groups resource type. + */ + "type": OrgGroupType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgGroupUpdateAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgGroupType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/OrgGroupUpdateRequest.ts b/services/org_groups/src/v2/models/OrgGroupUpdateRequest.ts new file mode 100644 index 000000000000..048322bb2cf9 --- /dev/null +++ b/services/org_groups/src/v2/models/OrgGroupUpdateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { OrgGroupUpdateData } from "./OrgGroupUpdateData"; + +/** + * Request to update an org group. + */ +export class OrgGroupUpdateRequest { + /** + * Data for updating an org group. + */ + "data": OrgGroupUpdateData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgGroupUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgGroupUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/org_groups/src/v2/models/TypingInfo.ts b/services/org_groups/src/v2/models/TypingInfo.ts new file mode 100644 index 000000000000..059eb5926156 --- /dev/null +++ b/services/org_groups/src/v2/models/TypingInfo.ts @@ -0,0 +1,153 @@ +import { ModelTypingInfo } from "@datadog/datadog-api-client"; + +import { APIErrorResponse } from "./APIErrorResponse"; +import { GlobalOrgIdentifier } from "./GlobalOrgIdentifier"; +import { JSONAPIErrorItem } from "./JSONAPIErrorItem"; +import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource"; +import { JSONAPIErrorResponse } from "./JSONAPIErrorResponse"; +import { OrgGroupAttributes } from "./OrgGroupAttributes"; +import { OrgGroupCreateAttributes } from "./OrgGroupCreateAttributes"; +import { OrgGroupCreateData } from "./OrgGroupCreateData"; +import { OrgGroupCreateRequest } from "./OrgGroupCreateRequest"; +import { OrgGroupData } from "./OrgGroupData"; +import { OrgGroupListResponse } from "./OrgGroupListResponse"; +import { OrgGroupMembershipAttributes } from "./OrgGroupMembershipAttributes"; +import { OrgGroupMembershipBulkUpdateAttributes } from "./OrgGroupMembershipBulkUpdateAttributes"; +import { OrgGroupMembershipBulkUpdateData } from "./OrgGroupMembershipBulkUpdateData"; +import { OrgGroupMembershipBulkUpdateRelationships } from "./OrgGroupMembershipBulkUpdateRelationships"; +import { OrgGroupMembershipBulkUpdateRequest } from "./OrgGroupMembershipBulkUpdateRequest"; +import { OrgGroupMembershipData } from "./OrgGroupMembershipData"; +import { OrgGroupMembershipListResponse } from "./OrgGroupMembershipListResponse"; +import { OrgGroupMembershipRelationshipData } from "./OrgGroupMembershipRelationshipData"; +import { OrgGroupMembershipRelationships } from "./OrgGroupMembershipRelationships"; +import { OrgGroupMembershipResponse } from "./OrgGroupMembershipResponse"; +import { OrgGroupMembershipUpdateData } from "./OrgGroupMembershipUpdateData"; +import { OrgGroupMembershipUpdateRelationships } from "./OrgGroupMembershipUpdateRelationships"; +import { OrgGroupMembershipUpdateRequest } from "./OrgGroupMembershipUpdateRequest"; +import { OrgGroupMembershipsRelationship } from "./OrgGroupMembershipsRelationship"; +import { OrgGroupPaginationMeta } from "./OrgGroupPaginationMeta"; +import { OrgGroupPaginationMetaPage } from "./OrgGroupPaginationMetaPage"; +import { OrgGroupPolicyAttributes } from "./OrgGroupPolicyAttributes"; +import { OrgGroupPolicyConfigAttributes } from "./OrgGroupPolicyConfigAttributes"; +import { OrgGroupPolicyConfigData } from "./OrgGroupPolicyConfigData"; +import { OrgGroupPolicyConfigListResponse } from "./OrgGroupPolicyConfigListResponse"; +import { OrgGroupPolicyCreateAttributes } from "./OrgGroupPolicyCreateAttributes"; +import { OrgGroupPolicyCreateData } from "./OrgGroupPolicyCreateData"; +import { OrgGroupPolicyCreateRelationships } from "./OrgGroupPolicyCreateRelationships"; +import { OrgGroupPolicyCreateRequest } from "./OrgGroupPolicyCreateRequest"; +import { OrgGroupPolicyData } from "./OrgGroupPolicyData"; +import { OrgGroupPolicyListResponse } from "./OrgGroupPolicyListResponse"; +import { OrgGroupPolicyOverrideAttributes } from "./OrgGroupPolicyOverrideAttributes"; +import { OrgGroupPolicyOverrideCreateAttributes } from "./OrgGroupPolicyOverrideCreateAttributes"; +import { OrgGroupPolicyOverrideCreateData } from "./OrgGroupPolicyOverrideCreateData"; +import { OrgGroupPolicyOverrideCreateRelationships } from "./OrgGroupPolicyOverrideCreateRelationships"; +import { OrgGroupPolicyOverrideCreateRequest } from "./OrgGroupPolicyOverrideCreateRequest"; +import { OrgGroupPolicyOverrideData } from "./OrgGroupPolicyOverrideData"; +import { OrgGroupPolicyOverrideListResponse } from "./OrgGroupPolicyOverrideListResponse"; +import { OrgGroupPolicyOverrideRelationships } from "./OrgGroupPolicyOverrideRelationships"; +import { OrgGroupPolicyOverrideResponse } from "./OrgGroupPolicyOverrideResponse"; +import { OrgGroupPolicyOverrideUpdateAttributes } from "./OrgGroupPolicyOverrideUpdateAttributes"; +import { OrgGroupPolicyOverrideUpdateData } from "./OrgGroupPolicyOverrideUpdateData"; +import { OrgGroupPolicyOverrideUpdateRequest } from "./OrgGroupPolicyOverrideUpdateRequest"; +import { OrgGroupPolicyRelationshipToOne } from "./OrgGroupPolicyRelationshipToOne"; +import { OrgGroupPolicyRelationshipToOneData } from "./OrgGroupPolicyRelationshipToOneData"; +import { OrgGroupPolicyRelationships } from "./OrgGroupPolicyRelationships"; +import { OrgGroupPolicyResponse } from "./OrgGroupPolicyResponse"; +import { OrgGroupPolicyUpdateAttributes } from "./OrgGroupPolicyUpdateAttributes"; +import { OrgGroupPolicyUpdateData } from "./OrgGroupPolicyUpdateData"; +import { OrgGroupPolicyUpdateRequest } from "./OrgGroupPolicyUpdateRequest"; +import { OrgGroupRelationshipToOne } from "./OrgGroupRelationshipToOne"; +import { OrgGroupRelationshipToOneData } from "./OrgGroupRelationshipToOneData"; +import { OrgGroupRelationships } from "./OrgGroupRelationships"; +import { OrgGroupResponse } from "./OrgGroupResponse"; +import { OrgGroupUpdateAttributes } from "./OrgGroupUpdateAttributes"; +import { OrgGroupUpdateData } from "./OrgGroupUpdateData"; +import { OrgGroupUpdateRequest } from "./OrgGroupUpdateRequest"; + +export const TypingInfo: ModelTypingInfo = { + enumsMap: { + OrgGroupIncludeOption: ["memberships"], + OrgGroupMembershipBulkUpdateType: ["org_group_membership_bulk_updates"], + OrgGroupMembershipSortOption: ["name", "-name", "uuid", "-uuid"], + OrgGroupMembershipType: ["org_group_memberships"], + OrgGroupPolicyConfigType: ["org_group_policy_configs"], + OrgGroupPolicyOverrideSortOption: ["id", "-id", "org_uuid", "-org_uuid"], + OrgGroupPolicyOverrideType: ["org_group_policy_overrides"], + OrgGroupPolicySortOption: ["id", "-id", "name", "-name"], + OrgGroupPolicyType: ["org_group_policies"], + OrgGroupSortOption: ["name", "-name", "uuid", "-uuid"], + OrgGroupType: ["org_groups"], + }, + oneOfMap: {}, + typeMap: { + APIErrorResponse: APIErrorResponse, + GlobalOrgIdentifier: GlobalOrgIdentifier, + JSONAPIErrorItem: JSONAPIErrorItem, + JSONAPIErrorItemSource: JSONAPIErrorItemSource, + JSONAPIErrorResponse: JSONAPIErrorResponse, + OrgGroupAttributes: OrgGroupAttributes, + OrgGroupCreateAttributes: OrgGroupCreateAttributes, + OrgGroupCreateData: OrgGroupCreateData, + OrgGroupCreateRequest: OrgGroupCreateRequest, + OrgGroupData: OrgGroupData, + OrgGroupListResponse: OrgGroupListResponse, + OrgGroupMembershipAttributes: OrgGroupMembershipAttributes, + OrgGroupMembershipBulkUpdateAttributes: + OrgGroupMembershipBulkUpdateAttributes, + OrgGroupMembershipBulkUpdateData: OrgGroupMembershipBulkUpdateData, + OrgGroupMembershipBulkUpdateRelationships: + OrgGroupMembershipBulkUpdateRelationships, + OrgGroupMembershipBulkUpdateRequest: OrgGroupMembershipBulkUpdateRequest, + OrgGroupMembershipData: OrgGroupMembershipData, + OrgGroupMembershipListResponse: OrgGroupMembershipListResponse, + OrgGroupMembershipRelationshipData: OrgGroupMembershipRelationshipData, + OrgGroupMembershipRelationships: OrgGroupMembershipRelationships, + OrgGroupMembershipResponse: OrgGroupMembershipResponse, + OrgGroupMembershipUpdateData: OrgGroupMembershipUpdateData, + OrgGroupMembershipUpdateRelationships: + OrgGroupMembershipUpdateRelationships, + OrgGroupMembershipUpdateRequest: OrgGroupMembershipUpdateRequest, + OrgGroupMembershipsRelationship: OrgGroupMembershipsRelationship, + OrgGroupPaginationMeta: OrgGroupPaginationMeta, + OrgGroupPaginationMetaPage: OrgGroupPaginationMetaPage, + OrgGroupPolicyAttributes: OrgGroupPolicyAttributes, + OrgGroupPolicyConfigAttributes: OrgGroupPolicyConfigAttributes, + OrgGroupPolicyConfigData: OrgGroupPolicyConfigData, + OrgGroupPolicyConfigListResponse: OrgGroupPolicyConfigListResponse, + OrgGroupPolicyCreateAttributes: OrgGroupPolicyCreateAttributes, + OrgGroupPolicyCreateData: OrgGroupPolicyCreateData, + OrgGroupPolicyCreateRelationships: OrgGroupPolicyCreateRelationships, + OrgGroupPolicyCreateRequest: OrgGroupPolicyCreateRequest, + OrgGroupPolicyData: OrgGroupPolicyData, + OrgGroupPolicyListResponse: OrgGroupPolicyListResponse, + OrgGroupPolicyOverrideAttributes: OrgGroupPolicyOverrideAttributes, + OrgGroupPolicyOverrideCreateAttributes: + OrgGroupPolicyOverrideCreateAttributes, + OrgGroupPolicyOverrideCreateData: OrgGroupPolicyOverrideCreateData, + OrgGroupPolicyOverrideCreateRelationships: + OrgGroupPolicyOverrideCreateRelationships, + OrgGroupPolicyOverrideCreateRequest: OrgGroupPolicyOverrideCreateRequest, + OrgGroupPolicyOverrideData: OrgGroupPolicyOverrideData, + OrgGroupPolicyOverrideListResponse: OrgGroupPolicyOverrideListResponse, + OrgGroupPolicyOverrideRelationships: OrgGroupPolicyOverrideRelationships, + OrgGroupPolicyOverrideResponse: OrgGroupPolicyOverrideResponse, + OrgGroupPolicyOverrideUpdateAttributes: + OrgGroupPolicyOverrideUpdateAttributes, + OrgGroupPolicyOverrideUpdateData: OrgGroupPolicyOverrideUpdateData, + OrgGroupPolicyOverrideUpdateRequest: OrgGroupPolicyOverrideUpdateRequest, + OrgGroupPolicyRelationshipToOne: OrgGroupPolicyRelationshipToOne, + OrgGroupPolicyRelationshipToOneData: OrgGroupPolicyRelationshipToOneData, + OrgGroupPolicyRelationships: OrgGroupPolicyRelationships, + OrgGroupPolicyResponse: OrgGroupPolicyResponse, + OrgGroupPolicyUpdateAttributes: OrgGroupPolicyUpdateAttributes, + OrgGroupPolicyUpdateData: OrgGroupPolicyUpdateData, + OrgGroupPolicyUpdateRequest: OrgGroupPolicyUpdateRequest, + OrgGroupRelationshipToOne: OrgGroupRelationshipToOne, + OrgGroupRelationshipToOneData: OrgGroupRelationshipToOneData, + OrgGroupRelationships: OrgGroupRelationships, + OrgGroupResponse: OrgGroupResponse, + OrgGroupUpdateAttributes: OrgGroupUpdateAttributes, + OrgGroupUpdateData: OrgGroupUpdateData, + OrgGroupUpdateRequest: OrgGroupUpdateRequest, + }, +}; diff --git a/services/org_groups/tsconfig.json b/services/org_groups/tsconfig.json new file mode 100644 index 000000000000..d6c32bfb893c --- /dev/null +++ b/services/org_groups/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + + "esModuleInterop": true, + "resolveJsonModule": true, + + "noImplicitAny": true, + "noImplicitThis": true, + + /* Additional Checks */ + "noUnusedLocals": false /* Report errors on unused locals. */, // TODO: reenable (unused imports!) + "noUnusedParameters": false /* Report errors on unused parameters. */, // TODO: set to true again + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + + "sourceMap": true, + "outDir": "./dist", + "lib": ["es6", "es7"] + }, + "exclude": ["dist", "node_modules", "tests"], + "include": ["src"] +} diff --git a/yarn.lock b/yarn.lock index 03cc475a332c..a730a8403514 100644 --- a/yarn.lock +++ b/yarn.lock @@ -946,6 +946,15 @@ __metadata: languageName: unknown linkType: soft +"@datadog/datadog-api-client-org-groups@workspace:services/org_groups": + version: 0.0.0-use.local + resolution: "@datadog/datadog-api-client-org-groups@workspace:services/org_groups" + dependencies: + "@datadog/datadog-api-client": "npm:^2.0.0-beta.2" + typescript: "npm:5.8.3" + languageName: unknown + linkType: soft + "@datadog/datadog-api-client-organizations@workspace:services/organizations": version: 0.0.0-use.local resolution: "@datadog/datadog-api-client-organizations@workspace:services/organizations"