diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index c1ace36c385d..c060a28bfc68 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -782,6 +782,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
@@ -913,6 +921,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
@@ -951,6 +1101,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
@@ -29684,6 +29842,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:
@@ -48399,851 +48573,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:
@@ -96544,410 +97610,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":
@@ -96960,25 +98605,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:
@@ -96988,23 +98634,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":
@@ -97012,17 +98650,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:
@@ -97031,14 +98669,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"
@@ -97054,256 +98724,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"
@@ -97311,34 +98940,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":
@@ -97351,36 +98991,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":
@@ -97393,41 +99042,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"
@@ -97443,42 +99099,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"
@@ -97488,42 +99255,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"
@@ -97538,742 +99332,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. 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: |-
@@ -115654,6 +117928,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/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb
new file mode 100644
index 000000000000..35672135b9a5
--- /dev/null
+++ b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb
@@ -0,0 +1,36 @@
+# Bulk update org group memberships returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.bulk_update_org_group_memberships".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateAttributes.new({
+ orgs: [
+ DatadogAPIClient::V2::GlobalOrgIdentifier.new({
+ org_site: "datadoghq.com",
+ org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901",
+ }),
+ ],
+ }),
+ relationships: DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateRelationships.new({
+ source_org_group: DatadogAPIClient::V2::OrgGroupRelationshipToOne.new({
+ data: DatadogAPIClient::V2::OrgGroupRelationshipToOneData.new({
+ id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+ }),
+ target_org_group: DatadogAPIClient::V2::OrgGroupRelationshipToOne.new({
+ data: DatadogAPIClient::V2::OrgGroupRelationshipToOneData.new({
+ id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+ }),
+ }),
+ type: DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateType::ORG_GROUP_MEMBERSHIP_BULK_UPDATES,
+ }),
+})
+p api_instance.bulk_update_org_group_memberships(body)
diff --git a/examples/v2/org-groups/CreateOrgGroup.rb b/examples/v2/org-groups/CreateOrgGroup.rb
new file mode 100644
index 000000000000..86804d4984c3
--- /dev/null
+++ b/examples/v2/org-groups/CreateOrgGroup.rb
@@ -0,0 +1,17 @@
+# Create an org group returns "Created" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.create_org_group".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupCreateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupCreateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupCreateAttributes.new({
+ name: "My Org Group",
+ }),
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+})
+p api_instance.create_org_group(body)
diff --git a/examples/v2/org-groups/CreateOrgGroupPolicy.rb b/examples/v2/org-groups/CreateOrgGroupPolicy.rb
new file mode 100644
index 000000000000..e4b2a2a9c671
--- /dev/null
+++ b/examples/v2/org-groups/CreateOrgGroupPolicy.rb
@@ -0,0 +1,28 @@
+# Create an org group policy returns "Created" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.create_org_group_policy".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupPolicyCreateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupPolicyCreateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupPolicyCreateAttributes.new({
+ content: {
+ "value": "UTC",
+ },
+ policy_name: "monitor_timezone",
+ }),
+ relationships: DatadogAPIClient::V2::OrgGroupPolicyCreateRelationships.new({
+ org_group: DatadogAPIClient::V2::OrgGroupRelationshipToOne.new({
+ data: DatadogAPIClient::V2::OrgGroupRelationshipToOneData.new({
+ id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+ }),
+ }),
+ type: DatadogAPIClient::V2::OrgGroupPolicyType::ORG_GROUP_POLICIES,
+ }),
+})
+p api_instance.create_org_group_policy(body)
diff --git a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb
new file mode 100644
index 000000000000..a3f0884dc637
--- /dev/null
+++ b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb
@@ -0,0 +1,32 @@
+# Create an org group policy override returns "Created" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.create_org_group_policy_override".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateAttributes.new({
+ org_site: "datadoghq.com",
+ org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901",
+ }),
+ relationships: DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateRelationships.new({
+ org_group: DatadogAPIClient::V2::OrgGroupRelationshipToOne.new({
+ data: DatadogAPIClient::V2::OrgGroupRelationshipToOneData.new({
+ id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+ }),
+ org_group_policy: DatadogAPIClient::V2::OrgGroupPolicyRelationshipToOne.new({
+ data: DatadogAPIClient::V2::OrgGroupPolicyRelationshipToOneData.new({
+ id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupPolicyType::ORG_GROUP_POLICIES,
+ }),
+ }),
+ }),
+ type: DatadogAPIClient::V2::OrgGroupPolicyOverrideType::ORG_GROUP_POLICY_OVERRIDES,
+ }),
+})
+p api_instance.create_org_group_policy_override(body)
diff --git a/examples/v2/org-groups/DeleteOrgGroup.rb b/examples/v2/org-groups/DeleteOrgGroup.rb
new file mode 100644
index 000000000000..a8172dc30977
--- /dev/null
+++ b/examples/v2/org-groups/DeleteOrgGroup.rb
@@ -0,0 +1,8 @@
+# Delete an org group returns "No Content" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.delete_org_group".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+api_instance.delete_org_group("a1b2c3d4-e5f6-7890-abcd-ef0123456789")
diff --git a/examples/v2/org-groups/DeleteOrgGroupPolicy.rb b/examples/v2/org-groups/DeleteOrgGroupPolicy.rb
new file mode 100644
index 000000000000..f04a60ea6cca
--- /dev/null
+++ b/examples/v2/org-groups/DeleteOrgGroupPolicy.rb
@@ -0,0 +1,8 @@
+# Delete an org group policy returns "No Content" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.delete_org_group_policy".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+api_instance.delete_org_group_policy("1a2b3c4d-5e6f-7890-abcd-ef0123456789")
diff --git a/examples/v2/org-groups/DeleteOrgGroupPolicyOverride.rb b/examples/v2/org-groups/DeleteOrgGroupPolicyOverride.rb
new file mode 100644
index 000000000000..bf353da68c55
--- /dev/null
+++ b/examples/v2/org-groups/DeleteOrgGroupPolicyOverride.rb
@@ -0,0 +1,8 @@
+# Delete an org group policy override returns "No Content" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.delete_org_group_policy_override".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+api_instance.delete_org_group_policy_override("9f8e7d6c-5b4a-3210-fedc-ba0987654321")
diff --git a/examples/v2/org-groups/GetOrgGroup.rb b/examples/v2/org-groups/GetOrgGroup.rb
new file mode 100644
index 000000000000..dc181c56b97c
--- /dev/null
+++ b/examples/v2/org-groups/GetOrgGroup.rb
@@ -0,0 +1,8 @@
+# Get an org group returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.get_org_group".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.get_org_group("a1b2c3d4-e5f6-7890-abcd-ef0123456789")
diff --git a/examples/v2/org-groups/GetOrgGroupMembership.rb b/examples/v2/org-groups/GetOrgGroupMembership.rb
new file mode 100644
index 000000000000..77ec54792f9e
--- /dev/null
+++ b/examples/v2/org-groups/GetOrgGroupMembership.rb
@@ -0,0 +1,8 @@
+# Get an org group membership returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.get_org_group_membership".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.get_org_group_membership("f1e2d3c4-b5a6-7890-1234-567890abcdef")
diff --git a/examples/v2/org-groups/ListOrgGroupMemberships.rb b/examples/v2/org-groups/ListOrgGroupMemberships.rb
new file mode 100644
index 000000000000..d12ad5330c22
--- /dev/null
+++ b/examples/v2/org-groups/ListOrgGroupMemberships.rb
@@ -0,0 +1,8 @@
+# List org group memberships returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.list_org_group_memberships".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.list_org_group_memberships()
diff --git a/examples/v2/org-groups/ListOrgGroupPolicies.rb b/examples/v2/org-groups/ListOrgGroupPolicies.rb
new file mode 100644
index 000000000000..e2f8d33fa3b1
--- /dev/null
+++ b/examples/v2/org-groups/ListOrgGroupPolicies.rb
@@ -0,0 +1,8 @@
+# List org group policies returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.list_org_group_policies".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.list_org_group_policies("a1b2c3d4-e5f6-7890-abcd-ef0123456789")
diff --git a/examples/v2/org-groups/ListOrgGroupPolicyConfigs.rb b/examples/v2/org-groups/ListOrgGroupPolicyConfigs.rb
new file mode 100644
index 000000000000..d966bd2833f1
--- /dev/null
+++ b/examples/v2/org-groups/ListOrgGroupPolicyConfigs.rb
@@ -0,0 +1,8 @@
+# List org group policy configs returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.list_org_group_policy_configs".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.list_org_group_policy_configs()
diff --git a/examples/v2/org-groups/ListOrgGroupPolicyOverrides.rb b/examples/v2/org-groups/ListOrgGroupPolicyOverrides.rb
new file mode 100644
index 000000000000..9172cf413483
--- /dev/null
+++ b/examples/v2/org-groups/ListOrgGroupPolicyOverrides.rb
@@ -0,0 +1,8 @@
+# List org group policy overrides returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.list_org_group_policy_overrides".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.list_org_group_policy_overrides("a1b2c3d4-e5f6-7890-abcd-ef0123456789")
diff --git a/examples/v2/org-groups/ListOrgGroups.rb b/examples/v2/org-groups/ListOrgGroups.rb
new file mode 100644
index 000000000000..3cdf3632f505
--- /dev/null
+++ b/examples/v2/org-groups/ListOrgGroups.rb
@@ -0,0 +1,8 @@
+# List org groups returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.list_org_groups".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+p api_instance.list_org_groups()
diff --git a/examples/v2/org-groups/UpdateOrgGroup.rb b/examples/v2/org-groups/UpdateOrgGroup.rb
new file mode 100644
index 000000000000..cc6b02490957
--- /dev/null
+++ b/examples/v2/org-groups/UpdateOrgGroup.rb
@@ -0,0 +1,18 @@
+# Update an org group returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.update_org_group".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupUpdateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupUpdateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupUpdateAttributes.new({
+ name: "Updated Org Group Name",
+ }),
+ id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+})
+p api_instance.update_org_group("a1b2c3d4-e5f6-7890-abcd-ef0123456789", body)
diff --git a/examples/v2/org-groups/UpdateOrgGroupMembership.rb b/examples/v2/org-groups/UpdateOrgGroupMembership.rb
new file mode 100644
index 000000000000..2d7b019d0203
--- /dev/null
+++ b/examples/v2/org-groups/UpdateOrgGroupMembership.rb
@@ -0,0 +1,23 @@
+# Update an org group membership returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.update_org_group_membership".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupMembershipUpdateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupMembershipUpdateData.new({
+ id: "f1e2d3c4-b5a6-7890-1234-567890abcdef",
+ relationships: DatadogAPIClient::V2::OrgGroupMembershipUpdateRelationships.new({
+ org_group: DatadogAPIClient::V2::OrgGroupRelationshipToOne.new({
+ data: DatadogAPIClient::V2::OrgGroupRelationshipToOneData.new({
+ id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupType::ORG_GROUPS,
+ }),
+ }),
+ }),
+ type: DatadogAPIClient::V2::OrgGroupMembershipType::ORG_GROUP_MEMBERSHIPS,
+ }),
+})
+p api_instance.update_org_group_membership("f1e2d3c4-b5a6-7890-1234-567890abcdef", body)
diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicy.rb b/examples/v2/org-groups/UpdateOrgGroupPolicy.rb
new file mode 100644
index 000000000000..8e4940120833
--- /dev/null
+++ b/examples/v2/org-groups/UpdateOrgGroupPolicy.rb
@@ -0,0 +1,20 @@
+# Update an org group policy returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.update_org_group_policy".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupPolicyUpdateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupPolicyUpdateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupPolicyUpdateAttributes.new({
+ content: {
+ "value": "UTC",
+ },
+ }),
+ id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789",
+ type: DatadogAPIClient::V2::OrgGroupPolicyType::ORG_GROUP_POLICIES,
+ }),
+})
+p api_instance.update_org_group_policy("1a2b3c4d-5e6f-7890-abcd-ef0123456789", body)
diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb
new file mode 100644
index 000000000000..08feccf9e7f1
--- /dev/null
+++ b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb
@@ -0,0 +1,19 @@
+# Update an org group policy override returns "OK" response
+
+require "datadog_api_client"
+DatadogAPIClient.configure do |config|
+ config.unstable_operations["v2.update_org_group_policy_override".to_sym] = true
+end
+api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
+
+body = DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateRequest.new({
+ data: DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateData.new({
+ attributes: DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateAttributes.new({
+ org_site: "datadoghq.com",
+ org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901",
+ }),
+ id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321",
+ type: DatadogAPIClient::V2::OrgGroupPolicyOverrideType::ORG_GROUP_POLICY_OVERRIDES,
+ }),
+})
+p api_instance.update_org_group_policy_override("9f8e7d6c-5b4a-3210-fedc-ba0987654321", body)
diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb
index 1862deb447bf..80c141b37825 100644
--- a/features/scenarios_model_mapping.rb
+++ b/features/scenarios_model_mapping.rb
@@ -3253,6 +3253,76 @@
"connection_id" => "UUID",
"body" => "OrgConnectionUpdateRequest",
},
+ "v2.ListOrgGroupMemberships" => {
+ "filter_org_group_id" => "UUID",
+ "filter_org_uuid" => "UUID",
+ "page_number" => "Integer",
+ "page_size" => "Integer",
+ "sort" => "OrgGroupMembershipSortOption",
+ },
+ "v2.BulkUpdateOrgGroupMemberships" => {
+ "body" => "OrgGroupMembershipBulkUpdateRequest",
+ },
+ "v2.GetOrgGroupMembership" => {
+ "org_group_membership_id" => "UUID",
+ },
+ "v2.UpdateOrgGroupMembership" => {
+ "org_group_membership_id" => "UUID",
+ "body" => "OrgGroupMembershipUpdateRequest",
+ },
+ "v2.ListOrgGroupPolicies" => {
+ "filter_org_group_id" => "UUID",
+ "filter_policy_name" => "String",
+ "page_number" => "Integer",
+ "page_size" => "Integer",
+ "sort" => "OrgGroupPolicySortOption",
+ },
+ "v2.CreateOrgGroupPolicy" => {
+ "body" => "OrgGroupPolicyCreateRequest",
+ },
+ "v2.DeleteOrgGroupPolicy" => {
+ "org_group_policy_id" => "UUID",
+ },
+ "v2.UpdateOrgGroupPolicy" => {
+ "org_group_policy_id" => "UUID",
+ "body" => "OrgGroupPolicyUpdateRequest",
+ },
+ "v2.ListOrgGroupPolicyOverrides" => {
+ "filter_org_group_id" => "UUID",
+ "filter_policy_id" => "UUID",
+ "page_number" => "Integer",
+ "page_size" => "Integer",
+ "sort" => "OrgGroupPolicyOverrideSortOption",
+ },
+ "v2.CreateOrgGroupPolicyOverride" => {
+ "body" => "OrgGroupPolicyOverrideCreateRequest",
+ },
+ "v2.DeleteOrgGroupPolicyOverride" => {
+ "org_group_policy_override_id" => "UUID",
+ },
+ "v2.UpdateOrgGroupPolicyOverride" => {
+ "org_group_policy_override_id" => "UUID",
+ "body" => "OrgGroupPolicyOverrideUpdateRequest",
+ },
+ "v2.ListOrgGroups" => {
+ "page_number" => "Integer",
+ "page_size" => "Integer",
+ "sort" => "OrgGroupSortOption",
+ "include" => "Array",
+ },
+ "v2.CreateOrgGroup" => {
+ "body" => "OrgGroupCreateRequest",
+ },
+ "v2.DeleteOrgGroup" => {
+ "org_group_id" => "UUID",
+ },
+ "v2.GetOrgGroup" => {
+ "org_group_id" => "UUID",
+ },
+ "v2.UpdateOrgGroup" => {
+ "org_group_id" => "UUID",
+ "body" => "OrgGroupUpdateRequest",
+ },
"v2.ListRoles" => {
"page_size" => "Integer",
"page_number" => "Integer",
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 124d2e60cb49..6b6666aabd0d 100644
--- a/features/v2/undo.json
+++ b/features/v2/undo.json
@@ -4000,6 +4000,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/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb
index ad5680e94fe5..f2c891618cbd 100644
--- a/lib/datadog_api_client/configuration.rb
+++ b/lib/datadog_api_client/configuration.rb
@@ -377,6 +377,24 @@ def initialize
"v2.update_monitor_user_template": false,
"v2.validate_existing_monitor_user_template": false,
"v2.validate_monitor_user_template": false,
+ "v2.bulk_update_org_group_memberships": false,
+ "v2.create_org_group": false,
+ "v2.create_org_group_policy": false,
+ "v2.create_org_group_policy_override": false,
+ "v2.delete_org_group": false,
+ "v2.delete_org_group_policy": false,
+ "v2.delete_org_group_policy_override": false,
+ "v2.get_org_group": false,
+ "v2.get_org_group_membership": false,
+ "v2.list_org_group_memberships": false,
+ "v2.list_org_group_policies": false,
+ "v2.list_org_group_policy_configs": false,
+ "v2.list_org_group_policy_overrides": false,
+ "v2.list_org_groups": false,
+ "v2.update_org_group": false,
+ "v2.update_org_group_membership": false,
+ "v2.update_org_group_policy": false,
+ "v2.update_org_group_policy_override": false,
"v2.list_role_templates": false,
"v2.create_connection": false,
"v2.delete_connection": false,
diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb
index 8644837286c8..c845b7d5073b 100644
--- a/lib/datadog_api_client/inflector.rb
+++ b/lib/datadog_api_client/inflector.rb
@@ -2836,6 +2836,7 @@ def overrides
"v2.global_incident_settings_request" => "GlobalIncidentSettingsRequest",
"v2.global_incident_settings_response" => "GlobalIncidentSettingsResponse",
"v2.global_incident_settings_type" => "GlobalIncidentSettingsType",
+ "v2.global_org_identifier" => "GlobalOrgIdentifier",
"v2.global_variable_data" => "GlobalVariableData",
"v2.global_variable_json_patch_request" => "GlobalVariableJsonPatchRequest",
"v2.global_variable_json_patch_request_data" => "GlobalVariableJsonPatchRequestData",
@@ -4102,6 +4103,75 @@ def overrides
"v2.org_connection_user_relationship" => "OrgConnectionUserRelationship",
"v2.org_connection_user_relationship_data" => "OrgConnectionUserRelationshipData",
"v2.org_connection_user_relationship_data_type" => "OrgConnectionUserRelationshipDataType",
+ "v2.org_group_attributes" => "OrgGroupAttributes",
+ "v2.org_group_create_attributes" => "OrgGroupCreateAttributes",
+ "v2.org_group_create_data" => "OrgGroupCreateData",
+ "v2.org_group_create_request" => "OrgGroupCreateRequest",
+ "v2.org_group_data" => "OrgGroupData",
+ "v2.org_group_include_option" => "OrgGroupIncludeOption",
+ "v2.org_group_list_response" => "OrgGroupListResponse",
+ "v2.org_group_membership_attributes" => "OrgGroupMembershipAttributes",
+ "v2.org_group_membership_bulk_update_attributes" => "OrgGroupMembershipBulkUpdateAttributes",
+ "v2.org_group_membership_bulk_update_data" => "OrgGroupMembershipBulkUpdateData",
+ "v2.org_group_membership_bulk_update_relationships" => "OrgGroupMembershipBulkUpdateRelationships",
+ "v2.org_group_membership_bulk_update_request" => "OrgGroupMembershipBulkUpdateRequest",
+ "v2.org_group_membership_bulk_update_type" => "OrgGroupMembershipBulkUpdateType",
+ "v2.org_group_membership_data" => "OrgGroupMembershipData",
+ "v2.org_group_membership_list_response" => "OrgGroupMembershipListResponse",
+ "v2.org_group_membership_relationship_data" => "OrgGroupMembershipRelationshipData",
+ "v2.org_group_membership_relationships" => "OrgGroupMembershipRelationships",
+ "v2.org_group_membership_response" => "OrgGroupMembershipResponse",
+ "v2.org_group_membership_sort_option" => "OrgGroupMembershipSortOption",
+ "v2.org_group_memberships_relationship" => "OrgGroupMembershipsRelationship",
+ "v2.org_group_membership_type" => "OrgGroupMembershipType",
+ "v2.org_group_membership_update_data" => "OrgGroupMembershipUpdateData",
+ "v2.org_group_membership_update_relationships" => "OrgGroupMembershipUpdateRelationships",
+ "v2.org_group_membership_update_request" => "OrgGroupMembershipUpdateRequest",
+ "v2.org_group_pagination_meta" => "OrgGroupPaginationMeta",
+ "v2.org_group_pagination_meta_page" => "OrgGroupPaginationMetaPage",
+ "v2.org_group_policy_attributes" => "OrgGroupPolicyAttributes",
+ "v2.org_group_policy_config_attributes" => "OrgGroupPolicyConfigAttributes",
+ "v2.org_group_policy_config_data" => "OrgGroupPolicyConfigData",
+ "v2.org_group_policy_config_list_response" => "OrgGroupPolicyConfigListResponse",
+ "v2.org_group_policy_config_type" => "OrgGroupPolicyConfigType",
+ "v2.org_group_policy_create_attributes" => "OrgGroupPolicyCreateAttributes",
+ "v2.org_group_policy_create_data" => "OrgGroupPolicyCreateData",
+ "v2.org_group_policy_create_relationships" => "OrgGroupPolicyCreateRelationships",
+ "v2.org_group_policy_create_request" => "OrgGroupPolicyCreateRequest",
+ "v2.org_group_policy_data" => "OrgGroupPolicyData",
+ "v2.org_group_policy_list_response" => "OrgGroupPolicyListResponse",
+ "v2.org_group_policy_override_attributes" => "OrgGroupPolicyOverrideAttributes",
+ "v2.org_group_policy_override_create_attributes" => "OrgGroupPolicyOverrideCreateAttributes",
+ "v2.org_group_policy_override_create_data" => "OrgGroupPolicyOverrideCreateData",
+ "v2.org_group_policy_override_create_relationships" => "OrgGroupPolicyOverrideCreateRelationships",
+ "v2.org_group_policy_override_create_request" => "OrgGroupPolicyOverrideCreateRequest",
+ "v2.org_group_policy_override_data" => "OrgGroupPolicyOverrideData",
+ "v2.org_group_policy_override_list_response" => "OrgGroupPolicyOverrideListResponse",
+ "v2.org_group_policy_override_relationships" => "OrgGroupPolicyOverrideRelationships",
+ "v2.org_group_policy_override_response" => "OrgGroupPolicyOverrideResponse",
+ "v2.org_group_policy_override_sort_option" => "OrgGroupPolicyOverrideSortOption",
+ "v2.org_group_policy_override_type" => "OrgGroupPolicyOverrideType",
+ "v2.org_group_policy_override_update_attributes" => "OrgGroupPolicyOverrideUpdateAttributes",
+ "v2.org_group_policy_override_update_data" => "OrgGroupPolicyOverrideUpdateData",
+ "v2.org_group_policy_override_update_request" => "OrgGroupPolicyOverrideUpdateRequest",
+ "v2.org_group_policy_relationships" => "OrgGroupPolicyRelationships",
+ "v2.org_group_policy_relationship_to_one" => "OrgGroupPolicyRelationshipToOne",
+ "v2.org_group_policy_relationship_to_one_data" => "OrgGroupPolicyRelationshipToOneData",
+ "v2.org_group_policy_response" => "OrgGroupPolicyResponse",
+ "v2.org_group_policy_sort_option" => "OrgGroupPolicySortOption",
+ "v2.org_group_policy_type" => "OrgGroupPolicyType",
+ "v2.org_group_policy_update_attributes" => "OrgGroupPolicyUpdateAttributes",
+ "v2.org_group_policy_update_data" => "OrgGroupPolicyUpdateData",
+ "v2.org_group_policy_update_request" => "OrgGroupPolicyUpdateRequest",
+ "v2.org_group_relationships" => "OrgGroupRelationships",
+ "v2.org_group_relationship_to_one" => "OrgGroupRelationshipToOne",
+ "v2.org_group_relationship_to_one_data" => "OrgGroupRelationshipToOneData",
+ "v2.org_group_response" => "OrgGroupResponse",
+ "v2.org_group_sort_option" => "OrgGroupSortOption",
+ "v2.org_group_type" => "OrgGroupType",
+ "v2.org_group_update_attributes" => "OrgGroupUpdateAttributes",
+ "v2.org_group_update_data" => "OrgGroupUpdateData",
+ "v2.org_group_update_request" => "OrgGroupUpdateRequest",
"v2.outbound_edge" => "OutboundEdge",
"v2.outcomes_batch_attributes" => "OutcomesBatchAttributes",
"v2.outcomes_batch_request" => "OutcomesBatchRequest",
@@ -5927,6 +5997,7 @@ def overrides
"v2.on_call_paging_api" => "OnCallPagingAPI",
"v2.opsgenie_integration_api" => "OpsgenieIntegrationAPI",
"v2.org_connections_api" => "OrgConnectionsAPI",
+ "v2.org_groups_api" => "OrgGroupsAPI",
"v2.organizations_api" => "OrganizationsAPI",
"v2.powerpack_api" => "PowerpackAPI",
"v2.processes_api" => "ProcessesAPI",
diff --git a/lib/datadog_api_client/v2/api/org_groups_api.rb b/lib/datadog_api_client/v2/api/org_groups_api.rb
new file mode 100644
index 000000000000..4c64688cabcb
--- /dev/null
+++ b/lib/datadog_api_client/v2/api/org_groups_api.rb
@@ -0,0 +1,1413 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'cgi'
+
+module DatadogAPIClient::V2
+ class OrgGroupsAPI
+ attr_accessor :api_client
+
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
+ @api_client = api_client
+ end
+
+ # Bulk update org group memberships.
+ #
+ # @see #bulk_update_org_group_memberships_with_http_info
+ def bulk_update_org_group_memberships(body, opts = {})
+ data, _status_code, _headers = bulk_update_org_group_memberships_with_http_info(body, opts)
+ data
+ end
+
+ # Bulk update org group memberships.
+ #
+ # Move a batch of organizations from one org group to another. This is an atomic operation. Maximum 100 orgs per request.
+ #
+ # @param body [OrgGroupMembershipBulkUpdateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupMembershipListResponse, Integer, Hash)>] OrgGroupMembershipListResponse data, response status code and response headers
+ def bulk_update_org_group_memberships_with_http_info(body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.bulk_update_org_group_memberships".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.bulk_update_org_group_memberships")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.bulk_update_org_group_memberships"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.bulk_update_org_group_memberships ...'
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.bulk_update_org_group_memberships"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_memberships/bulk'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupMembershipListResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :bulk_update_org_group_memberships,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#bulk_update_org_group_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create an org group.
+ #
+ # @see #create_org_group_with_http_info
+ def create_org_group(body, opts = {})
+ data, _status_code, _headers = create_org_group_with_http_info(body, opts)
+ data
+ end
+
+ # Create an org group.
+ #
+ # Create a new organization group.
+ #
+ # @param body [OrgGroupCreateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupResponse, Integer, Hash)>] OrgGroupResponse data, response status code and response headers
+ def create_org_group_with_http_info(body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_org_group".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_org_group")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_org_group"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.create_org_group ...'
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.create_org_group"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_groups'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :create_org_group,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#create_org_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create an org group policy.
+ #
+ # @see #create_org_group_policy_with_http_info
+ def create_org_group_policy(body, opts = {})
+ data, _status_code, _headers = create_org_group_policy_with_http_info(body, opts)
+ data
+ end
+
+ # Create an org group policy.
+ #
+ # Create a new policy for an organization group.
+ #
+ # @param body [OrgGroupPolicyCreateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupPolicyResponse, Integer, Hash)>] OrgGroupPolicyResponse data, response status code and response headers
+ def create_org_group_policy_with_http_info(body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_org_group_policy".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_org_group_policy")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_org_group_policy"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.create_org_group_policy ...'
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.create_org_group_policy"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policies'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :create_org_group_policy,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#create_org_group_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create an org group policy override.
+ #
+ # @see #create_org_group_policy_override_with_http_info
+ def create_org_group_policy_override(body, opts = {})
+ data, _status_code, _headers = create_org_group_policy_override_with_http_info(body, opts)
+ data
+ end
+
+ # Create an org group policy override.
+ #
+ # Create a new policy override for an organization within an org group.
+ #
+ # @param body [OrgGroupPolicyOverrideCreateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupPolicyOverrideResponse, Integer, Hash)>] OrgGroupPolicyOverrideResponse data, response status code and response headers
+ def create_org_group_policy_override_with_http_info(body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_org_group_policy_override".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_org_group_policy_override")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_org_group_policy_override"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.create_org_group_policy_override ...'
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.create_org_group_policy_override"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policy_overrides'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyOverrideResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :create_org_group_policy_override,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#create_org_group_policy_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete an org group.
+ #
+ # @see #delete_org_group_with_http_info
+ def delete_org_group(org_group_id, opts = {})
+ delete_org_group_with_http_info(org_group_id, opts)
+ nil
+ end
+
+ # Delete an org group.
+ #
+ # Delete an organization group by its ID.
+ #
+ # @param org_group_id [UUID] The ID of the org group.
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def delete_org_group_with_http_info(org_group_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.delete_org_group".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_org_group")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_org_group"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.delete_org_group ...'
+ end
+ # verify the required parameter 'org_group_id' is set
+ if @api_client.config.client_side_validation && org_group_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_id' when calling OrgGroupsAPI.delete_org_group"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_groups/{org_group_id}'.sub('{org_group_id}', CGI.escape(org_group_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :delete_org_group,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#delete_org_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete an org group policy.
+ #
+ # @see #delete_org_group_policy_with_http_info
+ def delete_org_group_policy(org_group_policy_id, opts = {})
+ delete_org_group_policy_with_http_info(org_group_policy_id, opts)
+ nil
+ end
+
+ # Delete an org group policy.
+ #
+ # Delete an organization group policy by its ID.
+ #
+ # @param org_group_policy_id [UUID] The ID of the org group policy.
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def delete_org_group_policy_with_http_info(org_group_policy_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.delete_org_group_policy".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_org_group_policy")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_org_group_policy"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.delete_org_group_policy ...'
+ end
+ # verify the required parameter 'org_group_policy_id' is set
+ if @api_client.config.client_side_validation && org_group_policy_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_policy_id' when calling OrgGroupsAPI.delete_org_group_policy"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policies/{org_group_policy_id}'.sub('{org_group_policy_id}', CGI.escape(org_group_policy_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :delete_org_group_policy,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#delete_org_group_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete an org group policy override.
+ #
+ # @see #delete_org_group_policy_override_with_http_info
+ def delete_org_group_policy_override(org_group_policy_override_id, opts = {})
+ delete_org_group_policy_override_with_http_info(org_group_policy_override_id, opts)
+ nil
+ end
+
+ # Delete an org group policy override.
+ #
+ # Delete an organization group policy override by its ID.
+ #
+ # @param org_group_policy_override_id [UUID] The ID of the org group policy override.
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def delete_org_group_policy_override_with_http_info(org_group_policy_override_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.delete_org_group_policy_override".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_org_group_policy_override")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_org_group_policy_override"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.delete_org_group_policy_override ...'
+ end
+ # verify the required parameter 'org_group_policy_override_id' is set
+ if @api_client.config.client_side_validation && org_group_policy_override_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_policy_override_id' when calling OrgGroupsAPI.delete_org_group_policy_override"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policy_overrides/{org_group_policy_override_id}'.sub('{org_group_policy_override_id}', CGI.escape(org_group_policy_override_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :delete_org_group_policy_override,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#delete_org_group_policy_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get an org group.
+ #
+ # @see #get_org_group_with_http_info
+ def get_org_group(org_group_id, opts = {})
+ data, _status_code, _headers = get_org_group_with_http_info(org_group_id, opts)
+ data
+ end
+
+ # Get an org group.
+ #
+ # Get a specific organization group by its ID.
+ #
+ # @param org_group_id [UUID] The ID of the org group.
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupResponse, Integer, Hash)>] OrgGroupResponse data, response status code and response headers
+ def get_org_group_with_http_info(org_group_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.get_org_group".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_org_group")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_org_group"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.get_org_group ...'
+ end
+ # verify the required parameter 'org_group_id' is set
+ if @api_client.config.client_side_validation && org_group_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_id' when calling OrgGroupsAPI.get_org_group"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_groups/{org_group_id}'.sub('{org_group_id}', CGI.escape(org_group_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :get_org_group,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#get_org_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get an org group membership.
+ #
+ # @see #get_org_group_membership_with_http_info
+ def get_org_group_membership(org_group_membership_id, opts = {})
+ data, _status_code, _headers = get_org_group_membership_with_http_info(org_group_membership_id, opts)
+ data
+ end
+
+ # Get an org group membership.
+ #
+ # Get a specific organization group membership by its ID.
+ #
+ # @param org_group_membership_id [UUID] The ID of the org group membership.
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupMembershipResponse, Integer, Hash)>] OrgGroupMembershipResponse data, response status code and response headers
+ def get_org_group_membership_with_http_info(org_group_membership_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.get_org_group_membership".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_org_group_membership")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_org_group_membership"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.get_org_group_membership ...'
+ end
+ # verify the required parameter 'org_group_membership_id' is set
+ if @api_client.config.client_side_validation && org_group_membership_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_membership_id' when calling OrgGroupsAPI.get_org_group_membership"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_memberships/{org_group_membership_id}'.sub('{org_group_membership_id}', CGI.escape(org_group_membership_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupMembershipResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :get_org_group_membership,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#get_org_group_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List org group memberships.
+ #
+ # @see #list_org_group_memberships_with_http_info
+ def list_org_group_memberships(opts = {})
+ data, _status_code, _headers = list_org_group_memberships_with_http_info(opts)
+ data
+ end
+
+ # List org group memberships.
+ #
+ # List organization group memberships. Filter by org group ID or org UUID. When filtering by org UUID, returns a single-item list with the membership for that org.
+ #
+ # @param opts [Hash] the optional parameters
+ # @option opts [UUID] :filter_org_group_id Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided.
+ # @option opts [UUID] :filter_org_uuid Filter memberships by org UUID. Returns a single-item list.
+ # @option opts [Integer] :page_number The page number to return.
+ # @option opts [Integer] :page_size The number of items per page. Maximum is 1000.
+ # @option opts [OrgGroupMembershipSortOption] :sort Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.
+ # @return [Array<(OrgGroupMembershipListResponse, Integer, Hash)>] OrgGroupMembershipListResponse data, response status code and response headers
+ def list_org_group_memberships_with_http_info(opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_org_group_memberships".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_org_group_memberships")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_org_group_memberships"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.list_org_group_memberships ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0
+ fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling OrgGroupsAPI.list_org_group_memberships, must be greater than or equal to 0.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_group_memberships, must be smaller than or equal to 1000.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_group_memberships, must be greater than or equal to 1.'
+ end
+ allowable_values = ['name', '-name', 'uuid', '-uuid']
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_memberships'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'filter[org_group_id]'] = opts[:'filter_org_group_id'] if !opts[:'filter_org_group_id'].nil?
+ query_params[:'filter[org_uuid]'] = opts[:'filter_org_uuid'] if !opts[:'filter_org_uuid'].nil?
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupMembershipListResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :list_org_group_memberships,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#list_org_group_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List org group policies.
+ #
+ # @see #list_org_group_policies_with_http_info
+ def list_org_group_policies(filter_org_group_id, opts = {})
+ data, _status_code, _headers = list_org_group_policies_with_http_info(filter_org_group_id, opts)
+ data
+ end
+
+ # List org group policies.
+ #
+ # List policies for an organization group. Requires a filter on org group ID.
+ #
+ # @param filter_org_group_id [UUID] Filter policies by org group ID.
+ # @param opts [Hash] the optional parameters
+ # @option opts [String] :filter_policy_name Filter policies by policy name.
+ # @option opts [Integer] :page_number The page number to return.
+ # @option opts [Integer] :page_size The number of items per page. Maximum is 1000.
+ # @option opts [OrgGroupPolicySortOption] :sort Field to sort policies by. Supported values: `id`, `name`, `-id`, `-name`. Defaults to `id`.
+ # @return [Array<(OrgGroupPolicyListResponse, Integer, Hash)>] OrgGroupPolicyListResponse data, response status code and response headers
+ def list_org_group_policies_with_http_info(filter_org_group_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_org_group_policies".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_org_group_policies")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_org_group_policies"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.list_org_group_policies ...'
+ end
+ # verify the required parameter 'filter_org_group_id' is set
+ if @api_client.config.client_side_validation && filter_org_group_id.nil?
+ fail ArgumentError, "Missing the required parameter 'filter_org_group_id' when calling OrgGroupsAPI.list_org_group_policies"
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0
+ fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling OrgGroupsAPI.list_org_group_policies, must be greater than or equal to 0.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_group_policies, must be smaller than or equal to 1000.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_group_policies, must be greater than or equal to 1.'
+ end
+ allowable_values = ['id', '-id', 'name', '-name']
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policies'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'filter[org_group_id]'] = filter_org_group_id
+ query_params[:'filter[policy_name]'] = opts[:'filter_policy_name'] if !opts[:'filter_policy_name'].nil?
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyListResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :list_org_group_policies,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#list_org_group_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List org group policy configs.
+ #
+ # @see #list_org_group_policy_configs_with_http_info
+ def list_org_group_policy_configs(opts = {})
+ data, _status_code, _headers = list_org_group_policy_configs_with_http_info(opts)
+ data
+ end
+
+ # List org group policy configs.
+ #
+ # List all org configs that are eligible to be used as organization group policies.
+ #
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupPolicyConfigListResponse, Integer, Hash)>] OrgGroupPolicyConfigListResponse data, response status code and response headers
+ def list_org_group_policy_configs_with_http_info(opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_org_group_policy_configs".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_org_group_policy_configs")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_org_group_policy_configs"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.list_org_group_policy_configs ...'
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policy_configs'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyConfigListResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :list_org_group_policy_configs,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#list_org_group_policy_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List org group policy overrides.
+ #
+ # @see #list_org_group_policy_overrides_with_http_info
+ def list_org_group_policy_overrides(filter_org_group_id, opts = {})
+ data, _status_code, _headers = list_org_group_policy_overrides_with_http_info(filter_org_group_id, opts)
+ data
+ end
+
+ # List org group policy overrides.
+ #
+ # List policy overrides for an organization group. Requires a filter on org group ID. Optionally filter by policy ID.
+ #
+ # @param filter_org_group_id [UUID] Filter policy overrides by org group ID.
+ # @param opts [Hash] the optional parameters
+ # @option opts [UUID] :filter_policy_id Filter policy overrides by policy ID.
+ # @option opts [Integer] :page_number The page number to return.
+ # @option opts [Integer] :page_size The number of items per page. Maximum is 1000.
+ # @option opts [OrgGroupPolicyOverrideSortOption] :sort Field to sort overrides by. Supported values: `id`, `org_uuid`, `-id`, `-org_uuid`. Defaults to `id`.
+ # @return [Array<(OrgGroupPolicyOverrideListResponse, Integer, Hash)>] OrgGroupPolicyOverrideListResponse data, response status code and response headers
+ def list_org_group_policy_overrides_with_http_info(filter_org_group_id, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_org_group_policy_overrides".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_org_group_policy_overrides")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_org_group_policy_overrides"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.list_org_group_policy_overrides ...'
+ end
+ # verify the required parameter 'filter_org_group_id' is set
+ if @api_client.config.client_side_validation && filter_org_group_id.nil?
+ fail ArgumentError, "Missing the required parameter 'filter_org_group_id' when calling OrgGroupsAPI.list_org_group_policy_overrides"
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0
+ fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling OrgGroupsAPI.list_org_group_policy_overrides, must be greater than or equal to 0.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_group_policy_overrides, must be smaller than or equal to 1000.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_group_policy_overrides, must be greater than or equal to 1.'
+ end
+ allowable_values = ['id', '-id', 'org_uuid', '-org_uuid']
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policy_overrides'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'filter[org_group_id]'] = filter_org_group_id
+ query_params[:'filter[policy_id]'] = opts[:'filter_policy_id'] if !opts[:'filter_policy_id'].nil?
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyOverrideListResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :list_org_group_policy_overrides,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#list_org_group_policy_overrides\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List org groups.
+ #
+ # @see #list_org_groups_with_http_info
+ def list_org_groups(opts = {})
+ data, _status_code, _headers = list_org_groups_with_http_info(opts)
+ data
+ end
+
+ # List org groups.
+ #
+ # List all organization groups that the requesting organization has access to.
+ #
+ # @param opts [Hash] the optional parameters
+ # @option opts [Integer] :page_number The page number to return.
+ # @option opts [Integer] :page_size The number of items per page. Maximum is 1000.
+ # @option opts [OrgGroupSortOption] :sort Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.
+ # @option opts [Array] :include List of related resources to include.
+ # @return [Array<(OrgGroupListResponse, Integer, Hash)>] OrgGroupListResponse data, response status code and response headers
+ def list_org_groups_with_http_info(opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_org_groups".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_org_groups")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_org_groups"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.list_org_groups ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0
+ fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling OrgGroupsAPI.list_org_groups, must be greater than or equal to 0.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_groups, must be smaller than or equal to 1000.'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OrgGroupsAPI.list_org_groups, must be greater than or equal to 1.'
+ end
+ allowable_values = ['name', '-name', 'uuid', '-uuid']
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_groups'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupListResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :list_org_groups,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#list_org_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update an org group.
+ #
+ # @see #update_org_group_with_http_info
+ def update_org_group(org_group_id, body, opts = {})
+ data, _status_code, _headers = update_org_group_with_http_info(org_group_id, body, opts)
+ data
+ end
+
+ # Update an org group.
+ #
+ # Update the name of an existing organization group.
+ #
+ # @param org_group_id [UUID] The ID of the org group.
+ # @param body [OrgGroupUpdateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupResponse, Integer, Hash)>] OrgGroupResponse data, response status code and response headers
+ def update_org_group_with_http_info(org_group_id, body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.update_org_group".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_org_group")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_org_group"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.update_org_group ...'
+ end
+ # verify the required parameter 'org_group_id' is set
+ if @api_client.config.client_side_validation && org_group_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_id' when calling OrgGroupsAPI.update_org_group"
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.update_org_group"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_groups/{org_group_id}'.sub('{org_group_id}', CGI.escape(org_group_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :update_org_group,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#update_org_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update an org group membership.
+ #
+ # @see #update_org_group_membership_with_http_info
+ def update_org_group_membership(org_group_membership_id, body, opts = {})
+ data, _status_code, _headers = update_org_group_membership_with_http_info(org_group_membership_id, body, opts)
+ data
+ end
+
+ # Update an org group membership.
+ #
+ # Move an organization to a different org group by updating its membership.
+ #
+ # @param org_group_membership_id [UUID] The ID of the org group membership.
+ # @param body [OrgGroupMembershipUpdateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupMembershipResponse, Integer, Hash)>] OrgGroupMembershipResponse data, response status code and response headers
+ def update_org_group_membership_with_http_info(org_group_membership_id, body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.update_org_group_membership".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_org_group_membership")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_org_group_membership"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.update_org_group_membership ...'
+ end
+ # verify the required parameter 'org_group_membership_id' is set
+ if @api_client.config.client_side_validation && org_group_membership_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_membership_id' when calling OrgGroupsAPI.update_org_group_membership"
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.update_org_group_membership"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_memberships/{org_group_membership_id}'.sub('{org_group_membership_id}', CGI.escape(org_group_membership_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupMembershipResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :update_org_group_membership,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#update_org_group_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update an org group policy.
+ #
+ # @see #update_org_group_policy_with_http_info
+ def update_org_group_policy(org_group_policy_id, body, opts = {})
+ data, _status_code, _headers = update_org_group_policy_with_http_info(org_group_policy_id, body, opts)
+ data
+ end
+
+ # Update an org group policy.
+ #
+ # Update the content of an existing organization group policy.
+ #
+ # @param org_group_policy_id [UUID] The ID of the org group policy.
+ # @param body [OrgGroupPolicyUpdateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupPolicyResponse, Integer, Hash)>] OrgGroupPolicyResponse data, response status code and response headers
+ def update_org_group_policy_with_http_info(org_group_policy_id, body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.update_org_group_policy".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_org_group_policy")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_org_group_policy"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.update_org_group_policy ...'
+ end
+ # verify the required parameter 'org_group_policy_id' is set
+ if @api_client.config.client_side_validation && org_group_policy_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_policy_id' when calling OrgGroupsAPI.update_org_group_policy"
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.update_org_group_policy"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policies/{org_group_policy_id}'.sub('{org_group_policy_id}', CGI.escape(org_group_policy_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :update_org_group_policy,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#update_org_group_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update an org group policy override.
+ #
+ # @see #update_org_group_policy_override_with_http_info
+ def update_org_group_policy_override(org_group_policy_override_id, body, opts = {})
+ data, _status_code, _headers = update_org_group_policy_override_with_http_info(org_group_policy_override_id, body, opts)
+ data
+ end
+
+ # Update an org group policy override.
+ #
+ # Update an existing organization group policy override.
+ #
+ # @param org_group_policy_override_id [UUID] The ID of the org group policy override.
+ # @param body [OrgGroupPolicyOverrideUpdateRequest]
+ # @param opts [Hash] the optional parameters
+ # @return [Array<(OrgGroupPolicyOverrideResponse, Integer, Hash)>] OrgGroupPolicyOverrideResponse data, response status code and response headers
+ def update_org_group_policy_override_with_http_info(org_group_policy_override_id, body, opts = {})
+ unstable_enabled = @api_client.config.unstable_operations["v2.update_org_group_policy_override".to_sym]
+ if unstable_enabled
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_org_group_policy_override")
+ else
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_org_group_policy_override"))
+ end
+
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.update_org_group_policy_override ...'
+ end
+ # verify the required parameter 'org_group_policy_override_id' is set
+ if @api_client.config.client_side_validation && org_group_policy_override_id.nil?
+ fail ArgumentError, "Missing the required parameter 'org_group_policy_override_id' when calling OrgGroupsAPI.update_org_group_policy_override"
+ end
+ # verify the required parameter 'body' is set
+ if @api_client.config.client_side_validation && body.nil?
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrgGroupsAPI.update_org_group_policy_override"
+ end
+ # resource path
+ local_var_path = '/api/v2/org_group_policy_overrides/{org_group_policy_override_id}'.sub('{org_group_policy_override_id}', CGI.escape(org_group_policy_override_id.to_s).gsub('%2F', '/'))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrgGroupPolicyOverrideResponse'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
+
+ new_options = opts.merge(
+ :operation => :update_org_group_policy_override,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type,
+ :api_version => "V2"
+ )
+
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgGroupsAPI#update_org_group_policy_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/global_org_identifier.rb b/lib/datadog_api_client/v2/models/global_org_identifier.rb
new file mode 100644
index 000000000000..66358da7d0d2
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/global_org_identifier.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # A unique identifier for an organization including its site.
+ class GlobalOrgIdentifier
+ include BaseGenericModel
+
+ # The site of the organization.
+ attr_reader :org_site
+
+ # The UUID of the organization.
+ attr_reader :org_uuid
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_site' => :'org_site',
+ :'org_uuid' => :'org_uuid'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_site' => :'String',
+ :'org_uuid' => :'UUID'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GlobalOrgIdentifier` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_site')
+ self.org_site = attributes[:'org_site']
+ end
+
+ if attributes.key?(:'org_uuid')
+ self.org_uuid = attributes[:'org_uuid']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @org_site.nil?
+ return false if @org_uuid.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_site [Object] Object to be assigned
+ # @!visibility private
+ def org_site=(org_site)
+ if org_site.nil?
+ fail ArgumentError, 'invalid value for "org_site", org_site cannot be nil.'
+ end
+ @org_site = org_site
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_uuid [Object] Object to be assigned
+ # @!visibility private
+ def org_uuid=(org_uuid)
+ if org_uuid.nil?
+ fail ArgumentError, 'invalid value for "org_uuid", org_uuid cannot be nil.'
+ end
+ @org_uuid = org_uuid
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_site == o.org_site &&
+ org_uuid == o.org_uuid &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_site, org_uuid, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_attributes.rb b/lib/datadog_api_client/v2/models/org_group_attributes.rb
new file mode 100644
index 000000000000..30ee60906095
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_attributes.rb
@@ -0,0 +1,207 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes of an org group.
+ class OrgGroupAttributes
+ include BaseGenericModel
+
+ # Timestamp when the org group was created.
+ attr_reader :created_at
+
+ # Timestamp when the org group was last modified.
+ attr_reader :modified_at
+
+ # The name of the org group.
+ attr_reader :name
+
+ # The site of the organization that owns this org group.
+ attr_reader :owner_org_site
+
+ # The UUID of the organization that owns this org group.
+ attr_reader :owner_org_uuid
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'created_at' => :'created_at',
+ :'modified_at' => :'modified_at',
+ :'name' => :'name',
+ :'owner_org_site' => :'owner_org_site',
+ :'owner_org_uuid' => :'owner_org_uuid'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'created_at' => :'Time',
+ :'modified_at' => :'Time',
+ :'name' => :'String',
+ :'owner_org_site' => :'String',
+ :'owner_org_uuid' => :'UUID'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
+ end
+
+ if attributes.key?(:'modified_at')
+ self.modified_at = attributes[:'modified_at']
+ end
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ end
+
+ if attributes.key?(:'owner_org_site')
+ self.owner_org_site = attributes[:'owner_org_site']
+ end
+
+ if attributes.key?(:'owner_org_uuid')
+ self.owner_org_uuid = attributes[:'owner_org_uuid']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @created_at.nil?
+ return false if @modified_at.nil?
+ return false if @name.nil?
+ return false if @owner_org_site.nil?
+ return false if @owner_org_uuid.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param created_at [Object] Object to be assigned
+ # @!visibility private
+ def created_at=(created_at)
+ if created_at.nil?
+ fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.'
+ end
+ @created_at = created_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param modified_at [Object] Object to be assigned
+ # @!visibility private
+ def modified_at=(modified_at)
+ if modified_at.nil?
+ fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.'
+ end
+ @modified_at = modified_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param name [Object] Object to be assigned
+ # @!visibility private
+ def name=(name)
+ if name.nil?
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
+ end
+ @name = name
+ end
+
+ # Custom attribute writer method with validation
+ # @param owner_org_site [Object] Object to be assigned
+ # @!visibility private
+ def owner_org_site=(owner_org_site)
+ if owner_org_site.nil?
+ fail ArgumentError, 'invalid value for "owner_org_site", owner_org_site cannot be nil.'
+ end
+ @owner_org_site = owner_org_site
+ end
+
+ # Custom attribute writer method with validation
+ # @param owner_org_uuid [Object] Object to be assigned
+ # @!visibility private
+ def owner_org_uuid=(owner_org_uuid)
+ if owner_org_uuid.nil?
+ fail ArgumentError, 'invalid value for "owner_org_uuid", owner_org_uuid cannot be nil.'
+ end
+ @owner_org_uuid = owner_org_uuid
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ created_at == o.created_at &&
+ modified_at == o.modified_at &&
+ name == o.name &&
+ owner_org_site == o.owner_org_site &&
+ owner_org_uuid == o.owner_org_uuid &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [created_at, modified_at, name, owner_org_site, owner_org_uuid, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_create_attributes.rb b/lib/datadog_api_client/v2/models/org_group_create_attributes.rb
new file mode 100644
index 000000000000..4518cfc82798
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_create_attributes.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for creating an org group.
+ class OrgGroupCreateAttributes
+ include BaseGenericModel
+
+ # The name of the org group.
+ attr_reader :name
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'name' => :'name'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'name' => :'String'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupCreateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @name.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param name [Object] Object to be assigned
+ # @!visibility private
+ def name=(name)
+ if name.nil?
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
+ end
+ @name = name
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ name == o.name &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [name, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_create_data.rb b/lib/datadog_api_client/v2/models/org_group_create_data.rb
new file mode 100644
index 000000000000..5be4e351e9aa
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_create_data.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for creating an org group.
+ class OrgGroupCreateData
+ include BaseGenericModel
+
+ # Attributes for creating an org group.
+ attr_reader :attributes
+
+ # Org groups resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupCreateAttributes',
+ :'type' => :'OrgGroupType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupCreateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_create_request.rb b/lib/datadog_api_client/v2/models/org_group_create_request.rb
new file mode 100644
index 000000000000..fb47d9e373fc
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_create_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to create an org group.
+ class OrgGroupCreateRequest
+ include BaseGenericModel
+
+ # Data for creating an org group.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupCreateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupCreateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_data.rb b/lib/datadog_api_client/v2/models/org_group_data.rb
new file mode 100644
index 000000000000..433f78988a82
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_data.rb
@@ -0,0 +1,175 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # An org group resource.
+ class OrgGroupData
+ include BaseGenericModel
+
+ # Attributes of an org group.
+ attr_reader :attributes
+
+ # The ID of the org group.
+ attr_reader :id
+
+ # Relationships of an org group.
+ attr_accessor :relationships
+
+ # Org groups resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupAttributes',
+ :'id' => :'UUID',
+ :'relationships' => :'OrgGroupRelationships',
+ :'type' => :'OrgGroupType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_include_option.rb b/lib/datadog_api_client/v2/models/org_group_include_option.rb
new file mode 100644
index 000000000000..520bd1864b4f
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_include_option.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Allowed include options for org group endpoints.
+ class OrgGroupIncludeOption
+ include BaseEnumModel
+
+ MEMBERSHIPS = "memberships".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_list_response.rb b/lib/datadog_api_client/v2/models/org_group_list_response.rb
new file mode 100644
index 000000000000..61e4c0c2cc71
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_list_response.rb
@@ -0,0 +1,147 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a list of org groups.
+ class OrgGroupListResponse
+ include BaseGenericModel
+
+ # An array of org groups.
+ attr_reader :data
+
+ # Related resources included in the response when requested with the `include` parameter.
+ attr_accessor :included
+
+ # Pagination metadata.
+ attr_accessor :meta
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data',
+ :'included' => :'included',
+ :'meta' => :'meta'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'Array',
+ :'included' => :'Array',
+ :'meta' => :'OrgGroupPaginationMeta'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupListResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ end
+
+ if attributes.key?(:'included')
+ if (value = attributes[:'included']).is_a?(Array)
+ self.included = value
+ end
+ end
+
+ if attributes.key?(:'meta')
+ self.meta = attributes[:'meta']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ included == o.included &&
+ meta == o.meta &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, included, meta, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_attributes.rb b/lib/datadog_api_client/v2/models/org_group_membership_attributes.rb
new file mode 100644
index 000000000000..2e4f6094ce60
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_attributes.rb
@@ -0,0 +1,207 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes of an org group membership.
+ class OrgGroupMembershipAttributes
+ include BaseGenericModel
+
+ # Timestamp when the membership was created.
+ attr_reader :created_at
+
+ # Timestamp when the membership was last modified.
+ attr_reader :modified_at
+
+ # The name of the member organization.
+ attr_reader :org_name
+
+ # The site of the member organization.
+ attr_reader :org_site
+
+ # The UUID of the member organization.
+ attr_reader :org_uuid
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'created_at' => :'created_at',
+ :'modified_at' => :'modified_at',
+ :'org_name' => :'org_name',
+ :'org_site' => :'org_site',
+ :'org_uuid' => :'org_uuid'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'created_at' => :'Time',
+ :'modified_at' => :'Time',
+ :'org_name' => :'String',
+ :'org_site' => :'String',
+ :'org_uuid' => :'UUID'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
+ end
+
+ if attributes.key?(:'modified_at')
+ self.modified_at = attributes[:'modified_at']
+ end
+
+ if attributes.key?(:'org_name')
+ self.org_name = attributes[:'org_name']
+ end
+
+ if attributes.key?(:'org_site')
+ self.org_site = attributes[:'org_site']
+ end
+
+ if attributes.key?(:'org_uuid')
+ self.org_uuid = attributes[:'org_uuid']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @created_at.nil?
+ return false if @modified_at.nil?
+ return false if @org_name.nil?
+ return false if @org_site.nil?
+ return false if @org_uuid.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param created_at [Object] Object to be assigned
+ # @!visibility private
+ def created_at=(created_at)
+ if created_at.nil?
+ fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.'
+ end
+ @created_at = created_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param modified_at [Object] Object to be assigned
+ # @!visibility private
+ def modified_at=(modified_at)
+ if modified_at.nil?
+ fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.'
+ end
+ @modified_at = modified_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_name [Object] Object to be assigned
+ # @!visibility private
+ def org_name=(org_name)
+ if org_name.nil?
+ fail ArgumentError, 'invalid value for "org_name", org_name cannot be nil.'
+ end
+ @org_name = org_name
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_site [Object] Object to be assigned
+ # @!visibility private
+ def org_site=(org_site)
+ if org_site.nil?
+ fail ArgumentError, 'invalid value for "org_site", org_site cannot be nil.'
+ end
+ @org_site = org_site
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_uuid [Object] Object to be assigned
+ # @!visibility private
+ def org_uuid=(org_uuid)
+ if org_uuid.nil?
+ fail ArgumentError, 'invalid value for "org_uuid", org_uuid cannot be nil.'
+ end
+ @org_uuid = org_uuid
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ created_at == o.created_at &&
+ modified_at == o.modified_at &&
+ org_name == o.org_name &&
+ org_site == o.org_site &&
+ org_uuid == o.org_uuid &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [created_at, modified_at, org_name, org_site, org_uuid, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_attributes.rb b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_attributes.rb
new file mode 100644
index 000000000000..b8043e48ab41
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_attributes.rb
@@ -0,0 +1,125 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for bulk updating org group memberships.
+ class OrgGroupMembershipBulkUpdateAttributes
+ include BaseGenericModel
+
+ # List of organizations to move. Maximum 100 per request.
+ attr_reader :orgs
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'orgs' => :'orgs'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'orgs' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'orgs')
+ if (value = attributes[:'orgs']).is_a?(Array)
+ self.orgs = value
+ end
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @orgs.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param orgs [Object] Object to be assigned
+ # @!visibility private
+ def orgs=(orgs)
+ if orgs.nil?
+ fail ArgumentError, 'invalid value for "orgs", orgs cannot be nil.'
+ end
+ @orgs = orgs
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ orgs == o.orgs &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [orgs, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_data.rb b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_data.rb
new file mode 100644
index 000000000000..49879aa4e6cd
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for bulk updating org group memberships.
+ class OrgGroupMembershipBulkUpdateData
+ include BaseGenericModel
+
+ # Attributes for bulk updating org group memberships.
+ attr_reader :attributes
+
+ # Relationships for bulk updating memberships.
+ attr_reader :relationships
+
+ # Org group membership bulk update resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupMembershipBulkUpdateAttributes',
+ :'relationships' => :'OrgGroupMembershipBulkUpdateRelationships',
+ :'type' => :'OrgGroupMembershipBulkUpdateType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @relationships.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param relationships [Object] Object to be assigned
+ # @!visibility private
+ def relationships=(relationships)
+ if relationships.nil?
+ fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.'
+ end
+ @relationships = relationships
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_relationships.rb b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_relationships.rb
new file mode 100644
index 000000000000..16f998c0843e
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_relationships.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships for bulk updating memberships.
+ class OrgGroupMembershipBulkUpdateRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_reader :source_org_group
+
+ # Relationship to a single org group.
+ attr_reader :target_org_group
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'source_org_group' => :'source_org_group',
+ :'target_org_group' => :'target_org_group'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'source_org_group' => :'OrgGroupRelationshipToOne',
+ :'target_org_group' => :'OrgGroupRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'source_org_group')
+ self.source_org_group = attributes[:'source_org_group']
+ end
+
+ if attributes.key?(:'target_org_group')
+ self.target_org_group = attributes[:'target_org_group']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @source_org_group.nil?
+ return false if @target_org_group.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param source_org_group [Object] Object to be assigned
+ # @!visibility private
+ def source_org_group=(source_org_group)
+ if source_org_group.nil?
+ fail ArgumentError, 'invalid value for "source_org_group", source_org_group cannot be nil.'
+ end
+ @source_org_group = source_org_group
+ end
+
+ # Custom attribute writer method with validation
+ # @param target_org_group [Object] Object to be assigned
+ # @!visibility private
+ def target_org_group=(target_org_group)
+ if target_org_group.nil?
+ fail ArgumentError, 'invalid value for "target_org_group", target_org_group cannot be nil.'
+ end
+ @target_org_group = target_org_group
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ source_org_group == o.source_org_group &&
+ target_org_group == o.target_org_group &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [source_org_group, target_org_group, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_request.rb b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_request.rb
new file mode 100644
index 000000000000..0bf5f0556c04
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to bulk update org group memberships.
+ class OrgGroupMembershipBulkUpdateRequest
+ include BaseGenericModel
+
+ # Data for bulk updating org group memberships.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupMembershipBulkUpdateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_type.rb b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_type.rb
new file mode 100644
index 000000000000..98dc57ec7e29
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_bulk_update_type.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Org group membership bulk update resource type.
+ class OrgGroupMembershipBulkUpdateType
+ include BaseEnumModel
+
+ ORG_GROUP_MEMBERSHIP_BULK_UPDATES = "org_group_membership_bulk_updates".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_data.rb b/lib/datadog_api_client/v2/models/org_group_membership_data.rb
new file mode 100644
index 000000000000..5a7606f6df64
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_data.rb
@@ -0,0 +1,175 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # An org group membership resource.
+ class OrgGroupMembershipData
+ include BaseGenericModel
+
+ # Attributes of an org group membership.
+ attr_reader :attributes
+
+ # The ID of the org group membership.
+ attr_reader :id
+
+ # Relationships of an org group membership.
+ attr_accessor :relationships
+
+ # Org group memberships resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupMembershipAttributes',
+ :'id' => :'UUID',
+ :'relationships' => :'OrgGroupMembershipRelationships',
+ :'type' => :'OrgGroupMembershipType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_list_response.rb b/lib/datadog_api_client/v2/models/org_group_membership_list_response.rb
new file mode 100644
index 000000000000..209f2b9d18b3
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_list_response.rb
@@ -0,0 +1,135 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a list of org group memberships.
+ class OrgGroupMembershipListResponse
+ include BaseGenericModel
+
+ # An array of org group memberships.
+ attr_reader :data
+
+ # Pagination metadata.
+ attr_accessor :meta
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data',
+ :'meta' => :'meta'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'Array',
+ :'meta' => :'OrgGroupPaginationMeta'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipListResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ end
+
+ if attributes.key?(:'meta')
+ self.meta = attributes[:'meta']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ meta == o.meta &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, meta, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_relationship_data.rb b/lib/datadog_api_client/v2/models/org_group_membership_relationship_data.rb
new file mode 100644
index 000000000000..1c8d8829412a
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_relationship_data.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # A reference to an org group membership.
+ class OrgGroupMembershipRelationshipData
+ include BaseGenericModel
+
+ # The ID of the membership.
+ attr_reader :id
+
+ # Org group memberships resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'id' => :'UUID',
+ :'type' => :'OrgGroupMembershipType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipRelationshipData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_relationships.rb b/lib/datadog_api_client/v2/models/org_group_membership_relationships.rb
new file mode 100644
index 000000000000..203d412316ea
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_relationships.rb
@@ -0,0 +1,105 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships of an org group membership.
+ class OrgGroupMembershipRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_accessor :org_group
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_group' => :'org_group'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_group' => :'OrgGroupRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_group')
+ self.org_group = attributes[:'org_group']
+ end
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_group == o.org_group &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_group, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_response.rb b/lib/datadog_api_client/v2/models/org_group_membership_response.rb
new file mode 100644
index 000000000000..98b7ac84f952
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_response.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a single org group membership.
+ class OrgGroupMembershipResponse
+ include BaseGenericModel
+
+ # An org group membership resource.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupMembershipData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_sort_option.rb b/lib/datadog_api_client/v2/models/org_group_membership_sort_option.rb
new file mode 100644
index 000000000000..dc6f6dd2fa9c
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_sort_option.rb
@@ -0,0 +1,29 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Field to sort memberships by.
+ class OrgGroupMembershipSortOption
+ include BaseEnumModel
+
+ NAME = "name".freeze
+ MINUS_NAME = "-name".freeze
+ UUID = "uuid".freeze
+ MINUS_UUID = "-uuid".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_type.rb b/lib/datadog_api_client/v2/models/org_group_membership_type.rb
new file mode 100644
index 000000000000..2b9e8b712e45
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_type.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Org group memberships resource type.
+ class OrgGroupMembershipType
+ include BaseEnumModel
+
+ ORG_GROUP_MEMBERSHIPS = "org_group_memberships".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_update_data.rb b/lib/datadog_api_client/v2/models/org_group_membership_update_data.rb
new file mode 100644
index 000000000000..7704fab894ef
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_update_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for updating an org group membership.
+ class OrgGroupMembershipUpdateData
+ include BaseGenericModel
+
+ # The ID of the membership.
+ attr_reader :id
+
+ # Relationships for updating a membership.
+ attr_reader :relationships
+
+ # Org group memberships resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'id' => :'UUID',
+ :'relationships' => :'OrgGroupMembershipUpdateRelationships',
+ :'type' => :'OrgGroupMembershipType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipUpdateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @id.nil?
+ return false if @relationships.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param relationships [Object] Object to be assigned
+ # @!visibility private
+ def relationships=(relationships)
+ if relationships.nil?
+ fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.'
+ end
+ @relationships = relationships
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [id, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_update_relationships.rb b/lib/datadog_api_client/v2/models/org_group_membership_update_relationships.rb
new file mode 100644
index 000000000000..73d6e6ba6317
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_update_relationships.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships for updating a membership.
+ class OrgGroupMembershipUpdateRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_reader :org_group
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_group' => :'org_group'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_group' => :'OrgGroupRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipUpdateRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_group')
+ self.org_group = attributes[:'org_group']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @org_group.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_group [Object] Object to be assigned
+ # @!visibility private
+ def org_group=(org_group)
+ if org_group.nil?
+ fail ArgumentError, 'invalid value for "org_group", org_group cannot be nil.'
+ end
+ @org_group = org_group
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_group == o.org_group &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_group, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_membership_update_request.rb b/lib/datadog_api_client/v2/models/org_group_membership_update_request.rb
new file mode 100644
index 000000000000..6700fe41dd5a
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_membership_update_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to update an org group membership.
+ class OrgGroupMembershipUpdateRequest
+ include BaseGenericModel
+
+ # Data for updating an org group membership.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupMembershipUpdateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipUpdateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_memberships_relationship.rb b/lib/datadog_api_client/v2/models/org_group_memberships_relationship.rb
new file mode 100644
index 000000000000..12ac8d57568d
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_memberships_relationship.rb
@@ -0,0 +1,125 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationship to org group memberships.
+ class OrgGroupMembershipsRelationship
+ include BaseGenericModel
+
+ # An array of membership relationship references.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupMembershipsRelationship` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_pagination_meta.rb b/lib/datadog_api_client/v2/models/org_group_pagination_meta.rb
new file mode 100644
index 000000000000..f3904133d217
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_pagination_meta.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Pagination metadata.
+ class OrgGroupPaginationMeta
+ include BaseGenericModel
+
+ # Page-based pagination details.
+ attr_reader :page
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'page' => :'page'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'page' => :'OrgGroupPaginationMetaPage'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPaginationMeta` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'page')
+ self.page = attributes[:'page']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @page.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param page [Object] Object to be assigned
+ # @!visibility private
+ def page=(page)
+ if page.nil?
+ fail ArgumentError, 'invalid value for "page", page cannot be nil.'
+ end
+ @page = page
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ page == o.page &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [page, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_pagination_meta_page.rb b/lib/datadog_api_client/v2/models/org_group_pagination_meta_page.rb
new file mode 100644
index 000000000000..6ef13c266d39
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_pagination_meta_page.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Page-based pagination details.
+ class OrgGroupPaginationMetaPage
+ include BaseGenericModel
+
+ # The total number of items.
+ attr_reader :total_count
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'total_count' => :'total_count'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'total_count' => :'Integer'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPaginationMetaPage` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'total_count')
+ self.total_count = attributes[:'total_count']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @total_count.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param total_count [Object] Object to be assigned
+ # @!visibility private
+ def total_count=(total_count)
+ if total_count.nil?
+ fail ArgumentError, 'invalid value for "total_count", total_count cannot be nil.'
+ end
+ @total_count = total_count
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ total_count == o.total_count &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [total_count, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb
new file mode 100644
index 000000000000..2c9ad6b9c8b7
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb
@@ -0,0 +1,175 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes of an org group policy.
+ class OrgGroupPolicyAttributes
+ include BaseGenericModel
+
+ # The policy content as key-value pairs.
+ attr_accessor :content
+
+ # Timestamp when the policy was enforced.
+ attr_reader :enforced_at
+
+ # Timestamp when the policy was last modified.
+ attr_reader :modified_at
+
+ # The name of the policy.
+ attr_reader :policy_name
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'content' => :'content',
+ :'enforced_at' => :'enforced_at',
+ :'modified_at' => :'modified_at',
+ :'policy_name' => :'policy_name'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'content' => :'Hash',
+ :'enforced_at' => :'Time',
+ :'modified_at' => :'Time',
+ :'policy_name' => :'String'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'content')
+ self.content = attributes[:'content']
+ end
+
+ if attributes.key?(:'enforced_at')
+ self.enforced_at = attributes[:'enforced_at']
+ end
+
+ if attributes.key?(:'modified_at')
+ self.modified_at = attributes[:'modified_at']
+ end
+
+ if attributes.key?(:'policy_name')
+ self.policy_name = attributes[:'policy_name']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @enforced_at.nil?
+ return false if @modified_at.nil?
+ return false if @policy_name.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param enforced_at [Object] Object to be assigned
+ # @!visibility private
+ def enforced_at=(enforced_at)
+ if enforced_at.nil?
+ fail ArgumentError, 'invalid value for "enforced_at", enforced_at cannot be nil.'
+ end
+ @enforced_at = enforced_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param modified_at [Object] Object to be assigned
+ # @!visibility private
+ def modified_at=(modified_at)
+ if modified_at.nil?
+ fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.'
+ end
+ @modified_at = modified_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param policy_name [Object] Object to be assigned
+ # @!visibility private
+ def policy_name=(policy_name)
+ if policy_name.nil?
+ fail ArgumentError, 'invalid value for "policy_name", policy_name cannot be nil.'
+ end
+ @policy_name = policy_name
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ content == o.content &&
+ enforced_at == o.enforced_at &&
+ modified_at == o.modified_at &&
+ policy_name == o.policy_name &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [content, enforced_at, modified_at, policy_name, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_config_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_config_attributes.rb
new file mode 100644
index 000000000000..fe33d9c60f74
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_config_attributes.rb
@@ -0,0 +1,209 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes of an org group policy config.
+ class OrgGroupPolicyConfigAttributes
+ include BaseGenericModel
+
+ # The allowed values for this config.
+ attr_reader :allowed_values
+
+ # The default value for this config.
+ attr_reader :default_value
+
+ # The description of the policy config.
+ attr_reader :description
+
+ # The name of the policy config.
+ attr_reader :name
+
+ # The type of the value for this config.
+ attr_reader :value_type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'allowed_values' => :'allowed_values',
+ :'default_value' => :'default_value',
+ :'description' => :'description',
+ :'name' => :'name',
+ :'value_type' => :'value_type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'allowed_values' => :'Array',
+ :'default_value' => :'Object',
+ :'description' => :'String',
+ :'name' => :'String',
+ :'value_type' => :'String'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyConfigAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'allowed_values')
+ if (value = attributes[:'allowed_values']).is_a?(Array)
+ self.allowed_values = value
+ end
+ end
+
+ if attributes.key?(:'default_value')
+ self.default_value = attributes[:'default_value']
+ end
+
+ if attributes.key?(:'description')
+ self.description = attributes[:'description']
+ end
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ end
+
+ if attributes.key?(:'value_type')
+ self.value_type = attributes[:'value_type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @allowed_values.nil?
+ return false if @default_value.nil?
+ return false if @description.nil?
+ return false if @name.nil?
+ return false if @value_type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param allowed_values [Object] Object to be assigned
+ # @!visibility private
+ def allowed_values=(allowed_values)
+ if allowed_values.nil?
+ fail ArgumentError, 'invalid value for "allowed_values", allowed_values cannot be nil.'
+ end
+ @allowed_values = allowed_values
+ end
+
+ # Custom attribute writer method with validation
+ # @param default_value [Object] Object to be assigned
+ # @!visibility private
+ def default_value=(default_value)
+ if default_value.nil?
+ fail ArgumentError, 'invalid value for "default_value", default_value cannot be nil.'
+ end
+ @default_value = default_value
+ end
+
+ # Custom attribute writer method with validation
+ # @param description [Object] Object to be assigned
+ # @!visibility private
+ def description=(description)
+ if description.nil?
+ fail ArgumentError, 'invalid value for "description", description cannot be nil.'
+ end
+ @description = description
+ end
+
+ # Custom attribute writer method with validation
+ # @param name [Object] Object to be assigned
+ # @!visibility private
+ def name=(name)
+ if name.nil?
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
+ end
+ @name = name
+ end
+
+ # Custom attribute writer method with validation
+ # @param value_type [Object] Object to be assigned
+ # @!visibility private
+ def value_type=(value_type)
+ if value_type.nil?
+ fail ArgumentError, 'invalid value for "value_type", value_type cannot be nil.'
+ end
+ @value_type = value_type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ allowed_values == o.allowed_values &&
+ default_value == o.default_value &&
+ description == o.description &&
+ name == o.name &&
+ value_type == o.value_type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [allowed_values, default_value, description, name, value_type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_config_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_config_data.rb
new file mode 100644
index 000000000000..d4b6386f4c3a
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_config_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # An org group policy config resource.
+ class OrgGroupPolicyConfigData
+ include BaseGenericModel
+
+ # Attributes of an org group policy config.
+ attr_reader :attributes
+
+ # The identifier of the policy config (uses the config name).
+ attr_reader :id
+
+ # Org group policy configs resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyConfigAttributes',
+ :'id' => :'String',
+ :'type' => :'OrgGroupPolicyConfigType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyConfigData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_config_list_response.rb b/lib/datadog_api_client/v2/models/org_group_policy_config_list_response.rb
new file mode 100644
index 000000000000..bfec3b88737e
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_config_list_response.rb
@@ -0,0 +1,125 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a list of org group policy configs.
+ class OrgGroupPolicyConfigListResponse
+ include BaseGenericModel
+
+ # An array of org group policy configs.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyConfigListResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_config_type.rb b/lib/datadog_api_client/v2/models/org_group_policy_config_type.rb
new file mode 100644
index 000000000000..979ca7dc65b7
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_config_type.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Org group policy configs resource type.
+ class OrgGroupPolicyConfigType
+ include BaseEnumModel
+
+ ORG_GROUP_POLICY_CONFIGS = "org_group_policy_configs".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb
new file mode 100644
index 000000000000..0fd04ad95d72
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for creating an org group policy.
+ class OrgGroupPolicyCreateAttributes
+ include BaseGenericModel
+
+ # The policy content as key-value pairs.
+ attr_reader :content
+
+ # The name of the policy.
+ attr_reader :policy_name
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'content' => :'content',
+ :'policy_name' => :'policy_name'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'content' => :'Hash',
+ :'policy_name' => :'String'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyCreateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'content')
+ self.content = attributes[:'content']
+ end
+
+ if attributes.key?(:'policy_name')
+ self.policy_name = attributes[:'policy_name']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @content.nil?
+ return false if @policy_name.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param content [Object] Object to be assigned
+ # @!visibility private
+ def content=(content)
+ if content.nil?
+ fail ArgumentError, 'invalid value for "content", content cannot be nil.'
+ end
+ @content = content
+ end
+
+ # Custom attribute writer method with validation
+ # @param policy_name [Object] Object to be assigned
+ # @!visibility private
+ def policy_name=(policy_name)
+ if policy_name.nil?
+ fail ArgumentError, 'invalid value for "policy_name", policy_name cannot be nil.'
+ end
+ @policy_name = policy_name
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ content == o.content &&
+ policy_name == o.policy_name &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [content, policy_name, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb
new file mode 100644
index 000000000000..f809cb844117
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for creating an org group policy.
+ class OrgGroupPolicyCreateData
+ include BaseGenericModel
+
+ # Attributes for creating an org group policy.
+ attr_reader :attributes
+
+ # Relationships for creating a policy.
+ attr_reader :relationships
+
+ # Org group policies resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyCreateAttributes',
+ :'relationships' => :'OrgGroupPolicyCreateRelationships',
+ :'type' => :'OrgGroupPolicyType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyCreateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @relationships.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param relationships [Object] Object to be assigned
+ # @!visibility private
+ def relationships=(relationships)
+ if relationships.nil?
+ fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.'
+ end
+ @relationships = relationships
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_create_relationships.rb b/lib/datadog_api_client/v2/models/org_group_policy_create_relationships.rb
new file mode 100644
index 000000000000..3290c2538c78
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_create_relationships.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships for creating a policy.
+ class OrgGroupPolicyCreateRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_reader :org_group
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_group' => :'org_group'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_group' => :'OrgGroupRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyCreateRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_group')
+ self.org_group = attributes[:'org_group']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @org_group.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_group [Object] Object to be assigned
+ # @!visibility private
+ def org_group=(org_group)
+ if org_group.nil?
+ fail ArgumentError, 'invalid value for "org_group", org_group cannot be nil.'
+ end
+ @org_group = org_group
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_group == o.org_group &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_group, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_create_request.rb b/lib/datadog_api_client/v2/models/org_group_policy_create_request.rb
new file mode 100644
index 000000000000..c8e9bd15ea2e
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_create_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to create an org group policy.
+ class OrgGroupPolicyCreateRequest
+ include BaseGenericModel
+
+ # Data for creating an org group policy.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyCreateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyCreateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_data.rb
new file mode 100644
index 000000000000..d162ef4ebc4e
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_data.rb
@@ -0,0 +1,175 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # An org group policy resource.
+ class OrgGroupPolicyData
+ include BaseGenericModel
+
+ # Attributes of an org group policy.
+ attr_reader :attributes
+
+ # The ID of the org group policy.
+ attr_reader :id
+
+ # Relationships of an org group policy.
+ attr_accessor :relationships
+
+ # Org group policies resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyAttributes',
+ :'id' => :'UUID',
+ :'relationships' => :'OrgGroupPolicyRelationships',
+ :'type' => :'OrgGroupPolicyType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_list_response.rb b/lib/datadog_api_client/v2/models/org_group_policy_list_response.rb
new file mode 100644
index 000000000000..05002eec41a9
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_list_response.rb
@@ -0,0 +1,135 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a list of org group policies.
+ class OrgGroupPolicyListResponse
+ include BaseGenericModel
+
+ # An array of org group policies.
+ attr_reader :data
+
+ # Pagination metadata.
+ attr_accessor :meta
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data',
+ :'meta' => :'meta'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'Array',
+ :'meta' => :'OrgGroupPaginationMeta'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyListResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ end
+
+ if attributes.key?(:'meta')
+ self.meta = attributes[:'meta']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ meta == o.meta &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, meta, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_attributes.rb
new file mode 100644
index 000000000000..8d07c25ccd7a
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_attributes.rb
@@ -0,0 +1,196 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes of an org group policy override.
+ class OrgGroupPolicyOverrideAttributes
+ include BaseGenericModel
+
+ # The override content as key-value pairs.
+ attr_accessor :content
+
+ # Timestamp when the override was created.
+ attr_reader :created_at
+
+ # Timestamp when the override was last modified.
+ attr_reader :modified_at
+
+ # The site of the organization that has the override.
+ attr_reader :org_site
+
+ # The UUID of the organization that has the override.
+ attr_reader :org_uuid
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'content' => :'content',
+ :'created_at' => :'created_at',
+ :'modified_at' => :'modified_at',
+ :'org_site' => :'org_site',
+ :'org_uuid' => :'org_uuid'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'content' => :'Hash',
+ :'created_at' => :'Time',
+ :'modified_at' => :'Time',
+ :'org_site' => :'String',
+ :'org_uuid' => :'UUID'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'content')
+ self.content = attributes[:'content']
+ end
+
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
+ end
+
+ if attributes.key?(:'modified_at')
+ self.modified_at = attributes[:'modified_at']
+ end
+
+ if attributes.key?(:'org_site')
+ self.org_site = attributes[:'org_site']
+ end
+
+ if attributes.key?(:'org_uuid')
+ self.org_uuid = attributes[:'org_uuid']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @created_at.nil?
+ return false if @modified_at.nil?
+ return false if @org_site.nil?
+ return false if @org_uuid.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param created_at [Object] Object to be assigned
+ # @!visibility private
+ def created_at=(created_at)
+ if created_at.nil?
+ fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.'
+ end
+ @created_at = created_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param modified_at [Object] Object to be assigned
+ # @!visibility private
+ def modified_at=(modified_at)
+ if modified_at.nil?
+ fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.'
+ end
+ @modified_at = modified_at
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_site [Object] Object to be assigned
+ # @!visibility private
+ def org_site=(org_site)
+ if org_site.nil?
+ fail ArgumentError, 'invalid value for "org_site", org_site cannot be nil.'
+ end
+ @org_site = org_site
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_uuid [Object] Object to be assigned
+ # @!visibility private
+ def org_uuid=(org_uuid)
+ if org_uuid.nil?
+ fail ArgumentError, 'invalid value for "org_uuid", org_uuid cannot be nil.'
+ end
+ @org_uuid = org_uuid
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ content == o.content &&
+ created_at == o.created_at &&
+ modified_at == o.modified_at &&
+ org_site == o.org_site &&
+ org_uuid == o.org_uuid &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [content, created_at, modified_at, org_site, org_uuid, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_create_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_create_attributes.rb
new file mode 100644
index 000000000000..b0dd20854290
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_create_attributes.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for creating a policy override.
+ class OrgGroupPolicyOverrideCreateAttributes
+ include BaseGenericModel
+
+ # The site of the organization.
+ attr_reader :org_site
+
+ # The UUID of the organization to grant the override.
+ attr_reader :org_uuid
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_site' => :'org_site',
+ :'org_uuid' => :'org_uuid'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_site' => :'String',
+ :'org_uuid' => :'UUID'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_site')
+ self.org_site = attributes[:'org_site']
+ end
+
+ if attributes.key?(:'org_uuid')
+ self.org_uuid = attributes[:'org_uuid']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @org_site.nil?
+ return false if @org_uuid.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_site [Object] Object to be assigned
+ # @!visibility private
+ def org_site=(org_site)
+ if org_site.nil?
+ fail ArgumentError, 'invalid value for "org_site", org_site cannot be nil.'
+ end
+ @org_site = org_site
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_uuid [Object] Object to be assigned
+ # @!visibility private
+ def org_uuid=(org_uuid)
+ if org_uuid.nil?
+ fail ArgumentError, 'invalid value for "org_uuid", org_uuid cannot be nil.'
+ end
+ @org_uuid = org_uuid
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_site == o.org_site &&
+ org_uuid == o.org_uuid &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_site, org_uuid, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_create_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_create_data.rb
new file mode 100644
index 000000000000..03a8727e0eed
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_create_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for creating an org group policy override.
+ class OrgGroupPolicyOverrideCreateData
+ include BaseGenericModel
+
+ # Attributes for creating a policy override.
+ attr_reader :attributes
+
+ # Relationships for creating a policy override.
+ attr_reader :relationships
+
+ # Org group policy overrides resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyOverrideCreateAttributes',
+ :'relationships' => :'OrgGroupPolicyOverrideCreateRelationships',
+ :'type' => :'OrgGroupPolicyOverrideType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @relationships.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param relationships [Object] Object to be assigned
+ # @!visibility private
+ def relationships=(relationships)
+ if relationships.nil?
+ fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.'
+ end
+ @relationships = relationships
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_create_relationships.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_create_relationships.rb
new file mode 100644
index 000000000000..abd7160c4d12
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_create_relationships.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships for creating a policy override.
+ class OrgGroupPolicyOverrideCreateRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_reader :org_group
+
+ # Relationship to a single org group policy.
+ attr_reader :org_group_policy
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_group' => :'org_group',
+ :'org_group_policy' => :'org_group_policy'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_group' => :'OrgGroupRelationshipToOne',
+ :'org_group_policy' => :'OrgGroupPolicyRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_group')
+ self.org_group = attributes[:'org_group']
+ end
+
+ if attributes.key?(:'org_group_policy')
+ self.org_group_policy = attributes[:'org_group_policy']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @org_group.nil?
+ return false if @org_group_policy.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_group [Object] Object to be assigned
+ # @!visibility private
+ def org_group=(org_group)
+ if org_group.nil?
+ fail ArgumentError, 'invalid value for "org_group", org_group cannot be nil.'
+ end
+ @org_group = org_group
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_group_policy [Object] Object to be assigned
+ # @!visibility private
+ def org_group_policy=(org_group_policy)
+ if org_group_policy.nil?
+ fail ArgumentError, 'invalid value for "org_group_policy", org_group_policy cannot be nil.'
+ end
+ @org_group_policy = org_group_policy
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_group == o.org_group &&
+ org_group_policy == o.org_group_policy &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_group, org_group_policy, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_create_request.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_create_request.rb
new file mode 100644
index 000000000000..f95a9d52d23e
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_create_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to create an org group policy override.
+ class OrgGroupPolicyOverrideCreateRequest
+ include BaseGenericModel
+
+ # Data for creating an org group policy override.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyOverrideCreateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_data.rb
new file mode 100644
index 000000000000..48b4a2284e54
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_data.rb
@@ -0,0 +1,175 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # An org group policy override resource.
+ class OrgGroupPolicyOverrideData
+ include BaseGenericModel
+
+ # Attributes of an org group policy override.
+ attr_reader :attributes
+
+ # The ID of the policy override.
+ attr_reader :id
+
+ # Relationships of an org group policy override.
+ attr_accessor :relationships
+
+ # Org group policy overrides resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'relationships' => :'relationships',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyOverrideAttributes',
+ :'id' => :'UUID',
+ :'relationships' => :'OrgGroupPolicyOverrideRelationships',
+ :'type' => :'OrgGroupPolicyOverrideType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'relationships')
+ self.relationships = attributes[:'relationships']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ relationships == o.relationships &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, relationships, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_list_response.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_list_response.rb
new file mode 100644
index 000000000000..78c706fc532b
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_list_response.rb
@@ -0,0 +1,135 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a list of org group policy overrides.
+ class OrgGroupPolicyOverrideListResponse
+ include BaseGenericModel
+
+ # An array of org group policy overrides.
+ attr_reader :data
+
+ # Pagination metadata.
+ attr_accessor :meta
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data',
+ :'meta' => :'meta'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'Array',
+ :'meta' => :'OrgGroupPaginationMeta'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideListResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ end
+
+ if attributes.key?(:'meta')
+ self.meta = attributes[:'meta']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ meta == o.meta &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, meta, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_relationships.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_relationships.rb
new file mode 100644
index 000000000000..e60cc7724973
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_relationships.rb
@@ -0,0 +1,115 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships of an org group policy override.
+ class OrgGroupPolicyOverrideRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_accessor :org_group
+
+ # Relationship to a single org group policy.
+ attr_accessor :org_group_policy
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_group' => :'org_group',
+ :'org_group_policy' => :'org_group_policy'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_group' => :'OrgGroupRelationshipToOne',
+ :'org_group_policy' => :'OrgGroupPolicyRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_group')
+ self.org_group = attributes[:'org_group']
+ end
+
+ if attributes.key?(:'org_group_policy')
+ self.org_group_policy = attributes[:'org_group_policy']
+ end
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_group == o.org_group &&
+ org_group_policy == o.org_group_policy &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_group, org_group_policy, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_response.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_response.rb
new file mode 100644
index 000000000000..bef9f626e0bb
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_response.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a single org group policy override.
+ class OrgGroupPolicyOverrideResponse
+ include BaseGenericModel
+
+ # An org group policy override resource.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyOverrideData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_sort_option.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_sort_option.rb
new file mode 100644
index 000000000000..e2a6895c1fc4
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_sort_option.rb
@@ -0,0 +1,29 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Field to sort overrides by.
+ class OrgGroupPolicyOverrideSortOption
+ include BaseEnumModel
+
+ ID = "id".freeze
+ MINUS_ID = "-id".freeze
+ ORG_UUID = "org_uuid".freeze
+ MINUS_ORG_UUID = "-org_uuid".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_type.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_type.rb
new file mode 100644
index 000000000000..1b85395b7da2
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_type.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Org group policy overrides resource type.
+ class OrgGroupPolicyOverrideType
+ include BaseEnumModel
+
+ ORG_GROUP_POLICY_OVERRIDES = "org_group_policy_overrides".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb
new file mode 100644
index 000000000000..9b6342aa50df
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for updating a policy override.
+ class OrgGroupPolicyOverrideUpdateAttributes
+ include BaseGenericModel
+
+ # The site of the organization.
+ attr_reader :org_site
+
+ # The UUID of the organization.
+ attr_reader :org_uuid
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_site' => :'org_site',
+ :'org_uuid' => :'org_uuid'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_site' => :'String',
+ :'org_uuid' => :'UUID'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_site')
+ self.org_site = attributes[:'org_site']
+ end
+
+ if attributes.key?(:'org_uuid')
+ self.org_uuid = attributes[:'org_uuid']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @org_site.nil?
+ return false if @org_uuid.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_site [Object] Object to be assigned
+ # @!visibility private
+ def org_site=(org_site)
+ if org_site.nil?
+ fail ArgumentError, 'invalid value for "org_site", org_site cannot be nil.'
+ end
+ @org_site = org_site
+ end
+
+ # Custom attribute writer method with validation
+ # @param org_uuid [Object] Object to be assigned
+ # @!visibility private
+ def org_uuid=(org_uuid)
+ if org_uuid.nil?
+ fail ArgumentError, 'invalid value for "org_uuid", org_uuid cannot be nil.'
+ end
+ @org_uuid = org_uuid
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_site == o.org_site &&
+ org_uuid == o.org_uuid &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_site, org_uuid, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb
new file mode 100644
index 000000000000..7f94fdad98ba
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for updating a policy override.
+ class OrgGroupPolicyOverrideUpdateData
+ include BaseGenericModel
+
+ # Attributes for updating a policy override.
+ attr_reader :attributes
+
+ # The ID of the policy override.
+ attr_reader :id
+
+ # Org group policy overrides resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyOverrideUpdateAttributes',
+ :'id' => :'UUID',
+ :'type' => :'OrgGroupPolicyOverrideType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_update_request.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_update_request.rb
new file mode 100644
index 000000000000..1027d3ba21fc
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_override_update_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to update an org group policy override.
+ class OrgGroupPolicyOverrideUpdateRequest
+ include BaseGenericModel
+
+ # Data for updating a policy override.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyOverrideUpdateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_relationship_to_one.rb b/lib/datadog_api_client/v2/models/org_group_policy_relationship_to_one.rb
new file mode 100644
index 000000000000..e8923fcc7f76
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_relationship_to_one.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationship to a single org group policy.
+ class OrgGroupPolicyRelationshipToOne
+ include BaseGenericModel
+
+ # A reference to an org group policy.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyRelationshipToOneData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyRelationshipToOne` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_relationship_to_one_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_relationship_to_one_data.rb
new file mode 100644
index 000000000000..144136c5a925
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_relationship_to_one_data.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # A reference to an org group policy.
+ class OrgGroupPolicyRelationshipToOneData
+ include BaseGenericModel
+
+ # The ID of the policy.
+ attr_reader :id
+
+ # Org group policies resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'id' => :'UUID',
+ :'type' => :'OrgGroupPolicyType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyRelationshipToOneData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_relationships.rb b/lib/datadog_api_client/v2/models/org_group_policy_relationships.rb
new file mode 100644
index 000000000000..aa0ff3c2febe
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_relationships.rb
@@ -0,0 +1,105 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships of an org group policy.
+ class OrgGroupPolicyRelationships
+ include BaseGenericModel
+
+ # Relationship to a single org group.
+ attr_accessor :org_group
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'org_group' => :'org_group'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'org_group' => :'OrgGroupRelationshipToOne'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'org_group')
+ self.org_group = attributes[:'org_group']
+ end
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ org_group == o.org_group &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [org_group, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_response.rb b/lib/datadog_api_client/v2/models/org_group_policy_response.rb
new file mode 100644
index 000000000000..8a2e62678fe6
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_response.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a single org group policy.
+ class OrgGroupPolicyResponse
+ include BaseGenericModel
+
+ # An org group policy resource.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_sort_option.rb b/lib/datadog_api_client/v2/models/org_group_policy_sort_option.rb
new file mode 100644
index 000000000000..3e2892ca0dd6
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_sort_option.rb
@@ -0,0 +1,29 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Field to sort policies by.
+ class OrgGroupPolicySortOption
+ include BaseEnumModel
+
+ ID = "id".freeze
+ MINUS_ID = "-id".freeze
+ NAME = "name".freeze
+ MINUS_NAME = "-name".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_type.rb b/lib/datadog_api_client/v2/models/org_group_policy_type.rb
new file mode 100644
index 000000000000..1fac4f093f6d
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_type.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Org group policies resource type.
+ class OrgGroupPolicyType
+ include BaseEnumModel
+
+ ORG_GROUP_POLICIES = "org_group_policies".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb
new file mode 100644
index 000000000000..e61b52039899
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb
@@ -0,0 +1,105 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for updating an org group policy.
+ class OrgGroupPolicyUpdateAttributes
+ include BaseGenericModel
+
+ # The policy content as key-value pairs.
+ attr_accessor :content
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'content' => :'content'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'content' => :'Hash'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyUpdateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'content')
+ self.content = attributes[:'content']
+ end
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ content == o.content &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [content, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_update_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_update_data.rb
new file mode 100644
index 000000000000..3af9c3e11151
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_update_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for updating an org group policy.
+ class OrgGroupPolicyUpdateData
+ include BaseGenericModel
+
+ # Attributes for updating an org group policy.
+ attr_reader :attributes
+
+ # The ID of the policy.
+ attr_reader :id
+
+ # Org group policies resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupPolicyUpdateAttributes',
+ :'id' => :'UUID',
+ :'type' => :'OrgGroupPolicyType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyUpdateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_policy_update_request.rb b/lib/datadog_api_client/v2/models/org_group_policy_update_request.rb
new file mode 100644
index 000000000000..5a3e8b6cadd9
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_policy_update_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to update an org group policy.
+ class OrgGroupPolicyUpdateRequest
+ include BaseGenericModel
+
+ # Data for updating an org group policy.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupPolicyUpdateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupPolicyUpdateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_relationship_to_one.rb b/lib/datadog_api_client/v2/models/org_group_relationship_to_one.rb
new file mode 100644
index 000000000000..514d5a058701
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_relationship_to_one.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationship to a single org group.
+ class OrgGroupRelationshipToOne
+ include BaseGenericModel
+
+ # A reference to an org group.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupRelationshipToOneData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupRelationshipToOne` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_relationship_to_one_data.rb b/lib/datadog_api_client/v2/models/org_group_relationship_to_one_data.rb
new file mode 100644
index 000000000000..831795df6267
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_relationship_to_one_data.rb
@@ -0,0 +1,144 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # A reference to an org group.
+ class OrgGroupRelationshipToOneData
+ include BaseGenericModel
+
+ # The ID of the org group.
+ attr_reader :id
+
+ # Org groups resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'id' => :'UUID',
+ :'type' => :'OrgGroupType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupRelationshipToOneData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_relationships.rb b/lib/datadog_api_client/v2/models/org_group_relationships.rb
new file mode 100644
index 000000000000..cc8619a0d245
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_relationships.rb
@@ -0,0 +1,105 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Relationships of an org group.
+ class OrgGroupRelationships
+ include BaseGenericModel
+
+ # Relationship to org group memberships.
+ attr_accessor :memberships
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'memberships' => :'memberships'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'memberships' => :'OrgGroupMembershipsRelationship'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupRelationships` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'memberships')
+ self.memberships = attributes[:'memberships']
+ end
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ memberships == o.memberships &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [memberships, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_response.rb b/lib/datadog_api_client/v2/models/org_group_response.rb
new file mode 100644
index 000000000000..6a376e6f19a1
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_response.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Response containing a single org group.
+ class OrgGroupResponse
+ include BaseGenericModel
+
+ # An org group resource.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupResponse` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_sort_option.rb b/lib/datadog_api_client/v2/models/org_group_sort_option.rb
new file mode 100644
index 000000000000..f50af918650e
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_sort_option.rb
@@ -0,0 +1,29 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Field to sort org groups by.
+ class OrgGroupSortOption
+ include BaseEnumModel
+
+ NAME = "name".freeze
+ MINUS_NAME = "-name".freeze
+ UUID = "uuid".freeze
+ MINUS_UUID = "-uuid".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_type.rb b/lib/datadog_api_client/v2/models/org_group_type.rb
new file mode 100644
index 000000000000..4e34d1e796fb
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_type.rb
@@ -0,0 +1,26 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Org groups resource type.
+ class OrgGroupType
+ include BaseEnumModel
+
+ ORG_GROUPS = "org_groups".freeze
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_update_attributes.rb b/lib/datadog_api_client/v2/models/org_group_update_attributes.rb
new file mode 100644
index 000000000000..1360d0771a97
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_update_attributes.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Attributes for updating an org group.
+ class OrgGroupUpdateAttributes
+ include BaseGenericModel
+
+ # The name of the org group.
+ attr_reader :name
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'name' => :'name'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'name' => :'String'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupUpdateAttributes` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @name.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param name [Object] Object to be assigned
+ # @!visibility private
+ def name=(name)
+ if name.nil?
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
+ end
+ @name = name
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ name == o.name &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [name, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_update_data.rb b/lib/datadog_api_client/v2/models/org_group_update_data.rb
new file mode 100644
index 000000000000..e07b65b97ae4
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_update_data.rb
@@ -0,0 +1,165 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Data for updating an org group.
+ class OrgGroupUpdateData
+ include BaseGenericModel
+
+ # Attributes for updating an org group.
+ attr_reader :attributes
+
+ # The ID of the org group.
+ attr_reader :id
+
+ # Org groups resource type.
+ attr_reader :type
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'attributes' => :'attributes',
+ :'id' => :'id',
+ :'type' => :'type'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'attributes' => :'OrgGroupUpdateAttributes',
+ :'id' => :'UUID',
+ :'type' => :'OrgGroupType'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupUpdateData` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'attributes')
+ self.attributes = attributes[:'attributes']
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @attributes.nil?
+ return false if @id.nil?
+ return false if @type.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param attributes [Object] Object to be assigned
+ # @!visibility private
+ def attributes=(attributes)
+ if attributes.nil?
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
+ end
+ @attributes = attributes
+ end
+
+ # Custom attribute writer method with validation
+ # @param id [Object] Object to be assigned
+ # @!visibility private
+ def id=(id)
+ if id.nil?
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
+ end
+ @id = id
+ end
+
+ # Custom attribute writer method with validation
+ # @param type [Object] Object to be assigned
+ # @!visibility private
+ def type=(type)
+ if type.nil?
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
+ end
+ @type = type
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ attributes == o.attributes &&
+ id == o.id &&
+ type == o.type &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [attributes, id, type, additional_properties].hash
+ end
+ end
+end
diff --git a/lib/datadog_api_client/v2/models/org_group_update_request.rb b/lib/datadog_api_client/v2/models/org_group_update_request.rb
new file mode 100644
index 000000000000..e100e41dbbe5
--- /dev/null
+++ b/lib/datadog_api_client/v2/models/org_group_update_request.rb
@@ -0,0 +1,123 @@
+=begin
+#Datadog API V2 Collection
+
+#Collection of all Datadog Public endpoints.
+
+The version of the OpenAPI document: 1.0
+Contact: support@datadoghq.com
+Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
+
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
+ Copyright 2020-Present Datadog, Inc.
+
+=end
+
+require 'date'
+require 'time'
+
+module DatadogAPIClient::V2
+ # Request to update an org group.
+ class OrgGroupUpdateRequest
+ include BaseGenericModel
+
+ # Data for updating an org group.
+ attr_reader :data
+
+ attr_accessor :additional_properties
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ # @!visibility private
+ def self.attribute_map
+ {
+ :'data' => :'data'
+ }
+ end
+
+ # Attribute type mapping.
+ # @!visibility private
+ def self.openapi_types
+ {
+ :'data' => :'OrgGroupUpdateData'
+ }
+ end
+
+ # Initializes the object
+ # @param attributes [Hash] Model attributes in the form of hash
+ # @!visibility private
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgGroupUpdateRequest` initialize method"
+ end
+
+ self.additional_properties = {}
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ self.additional_properties[k.to_sym] = v
+ else
+ h[k.to_sym] = v
+ end
+ }
+
+ if attributes.key?(:'data')
+ self.data = attributes[:'data']
+ end
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ # @!visibility private
+ def valid?
+ return false if @data.nil?
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param data [Object] Object to be assigned
+ # @!visibility private
+ def data=(data)
+ if data.nil?
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
+ end
+ @data = data
+ end
+
+ # Returns the object in the form of hash, with additionalProperties support.
+ # @return [Hash] Returns the object in the form of hash
+ # @!visibility private
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ self.additional_properties.each_pair do |attr, value|
+ hash[attr] = value
+ end
+ hash
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param o [Object] Object to be compared
+ # @!visibility private
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ additional_properties == o.additional_properties
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ # @!visibility private
+ def hash
+ [data, additional_properties].hash
+ end
+ end
+end