diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f48f496978..d40e489dc6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -681,15 +681,6 @@ components: schema: example: monitor_timezone type: string - OrgConnectionId: - description: The unique identifier of the org connection. - in: path - name: connection_id - required: true - schema: - example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a - format: uuid - type: string PageNumber: description: Specific page number to return. in: query @@ -30903,255 +30894,6 @@ components: required: - data type: object - OrgConnection: - description: An org connection. - properties: - attributes: - $ref: '#/components/schemas/OrgConnectionAttributes' - id: - description: The unique identifier of the org connection. - example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a - format: uuid - type: string - relationships: - $ref: '#/components/schemas/OrgConnectionRelationships' - type: - $ref: '#/components/schemas/OrgConnectionType' - required: - - id - - type - - attributes - - relationships - type: object - OrgConnectionAttributes: - description: Org connection attributes. - properties: - connection_types: - description: List of connection types. - example: - - logs - - metrics - items: - $ref: '#/components/schemas/OrgConnectionTypeEnum' - type: array - created_at: - description: Timestamp when the connection was created. - example: '2023-01-01T12:00:00Z' - format: date-time - type: string - required: - - connection_types - - created_at - type: object - OrgConnectionCreate: - description: Org connection creation data. - properties: - attributes: - $ref: '#/components/schemas/OrgConnectionCreateAttributes' - relationships: - $ref: '#/components/schemas/OrgConnectionCreateRelationships' - type: - $ref: '#/components/schemas/OrgConnectionType' - required: - - type - - attributes - - relationships - type: object - OrgConnectionCreateAttributes: - description: Attributes for creating an org connection. - properties: - connection_types: - description: List of connection types to establish. - example: - - logs - items: - $ref: '#/components/schemas/OrgConnectionTypeEnum' - minItems: 1 - type: array - required: - - connection_types - type: object - OrgConnectionCreateRelationships: - description: Relationships for org connection creation. - properties: - sink_org: - $ref: '#/components/schemas/OrgConnectionOrgRelationship' - required: - - sink_org - type: object - OrgConnectionCreateRequest: - description: Request to create an org connection. - properties: - data: - $ref: '#/components/schemas/OrgConnectionCreate' - required: - - data - type: object - OrgConnectionListResponse: - description: Response containing a list of org connections. - properties: - data: - description: List of org connections. - items: - $ref: '#/components/schemas/OrgConnection' - type: array - meta: - $ref: '#/components/schemas/OrgConnectionListResponseMeta' - required: - - data - type: object - OrgConnectionListResponseMeta: - description: Pagination metadata. - properties: - page: - $ref: '#/components/schemas/OrgConnectionListResponseMetaPage' - type: object - OrgConnectionListResponseMetaPage: - description: Page information. - properties: - total_count: - description: Total number of org connections. - example: 0 - format: int64 - type: integer - total_filtered_count: - description: Total number of org connections matching the filter. - example: 0 - format: int64 - type: integer - type: object - OrgConnectionOrgRelationship: - description: Org relationship. - properties: - data: - $ref: '#/components/schemas/OrgConnectionOrgRelationshipData' - type: object - OrgConnectionOrgRelationshipData: - description: The definition of `OrgConnectionOrgRelationshipData` object. - properties: - id: - description: Org UUID. - example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a - type: string - name: - description: Org name. - example: Example Org - type: string - type: - $ref: '#/components/schemas/OrgConnectionOrgRelationshipDataType' - type: object - OrgConnectionOrgRelationshipDataType: - description: The type of the organization relationship. - enum: - - orgs - example: orgs - type: string - x-enum-varnames: - - ORGS - OrgConnectionRelationships: - description: Related organizations and user. - properties: - created_by: - $ref: '#/components/schemas/OrgConnectionUserRelationship' - sink_org: - $ref: '#/components/schemas/OrgConnectionOrgRelationship' - source_org: - $ref: '#/components/schemas/OrgConnectionOrgRelationship' - type: object - OrgConnectionResponse: - description: Response containing a single org connection. - properties: - data: - $ref: '#/components/schemas/OrgConnection' - required: - - data - type: object - OrgConnectionType: - description: Org connection type. - enum: - - org_connection - example: org_connection - type: string - x-enum-varnames: - - ORG_CONNECTION - OrgConnectionTypeEnum: - description: Available connection types between organizations. - enum: - - logs - - metrics - example: logs - type: string - x-enum-varnames: - - LOGS - - METRICS - OrgConnectionUpdate: - description: Org connection update data. - properties: - attributes: - $ref: '#/components/schemas/OrgConnectionUpdateAttributes' - id: - description: The unique identifier of the org connection. - example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a - format: uuid - type: string - type: - $ref: '#/components/schemas/OrgConnectionType' - required: - - type - - id - - attributes - type: object - OrgConnectionUpdateAttributes: - description: Attributes for updating an org connection. - properties: - connection_types: - description: Updated list of connection types. - example: - - logs - - metrics - items: - $ref: '#/components/schemas/OrgConnectionTypeEnum' - minItems: 1 - type: array - required: - - connection_types - type: object - OrgConnectionUpdateRequest: - description: Request to update an org connection. - properties: - data: - $ref: '#/components/schemas/OrgConnectionUpdate' - required: - - data - type: object - OrgConnectionUserRelationship: - description: User relationship. - properties: - data: - $ref: '#/components/schemas/OrgConnectionUserRelationshipData' - type: object - OrgConnectionUserRelationshipData: - description: The data for a user relationship. - properties: - id: - description: User UUID. - example: usr123abc456 - type: string - name: - description: User name. - example: John Doe - type: string - type: - $ref: '#/components/schemas/OrgConnectionUserRelationshipDataType' - type: object - OrgConnectionUserRelationshipDataType: - description: The type of the user relationship. - enum: - - users - example: users - type: string - x-enum-varnames: - - USERS Organization: description: Organization object. properties: @@ -45984,8 +45726,6 @@ components: is not required to set downtimes. monitors_read: View monitors. monitors_write: Edit, delete, and resolve individual monitors. - org_connections_read: Read cross organization connections. - org_connections_write: Create, edit, and delete cross organization connections. org_management: Edit org configurations, including authentication and certain security preferences such as configuring SAML, renaming an org, configuring allowed login methods, creating child orgs, subscribing @@ -59224,148 +58964,6 @@ paths: operator: OR permissions: - org_management - /api/v2/org_connections: - get: - description: Returns a list of org connections. - operationId: ListOrgConnections - responses: - '200': - content: - application/json: - schema: - $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' - '401': - $ref: '#/components/responses/UnauthorizedResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '409': - $ref: '#/components/responses/ConflictResponse' - '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 - x-permission: - operator: OR - permissions: - - org_connections_write - /api/v2/org_connections/{connection_id}: - delete: - description: Delete an existing org connection. - operationId: DeleteOrgConnections - parameters: - - $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/OrgConnectionResponse' - 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: Update Org Connection - tags: - - Org Connections - x-permission: - operator: OR - permissions: - - org_connections_write /api/v2/permissions: get: description: Returns a list of all permissions, including name, description, @@ -69735,11 +69333,6 @@ tags: externalDocs: url: https://docs.datadoghq.com/api/latest/opsgenie-integration name: Opsgenie Integration -- 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: Create, edit, and manage your organizations. Read more about [multi-org accounts](https://docs.datadoghq.com/account_management/multi_organization). externalDocs: diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 17b9388bd1..503ed65d6b 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -347,13 +347,6 @@ datadog\_api\_client.v2.api.opsgenie\_integration\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.org\_connections\_api module --------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.api.org_connections_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.organizations\_api module ----------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 1a90183ebd..5d21e8bf53 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -13661,160 +13661,6 @@ datadog\_api\_client.v2.model.org\_config\_write\_request module :members: :show-inheritance: -datadog\_api\_client.v2.model.org\_connection module ----------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_attributes module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_create module ------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_create - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_create\_attributes module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_create_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_create\_relationships module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_create_relationships - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_create\_request module ---------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_create_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_list\_response module --------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_list_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_list\_response\_meta module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_list_response_meta - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_list\_response\_meta\_page module --------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_list_response_meta_page - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_org\_relationship module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.org_connection_org_relationship - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_org\_relationship\_data module ------------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.org_connection_org_relationship_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_org\_relationship\_data\_type module ------------------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.org_connection_org_relationship_data_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_relationships module -------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_relationships - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_response module --------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_type module ----------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_type\_enum module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_type_enum - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_update module ------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_update - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_update\_attributes module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_update_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_update\_request module ---------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_update_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_user\_relationship module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_user_relationship - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_user\_relationship\_data module ------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_user_relationship_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.org\_connection\_user\_relationship\_data\_type module ------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_connection_user_relationship_data_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.organization module ------------------------------------------------- diff --git a/examples/v2/org-connections/CreateOrgConnections.py b/examples/v2/org-connections/CreateOrgConnections.py deleted file mode 100644 index 818b88e6b8..0000000000 --- a/examples/v2/org-connections/CreateOrgConnections.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Create Org Connection returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.org_connections_api import OrgConnectionsApi -from datadog_api_client.v2.model.org_connection_create import OrgConnectionCreate -from datadog_api_client.v2.model.org_connection_create_attributes import OrgConnectionCreateAttributes -from datadog_api_client.v2.model.org_connection_create_relationships import OrgConnectionCreateRelationships -from datadog_api_client.v2.model.org_connection_create_request import OrgConnectionCreateRequest -from datadog_api_client.v2.model.org_connection_org_relationship import OrgConnectionOrgRelationship -from datadog_api_client.v2.model.org_connection_org_relationship_data import OrgConnectionOrgRelationshipData -from datadog_api_client.v2.model.org_connection_org_relationship_data_type import OrgConnectionOrgRelationshipDataType -from datadog_api_client.v2.model.org_connection_type import OrgConnectionType -from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - -body = OrgConnectionCreateRequest( - data=OrgConnectionCreate( - type=OrgConnectionType.ORG_CONNECTION, - relationships=OrgConnectionCreateRelationships( - sink_org=OrgConnectionOrgRelationship( - data=OrgConnectionOrgRelationshipData( - type=OrgConnectionOrgRelationshipDataType.ORGS, - id="83999dcd-7f97-11f0-8de1-1ecf66f1aa85", - ), - ), - ), - attributes=OrgConnectionCreateAttributes( - connection_types=[ - OrgConnectionTypeEnum.LOGS, - ], - ), - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OrgConnectionsApi(api_client) - response = api_instance.create_org_connections(body=body) - - print(response) diff --git a/examples/v2/org-connections/DeleteOrgConnections.py b/examples/v2/org-connections/DeleteOrgConnections.py deleted file mode 100644 index 058038b6b3..0000000000 --- a/examples/v2/org-connections/DeleteOrgConnections.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Delete Org Connection returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.org_connections_api import OrgConnectionsApi - -# there is a valid "org_connection" in the system -ORG_CONNECTION_DATA_ID = environ["ORG_CONNECTION_DATA_ID"] - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OrgConnectionsApi(api_client) - api_instance.delete_org_connections( - connection_id=ORG_CONNECTION_DATA_ID, - ) diff --git a/examples/v2/org-connections/ListOrgConnections.py b/examples/v2/org-connections/ListOrgConnections.py deleted file mode 100644 index f3a4b6adbb..0000000000 --- a/examples/v2/org-connections/ListOrgConnections.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -List Org Connections returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.org_connections_api import OrgConnectionsApi - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OrgConnectionsApi(api_client) - response = api_instance.list_org_connections() - - print(response) diff --git a/examples/v2/org-connections/UpdateOrgConnections.py b/examples/v2/org-connections/UpdateOrgConnections.py deleted file mode 100644 index b4f356d3ad..0000000000 --- a/examples/v2/org-connections/UpdateOrgConnections.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Update Org Connection returns "OK" response -""" - -from os import environ -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.org_connections_api import OrgConnectionsApi -from datadog_api_client.v2.model.org_connection_type import OrgConnectionType -from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum -from datadog_api_client.v2.model.org_connection_update import OrgConnectionUpdate -from datadog_api_client.v2.model.org_connection_update_attributes import OrgConnectionUpdateAttributes -from datadog_api_client.v2.model.org_connection_update_request import OrgConnectionUpdateRequest - -# there is a valid "org_connection" in the system -ORG_CONNECTION_DATA_ID = environ["ORG_CONNECTION_DATA_ID"] - -body = OrgConnectionUpdateRequest( - data=OrgConnectionUpdate( - type=OrgConnectionType.ORG_CONNECTION, - id=ORG_CONNECTION_DATA_ID, - attributes=OrgConnectionUpdateAttributes( - connection_types=[ - OrgConnectionTypeEnum.LOGS, - OrgConnectionTypeEnum.METRICS, - ], - ), - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = OrgConnectionsApi(api_client) - response = api_instance.update_org_connections(connection_id=ORG_CONNECTION_DATA_ID, body=body) - - print(response) diff --git a/src/datadog_api_client/v2/api/org_connections_api.py b/src/datadog_api_client/v2/api/org_connections_api.py deleted file mode 100644 index 9f1a86c71e..0000000000 --- a/src/datadog_api_client/v2/api/org_connections_api.py +++ /dev/null @@ -1,178 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Any, Dict - -from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint -from datadog_api_client.configuration import Configuration -from datadog_api_client.model_utils import ( - UUID, -) -from datadog_api_client.v2.model.org_connection_list_response import OrgConnectionListResponse -from datadog_api_client.v2.model.org_connection_response import OrgConnectionResponse -from datadog_api_client.v2.model.org_connection_create_request import OrgConnectionCreateRequest -from datadog_api_client.v2.model.org_connection_update_request import OrgConnectionUpdateRequest - - -class OrgConnectionsApi: - """ - Manage connections between organizations. Org connections allow for controlled sharing of data between different Datadog organizations. See the `Cross-Organization Visibiltiy `_ page for more information. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._create_org_connections_endpoint = _Endpoint( - settings={ - "response_type": (OrgConnectionResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/org_connections", - "operation_id": "create_org_connections", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "body": { - "required": True, - "openapi_types": (OrgConnectionCreateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._delete_org_connections_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/org_connections/{connection_id}", - "operation_id": "delete_org_connections", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "connection_id": { - "required": True, - "openapi_types": (UUID,), - "attribute": "connection_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - - self._list_org_connections_endpoint = _Endpoint( - settings={ - "response_type": (OrgConnectionListResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/org_connections", - "operation_id": "list_org_connections", - "http_method": "GET", - "version": "v2", - }, - params_map={}, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._update_org_connections_endpoint = _Endpoint( - settings={ - "response_type": (OrgConnectionResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/org_connections/{connection_id}", - "operation_id": "update_org_connections", - "http_method": "PATCH", - "version": "v2", - }, - params_map={ - "connection_id": { - "required": True, - "openapi_types": (UUID,), - "attribute": "connection_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (OrgConnectionUpdateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - def create_org_connections( - self, - body: OrgConnectionCreateRequest, - ) -> OrgConnectionResponse: - """Create Org Connection. - - Create a new org connection between the current org and a target org. - - :type body: OrgConnectionCreateRequest - :rtype: OrgConnectionResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["body"] = body - - return self._create_org_connections_endpoint.call_with_http_info(**kwargs) - - def delete_org_connections( - self, - connection_id: UUID, - ) -> None: - """Delete Org Connection. - - Delete an existing org connection. - - :param connection_id: The unique identifier of the org connection. - :type connection_id: UUID - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["connection_id"] = connection_id - - return self._delete_org_connections_endpoint.call_with_http_info(**kwargs) - - def list_org_connections( - self, - ) -> OrgConnectionListResponse: - """List Org Connections. - - Returns a list of org connections. - - :rtype: OrgConnectionListResponse - """ - kwargs: Dict[str, Any] = {} - return self._list_org_connections_endpoint.call_with_http_info(**kwargs) - - def update_org_connections( - self, - connection_id: UUID, - body: OrgConnectionUpdateRequest, - ) -> OrgConnectionResponse: - """Update Org Connection. - - Update an existing org connection. - - :param connection_id: The unique identifier of the org connection. - :type connection_id: UUID - :type body: OrgConnectionUpdateRequest - :rtype: OrgConnectionResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["connection_id"] = connection_id - - kwargs["body"] = body - - return self._update_org_connections_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 95dc49b08d..30a5f51bd2 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -47,7 +47,6 @@ from datadog_api_client.v2.api.on_call_api import OnCallApi from datadog_api_client.v2.api.on_call_paging_api import OnCallPagingApi from datadog_api_client.v2.api.opsgenie_integration_api import OpsgenieIntegrationApi -from datadog_api_client.v2.api.org_connections_api import OrgConnectionsApi from datadog_api_client.v2.api.organizations_api import OrganizationsApi from datadog_api_client.v2.api.powerpack_api import PowerpackApi from datadog_api_client.v2.api.processes_api import ProcessesApi @@ -123,7 +122,6 @@ "OnCallApi", "OnCallPagingApi", "OpsgenieIntegrationApi", - "OrgConnectionsApi", "OrganizationsApi", "PowerpackApi", "ProcessesApi", diff --git a/src/datadog_api_client/v2/model/org_connection.py b/src/datadog_api_client/v2/model/org_connection.py deleted file mode 100644 index 84bc0566e8..0000000000 --- a/src/datadog_api_client/v2/model/org_connection.py +++ /dev/null @@ -1,70 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_attributes import OrgConnectionAttributes - from datadog_api_client.v2.model.org_connection_relationships import OrgConnectionRelationships - from datadog_api_client.v2.model.org_connection_type import OrgConnectionType - - -class OrgConnection(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_attributes import OrgConnectionAttributes - from datadog_api_client.v2.model.org_connection_relationships import OrgConnectionRelationships - from datadog_api_client.v2.model.org_connection_type import OrgConnectionType - - return { - "attributes": (OrgConnectionAttributes,), - "id": (UUID,), - "relationships": (OrgConnectionRelationships,), - "type": (OrgConnectionType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "relationships": "relationships", - "type": "type", - } - - def __init__( - self_, - attributes: OrgConnectionAttributes, - id: UUID, - relationships: OrgConnectionRelationships, - type: OrgConnectionType, - **kwargs, - ): - """ - An org connection. - - :param attributes: Org connection attributes. - :type attributes: OrgConnectionAttributes - - :param id: The unique identifier of the org connection. - :type id: UUID - - :param relationships: Related organizations and user. - :type relationships: OrgConnectionRelationships - - :param type: Org connection type. - :type type: OrgConnectionType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.relationships = relationships - self_.type = type diff --git a/src/datadog_api_client/v2/model/org_connection_attributes.py b/src/datadog_api_client/v2/model/org_connection_attributes.py deleted file mode 100644 index 1db1c43b53..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_attributes.py +++ /dev/null @@ -1,47 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - datetime, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - - -class OrgConnectionAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - - return { - "connection_types": ([OrgConnectionTypeEnum],), - "created_at": (datetime,), - } - - attribute_map = { - "connection_types": "connection_types", - "created_at": "created_at", - } - - def __init__(self_, connection_types: List[OrgConnectionTypeEnum], created_at: datetime, **kwargs): - """ - Org connection attributes. - - :param connection_types: List of connection types. - :type connection_types: [OrgConnectionTypeEnum] - - :param created_at: Timestamp when the connection was created. - :type created_at: datetime - """ - super().__init__(kwargs) - - self_.connection_types = connection_types - self_.created_at = created_at diff --git a/src/datadog_api_client/v2/model/org_connection_create.py b/src/datadog_api_client/v2/model/org_connection_create.py deleted file mode 100644 index 6780145cb1..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_create.py +++ /dev/null @@ -1,62 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_create_attributes import OrgConnectionCreateAttributes - from datadog_api_client.v2.model.org_connection_create_relationships import OrgConnectionCreateRelationships - from datadog_api_client.v2.model.org_connection_type import OrgConnectionType - - -class OrgConnectionCreate(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_create_attributes import OrgConnectionCreateAttributes - from datadog_api_client.v2.model.org_connection_create_relationships import OrgConnectionCreateRelationships - from datadog_api_client.v2.model.org_connection_type import OrgConnectionType - - return { - "attributes": (OrgConnectionCreateAttributes,), - "relationships": (OrgConnectionCreateRelationships,), - "type": (OrgConnectionType,), - } - - attribute_map = { - "attributes": "attributes", - "relationships": "relationships", - "type": "type", - } - - def __init__( - self_, - attributes: OrgConnectionCreateAttributes, - relationships: OrgConnectionCreateRelationships, - type: OrgConnectionType, - **kwargs, - ): - """ - Org connection creation data. - - :param attributes: Attributes for creating an org connection. - :type attributes: OrgConnectionCreateAttributes - - :param relationships: Relationships for org connection creation. - :type relationships: OrgConnectionCreateRelationships - - :param type: Org connection type. - :type type: OrgConnectionType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.relationships = relationships - self_.type = type diff --git a/src/datadog_api_client/v2/model/org_connection_create_attributes.py b/src/datadog_api_client/v2/model/org_connection_create_attributes.py deleted file mode 100644 index d98d5bb626..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_create_attributes.py +++ /dev/null @@ -1,46 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - - -class OrgConnectionCreateAttributes(ModelNormal): - validations = { - "connection_types": { - "min_items": 1, - }, - } - - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - - return { - "connection_types": ([OrgConnectionTypeEnum],), - } - - attribute_map = { - "connection_types": "connection_types", - } - - def __init__(self_, connection_types: List[OrgConnectionTypeEnum], **kwargs): - """ - Attributes for creating an org connection. - - :param connection_types: List of connection types to establish. - :type connection_types: [OrgConnectionTypeEnum] - """ - super().__init__(kwargs) - - self_.connection_types = connection_types diff --git a/src/datadog_api_client/v2/model/org_connection_create_relationships.py b/src/datadog_api_client/v2/model/org_connection_create_relationships.py deleted file mode 100644 index 657d61fbb5..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_create_relationships.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_org_relationship import OrgConnectionOrgRelationship - - -class OrgConnectionCreateRelationships(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_org_relationship import OrgConnectionOrgRelationship - - return { - "sink_org": (OrgConnectionOrgRelationship,), - } - - attribute_map = { - "sink_org": "sink_org", - } - - def __init__(self_, sink_org: OrgConnectionOrgRelationship, **kwargs): - """ - Relationships for org connection creation. - - :param sink_org: Org relationship. - :type sink_org: OrgConnectionOrgRelationship - """ - super().__init__(kwargs) - - self_.sink_org = sink_org diff --git a/src/datadog_api_client/v2/model/org_connection_create_request.py b/src/datadog_api_client/v2/model/org_connection_create_request.py deleted file mode 100644 index 9b929329d3..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_create_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_create import OrgConnectionCreate - - -class OrgConnectionCreateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_create import OrgConnectionCreate - - return { - "data": (OrgConnectionCreate,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: OrgConnectionCreate, **kwargs): - """ - Request to create an org connection. - - :param data: Org connection creation data. - :type data: OrgConnectionCreate - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/org_connection_list_response.py b/src/datadog_api_client/v2/model/org_connection_list_response.py deleted file mode 100644 index e777963edb..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_list_response.py +++ /dev/null @@ -1,53 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection import OrgConnection - from datadog_api_client.v2.model.org_connection_list_response_meta import OrgConnectionListResponseMeta - - -class OrgConnectionListResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection import OrgConnection - from datadog_api_client.v2.model.org_connection_list_response_meta import OrgConnectionListResponseMeta - - return { - "data": ([OrgConnection],), - "meta": (OrgConnectionListResponseMeta,), - } - - attribute_map = { - "data": "data", - "meta": "meta", - } - - def __init__( - self_, data: List[OrgConnection], meta: Union[OrgConnectionListResponseMeta, UnsetType] = unset, **kwargs - ): - """ - Response containing a list of org connections. - - :param data: List of org connections. - :type data: [OrgConnection] - - :param meta: Pagination metadata. - :type meta: OrgConnectionListResponseMeta, optional - """ - if meta is not unset: - kwargs["meta"] = meta - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/org_connection_list_response_meta.py b/src/datadog_api_client/v2/model/org_connection_list_response_meta.py deleted file mode 100644 index 2a7c7e5f50..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_list_response_meta.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_list_response_meta_page import OrgConnectionListResponseMetaPage - - -class OrgConnectionListResponseMeta(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_list_response_meta_page import OrgConnectionListResponseMetaPage - - return { - "page": (OrgConnectionListResponseMetaPage,), - } - - attribute_map = { - "page": "page", - } - - def __init__(self_, page: Union[OrgConnectionListResponseMetaPage, UnsetType] = unset, **kwargs): - """ - Pagination metadata. - - :param page: Page information. - :type page: OrgConnectionListResponseMetaPage, optional - """ - if page is not unset: - kwargs["page"] = page - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_list_response_meta_page.py b/src/datadog_api_client/v2/model/org_connection_list_response_meta_page.py deleted file mode 100644 index 00bc849641..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_list_response_meta_page.py +++ /dev/null @@ -1,45 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class OrgConnectionListResponseMetaPage(ModelNormal): - @cached_property - def openapi_types(_): - return { - "total_count": (int,), - "total_filtered_count": (int,), - } - - attribute_map = { - "total_count": "total_count", - "total_filtered_count": "total_filtered_count", - } - - def __init__( - self_, total_count: Union[int, UnsetType] = unset, total_filtered_count: Union[int, UnsetType] = unset, **kwargs - ): - """ - Page information. - - :param total_count: Total number of org connections. - :type total_count: int, optional - - :param total_filtered_count: Total number of org connections matching the filter. - :type total_filtered_count: int, optional - """ - if total_count is not unset: - kwargs["total_count"] = total_count - if total_filtered_count is not unset: - kwargs["total_filtered_count"] = total_filtered_count - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_org_relationship.py b/src/datadog_api_client/v2/model/org_connection_org_relationship.py deleted file mode 100644 index 2d9e89331e..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_org_relationship.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_org_relationship_data import OrgConnectionOrgRelationshipData - - -class OrgConnectionOrgRelationship(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_org_relationship_data import OrgConnectionOrgRelationshipData - - return { - "data": (OrgConnectionOrgRelationshipData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[OrgConnectionOrgRelationshipData, UnsetType] = unset, **kwargs): - """ - Org relationship. - - :param data: The definition of ``OrgConnectionOrgRelationshipData`` object. - :type data: OrgConnectionOrgRelationshipData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_org_relationship_data.py b/src/datadog_api_client/v2/model/org_connection_org_relationship_data.py deleted file mode 100644 index 04ae96f422..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_org_relationship_data.py +++ /dev/null @@ -1,66 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_org_relationship_data_type import ( - OrgConnectionOrgRelationshipDataType, - ) - - -class OrgConnectionOrgRelationshipData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_org_relationship_data_type import ( - OrgConnectionOrgRelationshipDataType, - ) - - return { - "id": (str,), - "name": (str,), - "type": (OrgConnectionOrgRelationshipDataType,), - } - - attribute_map = { - "id": "id", - "name": "name", - "type": "type", - } - - def __init__( - self_, - id: Union[str, UnsetType] = unset, - name: Union[str, UnsetType] = unset, - type: Union[OrgConnectionOrgRelationshipDataType, UnsetType] = unset, - **kwargs, - ): - """ - The definition of ``OrgConnectionOrgRelationshipData`` object. - - :param id: Org UUID. - :type id: str, optional - - :param name: Org name. - :type name: str, optional - - :param type: The type of the organization relationship. - :type type: OrgConnectionOrgRelationshipDataType, optional - """ - if id is not unset: - kwargs["id"] = id - if name is not unset: - kwargs["name"] = name - if type is not unset: - kwargs["type"] = type - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_org_relationship_data_type.py b/src/datadog_api_client/v2/model/org_connection_org_relationship_data_type.py deleted file mode 100644 index aab3921017..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_org_relationship_data_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OrgConnectionOrgRelationshipDataType(ModelSimple): - """ - The type of the organization relationship. - - :param value: If omitted defaults to "orgs". Must be one of ["orgs"]. - :type value: str - """ - - allowed_values = { - "orgs", - } - ORGS: ClassVar["OrgConnectionOrgRelationshipDataType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OrgConnectionOrgRelationshipDataType.ORGS = OrgConnectionOrgRelationshipDataType("orgs") diff --git a/src/datadog_api_client/v2/model/org_connection_relationships.py b/src/datadog_api_client/v2/model/org_connection_relationships.py deleted file mode 100644 index 5f4803dcac..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_relationships.py +++ /dev/null @@ -1,64 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_user_relationship import OrgConnectionUserRelationship - from datadog_api_client.v2.model.org_connection_org_relationship import OrgConnectionOrgRelationship - - -class OrgConnectionRelationships(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_user_relationship import OrgConnectionUserRelationship - from datadog_api_client.v2.model.org_connection_org_relationship import OrgConnectionOrgRelationship - - return { - "created_by": (OrgConnectionUserRelationship,), - "sink_org": (OrgConnectionOrgRelationship,), - "source_org": (OrgConnectionOrgRelationship,), - } - - attribute_map = { - "created_by": "created_by", - "sink_org": "sink_org", - "source_org": "source_org", - } - - def __init__( - self_, - created_by: Union[OrgConnectionUserRelationship, UnsetType] = unset, - sink_org: Union[OrgConnectionOrgRelationship, UnsetType] = unset, - source_org: Union[OrgConnectionOrgRelationship, UnsetType] = unset, - **kwargs, - ): - """ - Related organizations and user. - - :param created_by: User relationship. - :type created_by: OrgConnectionUserRelationship, optional - - :param sink_org: Org relationship. - :type sink_org: OrgConnectionOrgRelationship, optional - - :param source_org: Org relationship. - :type source_org: OrgConnectionOrgRelationship, optional - """ - if created_by is not unset: - kwargs["created_by"] = created_by - if sink_org is not unset: - kwargs["sink_org"] = sink_org - if source_org is not unset: - kwargs["source_org"] = source_org - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_response.py b/src/datadog_api_client/v2/model/org_connection_response.py deleted file mode 100644 index c70f4c4654..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection import OrgConnection - - -class OrgConnectionResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection import OrgConnection - - return { - "data": (OrgConnection,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: OrgConnection, **kwargs): - """ - Response containing a single org connection. - - :param data: An org connection. - :type data: OrgConnection - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/org_connection_type.py b/src/datadog_api_client/v2/model/org_connection_type.py deleted file mode 100644 index cef66f0011..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OrgConnectionType(ModelSimple): - """ - Org connection type. - - :param value: If omitted defaults to "org_connection". Must be one of ["org_connection"]. - :type value: str - """ - - allowed_values = { - "org_connection", - } - ORG_CONNECTION: ClassVar["OrgConnectionType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OrgConnectionType.ORG_CONNECTION = OrgConnectionType("org_connection") diff --git a/src/datadog_api_client/v2/model/org_connection_type_enum.py b/src/datadog_api_client/v2/model/org_connection_type_enum.py deleted file mode 100644 index 4715b7fa2c..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_type_enum.py +++ /dev/null @@ -1,38 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OrgConnectionTypeEnum(ModelSimple): - """ - Available connection types between organizations. - - :param value: Must be one of ["logs", "metrics"]. - :type value: str - """ - - allowed_values = { - "logs", - "metrics", - } - LOGS: ClassVar["OrgConnectionTypeEnum"] - METRICS: ClassVar["OrgConnectionTypeEnum"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OrgConnectionTypeEnum.LOGS = OrgConnectionTypeEnum("logs") -OrgConnectionTypeEnum.METRICS = OrgConnectionTypeEnum("metrics") diff --git a/src/datadog_api_client/v2/model/org_connection_update.py b/src/datadog_api_client/v2/model/org_connection_update.py deleted file mode 100644 index e0349af779..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_update.py +++ /dev/null @@ -1,55 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_update_attributes import OrgConnectionUpdateAttributes - from datadog_api_client.v2.model.org_connection_type import OrgConnectionType - - -class OrgConnectionUpdate(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_update_attributes import OrgConnectionUpdateAttributes - from datadog_api_client.v2.model.org_connection_type import OrgConnectionType - - return { - "attributes": (OrgConnectionUpdateAttributes,), - "id": (UUID,), - "type": (OrgConnectionType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__(self_, attributes: OrgConnectionUpdateAttributes, id: UUID, type: OrgConnectionType, **kwargs): - """ - Org connection update data. - - :param attributes: Attributes for updating an org connection. - :type attributes: OrgConnectionUpdateAttributes - - :param id: The unique identifier of the org connection. - :type id: UUID - - :param type: Org connection type. - :type type: OrgConnectionType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/org_connection_update_attributes.py b/src/datadog_api_client/v2/model/org_connection_update_attributes.py deleted file mode 100644 index 42a8726fff..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_update_attributes.py +++ /dev/null @@ -1,46 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - - -class OrgConnectionUpdateAttributes(ModelNormal): - validations = { - "connection_types": { - "min_items": 1, - }, - } - - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum - - return { - "connection_types": ([OrgConnectionTypeEnum],), - } - - attribute_map = { - "connection_types": "connection_types", - } - - def __init__(self_, connection_types: List[OrgConnectionTypeEnum], **kwargs): - """ - Attributes for updating an org connection. - - :param connection_types: Updated list of connection types. - :type connection_types: [OrgConnectionTypeEnum] - """ - super().__init__(kwargs) - - self_.connection_types = connection_types diff --git a/src/datadog_api_client/v2/model/org_connection_update_request.py b/src/datadog_api_client/v2/model/org_connection_update_request.py deleted file mode 100644 index bf117eb6a5..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_update_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_update import OrgConnectionUpdate - - -class OrgConnectionUpdateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_update import OrgConnectionUpdate - - return { - "data": (OrgConnectionUpdate,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: OrgConnectionUpdate, **kwargs): - """ - Request to update an org connection. - - :param data: Org connection update data. - :type data: OrgConnectionUpdate - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/org_connection_user_relationship.py b/src/datadog_api_client/v2/model/org_connection_user_relationship.py deleted file mode 100644 index a67c982275..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_user_relationship.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_user_relationship_data import OrgConnectionUserRelationshipData - - -class OrgConnectionUserRelationship(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_user_relationship_data import OrgConnectionUserRelationshipData - - return { - "data": (OrgConnectionUserRelationshipData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: Union[OrgConnectionUserRelationshipData, UnsetType] = unset, **kwargs): - """ - User relationship. - - :param data: The data for a user relationship. - :type data: OrgConnectionUserRelationshipData, optional - """ - if data is not unset: - kwargs["data"] = data - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_user_relationship_data.py b/src/datadog_api_client/v2/model/org_connection_user_relationship_data.py deleted file mode 100644 index c74c1a84a0..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_user_relationship_data.py +++ /dev/null @@ -1,66 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_connection_user_relationship_data_type import ( - OrgConnectionUserRelationshipDataType, - ) - - -class OrgConnectionUserRelationshipData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.org_connection_user_relationship_data_type import ( - OrgConnectionUserRelationshipDataType, - ) - - return { - "id": (str,), - "name": (str,), - "type": (OrgConnectionUserRelationshipDataType,), - } - - attribute_map = { - "id": "id", - "name": "name", - "type": "type", - } - - def __init__( - self_, - id: Union[str, UnsetType] = unset, - name: Union[str, UnsetType] = unset, - type: Union[OrgConnectionUserRelationshipDataType, UnsetType] = unset, - **kwargs, - ): - """ - The data for a user relationship. - - :param id: User UUID. - :type id: str, optional - - :param name: User name. - :type name: str, optional - - :param type: The type of the user relationship. - :type type: OrgConnectionUserRelationshipDataType, optional - """ - if id is not unset: - kwargs["id"] = id - if name is not unset: - kwargs["name"] = name - if type is not unset: - kwargs["type"] = type - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/org_connection_user_relationship_data_type.py b/src/datadog_api_client/v2/model/org_connection_user_relationship_data_type.py deleted file mode 100644 index 0e421797b9..0000000000 --- a/src/datadog_api_client/v2/model/org_connection_user_relationship_data_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OrgConnectionUserRelationshipDataType(ModelSimple): - """ - The type of the user relationship. - - :param value: If omitted defaults to "users". Must be one of ["users"]. - :type value: str - """ - - allowed_values = { - "users", - } - USERS: ClassVar["OrgConnectionUserRelationshipDataType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OrgConnectionUserRelationshipDataType.USERS = OrgConnectionUserRelationshipDataType("users") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 712e80abe0..17bb49b9ef 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2757,28 +2757,6 @@ from datadog_api_client.v2.model.org_config_write import OrgConfigWrite from datadog_api_client.v2.model.org_config_write_attributes import OrgConfigWriteAttributes from datadog_api_client.v2.model.org_config_write_request import OrgConfigWriteRequest -from datadog_api_client.v2.model.org_connection import OrgConnection -from datadog_api_client.v2.model.org_connection_attributes import OrgConnectionAttributes -from datadog_api_client.v2.model.org_connection_create import OrgConnectionCreate -from datadog_api_client.v2.model.org_connection_create_attributes import OrgConnectionCreateAttributes -from datadog_api_client.v2.model.org_connection_create_relationships import OrgConnectionCreateRelationships -from datadog_api_client.v2.model.org_connection_create_request import OrgConnectionCreateRequest -from datadog_api_client.v2.model.org_connection_list_response import OrgConnectionListResponse -from datadog_api_client.v2.model.org_connection_list_response_meta import OrgConnectionListResponseMeta -from datadog_api_client.v2.model.org_connection_list_response_meta_page import OrgConnectionListResponseMetaPage -from datadog_api_client.v2.model.org_connection_org_relationship import OrgConnectionOrgRelationship -from datadog_api_client.v2.model.org_connection_org_relationship_data import OrgConnectionOrgRelationshipData -from datadog_api_client.v2.model.org_connection_org_relationship_data_type import OrgConnectionOrgRelationshipDataType -from datadog_api_client.v2.model.org_connection_relationships import OrgConnectionRelationships -from datadog_api_client.v2.model.org_connection_response import OrgConnectionResponse -from datadog_api_client.v2.model.org_connection_type import OrgConnectionType -from datadog_api_client.v2.model.org_connection_type_enum import OrgConnectionTypeEnum -from datadog_api_client.v2.model.org_connection_update import OrgConnectionUpdate -from datadog_api_client.v2.model.org_connection_update_attributes import OrgConnectionUpdateAttributes -from datadog_api_client.v2.model.org_connection_update_request import OrgConnectionUpdateRequest -from datadog_api_client.v2.model.org_connection_user_relationship import OrgConnectionUserRelationship -from datadog_api_client.v2.model.org_connection_user_relationship_data import OrgConnectionUserRelationshipData -from datadog_api_client.v2.model.org_connection_user_relationship_data_type import OrgConnectionUserRelationshipDataType from datadog_api_client.v2.model.organization import Organization from datadog_api_client.v2.model.organization_attributes import OrganizationAttributes from datadog_api_client.v2.model.organizations_type import OrganizationsType @@ -5927,28 +5905,6 @@ "OrgConfigWrite", "OrgConfigWriteAttributes", "OrgConfigWriteRequest", - "OrgConnection", - "OrgConnectionAttributes", - "OrgConnectionCreate", - "OrgConnectionCreateAttributes", - "OrgConnectionCreateRelationships", - "OrgConnectionCreateRequest", - "OrgConnectionListResponse", - "OrgConnectionListResponseMeta", - "OrgConnectionListResponseMetaPage", - "OrgConnectionOrgRelationship", - "OrgConnectionOrgRelationshipData", - "OrgConnectionOrgRelationshipDataType", - "OrgConnectionRelationships", - "OrgConnectionResponse", - "OrgConnectionType", - "OrgConnectionTypeEnum", - "OrgConnectionUpdate", - "OrgConnectionUpdateAttributes", - "OrgConnectionUpdateRequest", - "OrgConnectionUserRelationship", - "OrgConnectionUserRelationshipData", - "OrgConnectionUserRelationshipDataType", "Organization", "OrganizationAttributes", "OrganizationsType", diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_bad_request_response.frozen deleted file mode 100644 index bdb5f4a2d2..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_bad_request_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:35.269Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_bad_request_response.yaml deleted file mode 100644 index f15590e7bf..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_bad_request_response.yaml +++ /dev/null @@ -1,21 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs","logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"errors":["connection between orgs 4dee724d-00cc-11ea-a77b-570c9d03c6c5 - and 83999dcd-7f97-11f0-8de1-1ecf66f1aa85 is not allowed"]}' - headers: - content-type: - - application/json - status: - code: 400 - message: Bad Request -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_conflict_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_conflict_response.frozen deleted file mode 100644 index 6f07529abc..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_conflict_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:35.429Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_conflict_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_conflict_response.yaml deleted file mode 100644 index d928e2581f..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_conflict_response.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":{"type":"org_connection","id":"b5d3a360-d6e2-4af7-8da2-b2ff41b9f5e0","attributes":{"created_at":"2025-08-26T20:19:35.554634+00:00","connection_types":["logs"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5","name":"DD - Integration Tests (321813)"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","name":"Cross-Org - BDD Test Org"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840","name":"Amy - Li"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"errors":["connection between orgs 4dee724d-00cc-11ea-a77b-570c9d03c6c5 - and 83999dcd-7f97-11f0-8de1-1ecf66f1aa85 already exists"]}' - headers: - content-type: - - application/json - status: - code: 409 - message: Conflict -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/b5d3a360-d6e2-4af7-8da2-b2ff41b9f5e0 - response: - body: - string: '{} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_not_found_response.frozen deleted file mode 100644 index bdeeb5688d..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_not_found_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:35.916Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_not_found_response.yaml deleted file mode 100644 index cb6d44a724..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_not_found_response.yaml +++ /dev/null @@ -1,22 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"nonexistent-org-id","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"errors":["Not found"]} - - ' - headers: - content-type: - - application/json - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_ok_response.frozen deleted file mode 100644 index 878b43f439..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:36.045Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_ok_response.yaml deleted file mode 100644 index b4e019a687..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_create_org_connection_returns_ok_response.yaml +++ /dev/null @@ -1,43 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":{"type":"org_connection","id":"40bbb1c2-32b2-4aa3-8a1a-5d93b5382e3d","attributes":{"created_at":"2025-08-26T20:19:36.177236+00:00","connection_types":["logs"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5","name":"DD - Integration Tests (321813)"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","name":"Cross-Org - BDD Test Org"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840","name":"Amy - Li"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/40bbb1c2-32b2-4aa3-8a1a-5d93b5382e3d - response: - body: - string: '{} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_bad_request_response.frozen deleted file mode 100644 index 563493e1bf..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_bad_request_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:36.363Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_bad_request_response.yaml deleted file mode 100644 index 37d4704fd7..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_bad_request_response.yaml +++ /dev/null @@ -1,18 +0,0 @@ -interactions: -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/malformed_id - response: - body: - string: '{"errors":["connection id must be a valid uuid"]}' - headers: - content-type: - - application/json - status: - code: 400 - message: Bad Request -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_not_found_response.frozen deleted file mode 100644 index 908df97ed0..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_not_found_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:36.481Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_not_found_response.yaml deleted file mode 100644 index cf7a90fa68..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_not_found_response.yaml +++ /dev/null @@ -1,19 +0,0 @@ -interactions: -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/00000000-0000-0000-0000-000000000000 - response: - body: - string: '{"errors":["org connection with id:00000000-0000-0000-0000-000000000000 - not found not found"]}' - headers: - content-type: - - application/json - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_ok_response.frozen deleted file mode 100644 index a6ac9aae21..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:36.615Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_ok_response.yaml deleted file mode 100644 index 29f6ff0ea4..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_delete_org_connection_returns_ok_response.yaml +++ /dev/null @@ -1,60 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":{"type":"org_connection","id":"7b01f30c-6100-4cbf-b583-a5e353d7edb7","attributes":{"created_at":"2025-08-26T20:19:36.737560+00:00","connection_types":["logs"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5","name":"DD - Integration Tests (321813)"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","name":"Cross-Org - BDD Test Org"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840","name":"Amy - Li"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/7b01f30c-6100-4cbf-b583-a5e353d7edb7 - response: - body: - string: '{} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/7b01f30c-6100-4cbf-b583-a5e353d7edb7 - response: - body: - string: '{"errors":["org connection with id:7b01f30c-6100-4cbf-b583-a5e353d7edb7 - not found not found"]}' - headers: - content-type: - - application/json - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_list_org_connections_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_org_connections_returns_ok_response.frozen deleted file mode 100644 index feb7d7484c..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_list_org_connections_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:37.084Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_org_connections_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_org_connections_returns_ok_response.yaml deleted file mode 100644 index 68feae6a5f..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_list_org_connections_returns_ok_response.yaml +++ /dev/null @@ -1,20 +0,0 @@ -interactions: -- request: - body: null - headers: - accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":[],"meta":{"page":{"total_count":0,"total_filtered_count":0}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_bad_request_response.frozen deleted file mode 100644 index c28d682e61..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_bad_request_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:37.212Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_bad_request_response.yaml deleted file mode 100644 index 6469d02141..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_bad_request_response.yaml +++ /dev/null @@ -1,61 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":{"type":"org_connection","id":"76e1a71f-81e5-40c8-b8e0-1b98265d26fe","attributes":{"created_at":"2025-08-26T20:19:37.335819+00:00","connection_types":["logs"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5","name":"DD - Integration Tests (321813)"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","name":"Cross-Org - BDD Test Org"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840","name":"Amy - Li"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: '{"data":{"attributes":{"connection_types":["logs","logs"]},"id":"76e1a71f-81e5-40c8-b8e0-1b98265d26fe","type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/org_connections/76e1a71f-81e5-40c8-b8e0-1b98265d26fe - response: - body: - string: '{"errors":["Validation failed for input."]}' - headers: - content-type: - - application/json - status: - code: 400 - message: Bad Request -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/76e1a71f-81e5-40c8-b8e0-1b98265d26fe - response: - body: - string: '{} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_not_found_response.frozen deleted file mode 100644 index 742e61df8a..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_not_found_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:37.609Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_not_found_response.yaml deleted file mode 100644 index 2094d999f4..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_not_found_response.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":{"type":"org_connection","id":"d348b9ab-c7cf-4298-83a6-b4762fafff5e","attributes":{"created_at":"2025-08-26T20:19:37.737812+00:00","connection_types":["logs"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5","name":"DD - Integration Tests (321813)"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","name":"Cross-Org - BDD Test Org"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840","name":"Amy - Li"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: '{"data":{"attributes":{"connection_types":["logs","metrics"]},"id":"00000000-0000-0000-0000-000000000000","type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/org_connections/00000000-0000-0000-0000-000000000000 - response: - body: - string: '{"errors":["Org connection with id:00000000-0000-0000-0000-000000000000 - not found not found"]}' - headers: - content-type: - - application/json - status: - code: 404 - message: Not Found -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/d348b9ab-c7cf-4298-83a6-b4762fafff5e - response: - body: - string: '{} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_ok_response.frozen deleted file mode 100644 index 291e5d534d..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-08-26T20:19:38.089Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_ok_response.yaml deleted file mode 100644 index 511b31f299..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_update_org_connection_returns_ok_response.yaml +++ /dev/null @@ -1,63 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"connection_types":["logs"]},"relationships":{"sink_org":{"data":{"id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","type":"orgs"}}},"type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/org_connections - response: - body: - string: '{"data":{"type":"org_connection","id":"0105233a-4d7b-4c52-b364-cc968d003de0","attributes":{"created_at":"2025-08-26T20:19:38.208326+00:00","connection_types":["logs"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5","name":"DD - Integration Tests (321813)"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85","name":"Cross-Org - BDD Test Org"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840","name":"Amy - Li"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: '{"data":{"attributes":{"connection_types":["logs","metrics"]},"id":"0105233a-4d7b-4c52-b364-cc968d003de0","type":"org_connection"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: PATCH - uri: https://api.datadoghq.com/api/v2/org_connections/0105233a-4d7b-4c52-b364-cc968d003de0 - response: - body: - string: '{"data":{"type":"org_connection","id":"0105233a-4d7b-4c52-b364-cc968d003de0","attributes":{"created_at":"2025-08-26T20:19:38.208326+00:00","connection_types":["logs","metrics"]},"relationships":{"source_org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}},"sink_org":{"data":{"type":"orgs","id":"83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}},"created_by":{"data":{"type":"users","id":"03e6bc43-7ecc-11f0-b50b-f28f2be41840"}}}}} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -- request: - body: null - headers: - accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/org_connections/0105233a-4d7b-4c52-b364-cc968d003de0 - response: - body: - string: '{} - - ' - headers: - content-type: - - application/json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index f083a79176..fbeea56787 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -556,19 +556,6 @@ "tag": "On-Call", "operationId": "SetOnCallTeamRoutingRules" }, - { - "parameters": [ - { - "name": "body", - "origin": "request", - "value": "{\n \"data\": {\n \"type\": \"org_connection\",\n \"relationships\": {\n \"sink_org\": {\n \"data\": {\n \"type\": \"orgs\",\n \"id\": \"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\"\n }\n }\n },\n \"attributes\": {\n \"connection_types\": [\"logs\"]\n }\n }\n}" - } - ], - "step": "there is a valid \"org_connection\" in the system", - "key": "org_connection", - "tag": "Org Connections", - "operationId": "CreateOrgConnections" - }, { "source": "data[4]", "step": "there is a valid \"permission\" in the system", diff --git a/tests/v2/features/org_connections.feature b/tests/v2/features/org_connections.feature deleted file mode 100644 index 321e7c77f2..0000000000 --- a/tests/v2/features/org_connections.feature +++ /dev/null @@ -1,95 +0,0 @@ -@endpoint(org-connections) @endpoint(org-connections-v2) -Feature: Org Connections - 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_man - agement/org_settings/cross_org_visibility/) page for more information. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "OrgConnections" API - - @team:DataDog/aaa-granular-access - Scenario: Create Org Connection returns "Bad Request" response - Given new "CreateOrgConnections" request - And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}}}, "attributes": {"connection_types": ["logs", "logs"]}}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/aaa-granular-access - Scenario: Create Org Connection returns "Conflict" response - Given there is a valid "org_connection" in the system - And new "CreateOrgConnections" request - And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}}}, "attributes": {"connection_types": ["logs"]}}} - When the request is sent - Then the response status is 409 Conflict - - @team:DataDog/aaa-granular-access - Scenario: Create Org Connection returns "Not Found" response - Given new "CreateOrgConnections" request - And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "nonexistent-org-id"}}}, "attributes": {"connection_types": ["logs"]}}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/aaa-granular-access - Scenario: Create Org Connection returns "OK" response - Given new "CreateOrgConnections" request - And body with value {"data": {"type": "org_connection", "relationships": {"sink_org": {"data": {"type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"}}}, "attributes": {"connection_types": ["logs"]}}} - When the request is sent - Then the response status is 200 Created - - @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-terraform-config @skip-typescript @skip-validation @team:DataDog/aaa-granular-access - Scenario: Delete Org Connection returns "Bad Request" response - Given new "DeleteOrgConnections" request - And request contains "connection_id" parameter with value "malformed_id" - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/aaa-granular-access - Scenario: Delete Org Connection returns "Not Found" response - Given new "DeleteOrgConnections" request - And request contains "connection_id" parameter with value "00000000-0000-0000-0000-000000000000" - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/aaa-granular-access - Scenario: Delete Org Connection returns "OK" response - Given there is a valid "org_connection" in the system - And new "DeleteOrgConnections" request - And request contains "connection_id" parameter from "org_connection.data.id" - When the request is sent - Then the response status is 200 OK - - @team:DataDog/aaa-granular-access - Scenario: List Org Connections returns "OK" response - Given new "ListOrgConnections" request - When the request is sent - Then the response status is 200 OK - - @team:DataDog/aaa-granular-access - Scenario: Update Org Connection returns "Bad Request" response - Given there is a valid "org_connection" in the system - And new "UpdateOrgConnections" request - And request contains "connection_id" parameter from "org_connection.data.id" - And body with value {"data": {"type": "org_connection", "id": "{{ org_connection.data.id }}", "attributes": {"connection_types": ["logs", "logs"]}}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/aaa-granular-access - Scenario: Update Org Connection returns "Not Found" response - Given there is a valid "org_connection" in the system - And new "UpdateOrgConnections" request - And request contains "connection_id" parameter with value "00000000-0000-0000-0000-000000000000" - And body with value {"data": {"type": "org_connection", "id": "00000000-0000-0000-0000-000000000000", "attributes": {"connection_types": ["logs", "metrics"]}}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/aaa-granular-access - Scenario: Update Org Connection returns "OK" response - Given there is a valid "org_connection" in the system - And new "UpdateOrgConnections" request - And request contains "connection_id" parameter from "org_connection.data.id" - And body with value {"data": {"type": "org_connection", "id": "{{ org_connection.data.id }}", "attributes": {"connection_types": ["logs", "metrics"]}}} - When the request is sent - Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index d6587bfb74..ec94e15e11 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2228,37 +2228,6 @@ "type": "idempotent" } }, - "ListOrgConnections": { - "tag": "Org Connections", - "undo": { - "type": "safe" - } - }, - "CreateOrgConnections": { - "tag": "Org Connections", - "undo": { - "operationId": "DeleteOrgConnections", - "parameters": [ - { - "name": "connection_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteOrgConnections": { - "tag": "Org Connections", - "undo": { - "type": "idempotent" - } - }, - "UpdateOrgConnections": { - "tag": "Org Connections", - "undo": { - "type": "idempotent" - } - }, "ListPermissions": { "tag": "Roles", "undo": {