diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d40e489dc619..f48f49697877 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -681,6 +681,15 @@ 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 @@ -30894,6 +30903,255 @@ 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: @@ -45726,6 +45984,8 @@ 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 @@ -58964,6 +59224,148 @@ 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, @@ -69333,6 +69735,11 @@ 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/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Bad-Request-response_377247719/frozen.json b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Bad-Request-response_377247719/frozen.json new file mode 100644 index 000000000000..dafdef215bba --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Bad-Request-response_377247719/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:35.269Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Bad-Request-response_377247719/recording.har b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Bad-Request-response_377247719/recording.har new file mode 100644 index 000000000000..a9e96e22918a --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Bad-Request-response_377247719/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Org Connections/Create Org Connection returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7a21408452ccd5a61e91557a7b822b3c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 182, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/json", + "size": 131, + "text": "{\"errors\":[\"connection between orgs 4dee724d-00cc-11ea-a77b-570c9d03c6c5 and 83999dcd-7f97-11f0-8de1-1ecf66f1aa85 is not allowed\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-26T20:19:35.273Z", + "time": 150 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Conflict-response_2748509155/frozen.json b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Conflict-response_2748509155/frozen.json new file mode 100644 index 000000000000..f4ba4890a5c8 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Conflict-response_2748509155/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:35.429Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Conflict-response_2748509155/recording.har b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Conflict-response_2748509155/recording.har new file mode 100644 index 000000000000..9ecae80e2694 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Conflict-response_2748509155/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Org Connections/Create Org Connection returns \"Conflict\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 520, + "content": { + "mimeType": "application/json", + "size": 520, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:35.431Z", + "time": 144 + }, + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/json", + "size": 131, + "text": "{\"errors\":[\"connection between orgs 4dee724d-00cc-11ea-a77b-570c9d03c6c5 and 83999dcd-7f97-11f0-8de1-1ecf66f1aa85 already exists\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 409, + "statusText": "Conflict" + }, + "startedDateTime": "2025-08-26T20:19:35.581Z", + "time": 143 + }, + { + "_id": "de32e8df4f044ebdaf9bc2a872bbd00c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/b5d3a360-d6e2-4af7-8da2-b2ff41b9f5e0" + }, + "response": { + "bodySize": 3, + "content": { + "mimeType": "application/json", + "size": 3, + "text": "{}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:35.729Z", + "time": 182 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Not-Found-response_1760104000/frozen.json b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Not-Found-response_1760104000/frozen.json new file mode 100644 index 000000000000..cee9f189ee99 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Not-Found-response_1760104000/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:35.916Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Not-Found-response_1760104000/recording.har b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Not-Found-response_1760104000/recording.har new file mode 100644 index 000000000000..5d31e19df466 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-Not-Found-response_1760104000/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Org Connections/Create Org Connection returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7f0e9dad6b89fbf40ba61c6424be2da7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 157, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"nonexistent-org-id\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 25, + "content": { + "mimeType": "application/json", + "size": 25, + "text": "{\"errors\":[\"Not found\"]}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-26T20:19:35.919Z", + "time": 122 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-OK-response_1410740483/frozen.json b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-OK-response_1410740483/frozen.json new file mode 100644 index 000000000000..9061967ca32f --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-OK-response_1410740483/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:36.045Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-OK-response_1410740483/recording.har b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-OK-response_1410740483/recording.har new file mode 100644 index 000000000000..d1c75744eb32 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Create-Org-Connection-returns-OK-response_1410740483/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Org Connections/Create Org Connection returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 520, + "content": { + "mimeType": "application/json", + "size": 520, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:36.047Z", + "time": 148 + }, + { + "_id": "36e827dff44d23a27b433c55baf1e36b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/40bbb1c2-32b2-4aa3-8a1a-5d93b5382e3d" + }, + "response": { + "bodySize": 3, + "content": { + "mimeType": "application/json", + "size": 3, + "text": "{}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:36.200Z", + "time": 160 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Bad-Request-response_2749209244/frozen.json b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Bad-Request-response_2749209244/frozen.json new file mode 100644 index 000000000000..e3defd56059d --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Bad-Request-response_2749209244/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:36.363Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Bad-Request-response_2749209244/recording.har b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Bad-Request-response_2749209244/recording.har new file mode 100644 index 000000000000..b50760b43f34 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Bad-Request-response_2749209244/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Org Connections/Delete Org Connection returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c5bc887fe392d215235718b29cbb258f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 519, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/malformed_id" + }, + "response": { + "bodySize": 49, + "content": { + "mimeType": "application/json", + "size": 49, + "text": "{\"errors\":[\"connection id must be a valid uuid\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 685, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-26T20:19:36.367Z", + "time": 111 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Not-Found-response_1076827547/frozen.json b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Not-Found-response_1076827547/frozen.json new file mode 100644 index 000000000000..4e77bfbdee92 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Not-Found-response_1076827547/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:36.481Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Not-Found-response_1076827547/recording.har b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Not-Found-response_1076827547/recording.har new file mode 100644 index 000000000000..606884f92a8e --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-Not-Found-response_1076827547/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Org Connections/Delete Org Connection returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "93d952468c03e9f43cfa4183413e3c46", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/00000000-0000-0000-0000-000000000000" + }, + "response": { + "bodySize": 94, + "content": { + "mimeType": "application/json", + "size": 94, + "text": "{\"errors\":[\"org connection with id:00000000-0000-0000-0000-000000000000 not found not found\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 685, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-26T20:19:36.482Z", + "time": 130 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-OK-response_2943596482/frozen.json b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-OK-response_2943596482/frozen.json new file mode 100644 index 000000000000..072001e83760 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-OK-response_2943596482/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:36.615Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-OK-response_2943596482/recording.har b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-OK-response_2943596482/recording.har new file mode 100644 index 000000000000..4ac722c545c7 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Delete-Org-Connection-returns-OK-response_2943596482/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "Org Connections/Delete Org Connection returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 520, + "content": { + "mimeType": "application/json", + "size": 520, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:36.617Z", + "time": 139 + }, + { + "_id": "3341cd1bc3fff5e25bafe8947a2ea52d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/7b01f30c-6100-4cbf-b583-a5e353d7edb7" + }, + "response": { + "bodySize": 3, + "content": { + "mimeType": "application/json", + "size": 3, + "text": "{}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:36.765Z", + "time": 184 + }, + { + "_id": "3341cd1bc3fff5e25bafe8947a2ea52d", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/7b01f30c-6100-4cbf-b583-a5e353d7edb7" + }, + "response": { + "bodySize": 94, + "content": { + "mimeType": "application/json", + "size": 94, + "text": "{\"errors\":[\"org connection with id:7b01f30c-6100-4cbf-b583-a5e353d7edb7 not found not found\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 685, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-26T20:19:36.955Z", + "time": 126 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/List-Org-Connections-returns-OK-response_1051001000/frozen.json b/cassettes/v2/Org-Connections_1174763688/List-Org-Connections-returns-OK-response_1051001000/frozen.json new file mode 100644 index 000000000000..03ac96cfb6c1 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/List-Org-Connections-returns-OK-response_1051001000/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:37.084Z" diff --git a/cassettes/v2/Org-Connections_1174763688/List-Org-Connections-returns-OK-response_1051001000/recording.har b/cassettes/v2/Org-Connections_1174763688/List-Org-Connections-returns-OK-response_1051001000/recording.har new file mode 100644 index 000000000000..7a840881964c --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/List-Org-Connections-returns-OK-response_1051001000/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Org Connections/List Org Connections returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c4a45f022843cd721bba31dac1a31203", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 514, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 71, + "content": { + "mimeType": "application/json", + "size": 71, + "text": "{\"data\":[],\"meta\":{\"page\":{\"total_count\":0,\"total_filtered_count\":0}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 682, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:37.084Z", + "time": 124 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Bad-Request-response_1023592838/frozen.json b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Bad-Request-response_1023592838/frozen.json new file mode 100644 index 000000000000..cf1800f1a84d --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Bad-Request-response_1023592838/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:37.212Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Bad-Request-response_1023592838/recording.har b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Bad-Request-response_1023592838/recording.har new file mode 100644 index 000000000000..3034ca8bed1f --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Bad-Request-response_1023592838/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Org Connections/Update Org Connection returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 520, + "content": { + "mimeType": "application/json", + "size": 520, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:37.214Z", + "time": 142 + }, + { + "_id": "0baa85f57971d9e273f4a6740ce0eb1b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 128, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"logs\"]},\"id\":\"76e1a71f-81e5-40c8-b8e0-1b98265d26fe\",\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/76e1a71f-81e5-40c8-b8e0-1b98265d26fe" + }, + "response": { + "bodySize": 43, + "content": { + "mimeType": "application/json", + "size": 43, + "text": "{\"errors\":[\"Validation failed for input.\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 685, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-26T20:19:37.365Z", + "time": 121 + }, + { + "_id": "d129ad25cb8db0d8b518ebfda109c597", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/76e1a71f-81e5-40c8-b8e0-1b98265d26fe" + }, + "response": { + "bodySize": 3, + "content": { + "mimeType": "application/json", + "size": 3, + "text": "{}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:37.492Z", + "time": 113 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Not-Found-response_1519971277/frozen.json b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Not-Found-response_1519971277/frozen.json new file mode 100644 index 000000000000..91c4c8c23f35 --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Not-Found-response_1519971277/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:37.609Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Not-Found-response_1519971277/recording.har b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Not-Found-response_1519971277/recording.har new file mode 100644 index 000000000000..9d6ee541272c --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-Not-Found-response_1519971277/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Org Connections/Update Org Connection returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 520, + "content": { + "mimeType": "application/json", + "size": 520, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:37.611Z", + "time": 212 + }, + { + "_id": "ee8cf63c256668781e6da82afed6dc44", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"metrics\"]},\"id\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/00000000-0000-0000-0000-000000000000" + }, + "response": { + "bodySize": 94, + "content": { + "mimeType": "application/json", + "size": 94, + "text": "{\"errors\":[\"Org connection with id:00000000-0000-0000-0000-000000000000 not found not found\"]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 685, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-26T20:19:37.827Z", + "time": 133 + }, + { + "_id": "3ea3241b03418f98437debf025dea747", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/d348b9ab-c7cf-4298-83a6-b4762fafff5e" + }, + "response": { + "bodySize": 3, + "content": { + "mimeType": "application/json", + "size": 3, + "text": "{}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:37.964Z", + "time": 121 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-OK-response_3589373708/frozen.json b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-OK-response_3589373708/frozen.json new file mode 100644 index 000000000000..83f45b6632fd --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-OK-response_3589373708/frozen.json @@ -0,0 +1 @@ +"2025-08-26T20:19:38.089Z" diff --git a/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-OK-response_3589373708/recording.har b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-OK-response_3589373708/recording.har new file mode 100644 index 000000000000..476e9584f64f --- /dev/null +++ b/cassettes/v2/Org-Connections_1174763688/Update-Org-Connection-returns-OK-response_3589373708/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Org Connections/Update Org Connection returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "76efebf6d204c8e85a8cbd11c0a4ae43", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 175, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\"]},\"relationships\":{\"sink_org\":{\"data\":{\"id\":\"83999dcd-7f97-11f0-8de1-1ecf66f1aa85\",\"type\":\"orgs\"}}},\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections" + }, + "response": { + "bodySize": 520, + "content": { + "mimeType": "application/json", + "size": 520, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:38.091Z", + "time": 141 + }, + { + "_id": "d9e0b64c3bbeb3f7093c6afc4436a1b0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 131, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"connection_types\":[\"logs\",\"metrics\"]},\"id\":\"0105233a-4d7b-4c52-b364-cc968d003de0\",\"type\":\"org_connection\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/0105233a-4d7b-4c52-b364-cc968d003de0" + }, + "response": { + "bodySize": 443, + "content": { + "mimeType": "application/json", + "size": 443, + "text": "{\"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\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 686, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:38.238Z", + "time": 127 + }, + { + "_id": "0d265c589ea2653b134adcc39dc45e4a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 543, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/org_connections/0105233a-4d7b-4c52-b364-cc968d003de0" + }, + "response": { + "bodySize": 3, + "content": { + "mimeType": "application/json", + "size": 3, + "text": "{}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-26T20:19:38.370Z", + "time": 119 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/org-connections/CreateOrgConnections.ts b/examples/v2/org-connections/CreateOrgConnections.ts new file mode 100644 index 000000000000..328814c2bdf3 --- /dev/null +++ b/examples/v2/org-connections/CreateOrgConnections.ts @@ -0,0 +1,36 @@ +/** + * Create Org Connection returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OrgConnectionsApi(configuration); + +const params: v2.OrgConnectionsApiCreateOrgConnectionsRequest = { + body: { + data: { + type: "org_connection", + relationships: { + sinkOrg: { + data: { + type: "orgs", + id: "83999dcd-7f97-11f0-8de1-1ecf66f1aa85", + }, + }, + }, + attributes: { + connectionTypes: ["logs"], + }, + }, + }, +}; + +apiInstance + .createOrgConnections(params) + .then((data: v2.OrgConnectionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/org-connections/DeleteOrgConnections.ts b/examples/v2/org-connections/DeleteOrgConnections.ts new file mode 100644 index 000000000000..d6fcd7f73aeb --- /dev/null +++ b/examples/v2/org-connections/DeleteOrgConnections.ts @@ -0,0 +1,24 @@ +/** + * Delete Org Connection returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OrgConnectionsApi(configuration); + +// there is a valid "org_connection" in the system +const ORG_CONNECTION_DATA_ID = process.env.ORG_CONNECTION_DATA_ID as string; + +const params: v2.OrgConnectionsApiDeleteOrgConnectionsRequest = { + connectionId: ORG_CONNECTION_DATA_ID, +}; + +apiInstance + .deleteOrgConnections(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/org-connections/ListOrgConnections.ts b/examples/v2/org-connections/ListOrgConnections.ts new file mode 100644 index 000000000000..c1196b849870 --- /dev/null +++ b/examples/v2/org-connections/ListOrgConnections.ts @@ -0,0 +1,17 @@ +/** + * List Org Connections returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OrgConnectionsApi(configuration); + +apiInstance + .listOrgConnections() + .then((data: v2.OrgConnectionListResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/org-connections/UpdateOrgConnections.ts b/examples/v2/org-connections/UpdateOrgConnections.ts new file mode 100644 index 000000000000..69bd38c1fb84 --- /dev/null +++ b/examples/v2/org-connections/UpdateOrgConnections.ts @@ -0,0 +1,33 @@ +/** + * Update Org Connection returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.OrgConnectionsApi(configuration); + +// there is a valid "org_connection" in the system +const ORG_CONNECTION_DATA_ID = process.env.ORG_CONNECTION_DATA_ID as string; + +const params: v2.OrgConnectionsApiUpdateOrgConnectionsRequest = { + body: { + data: { + type: "org_connection", + id: ORG_CONNECTION_DATA_ID, + attributes: { + connectionTypes: ["logs", "metrics"], + }, + }, + }, + connectionId: ORG_CONNECTION_DATA_ID, +}; + +apiInstance + .updateOrgConnections(params) + .then((data: v2.OrgConnectionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 83bb2b3f84ad..8e65f972c564 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -6416,6 +6416,34 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "{}", }, + "v2.ListOrgConnections": { + "operationResponseType": "OrgConnectionListResponse", + }, + "v2.CreateOrgConnections": { + "body": { + "type": "OrgConnectionCreateRequest", + "format": "", + }, + "operationResponseType": "OrgConnectionResponse", + }, + "v2.DeleteOrgConnections": { + "connectionId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.UpdateOrgConnections": { + "connectionId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "OrgConnectionUpdateRequest", + "format": "", + }, + "operationResponseType": "OrgConnectionResponse", + }, "v2.ListPermissions": { "operationResponseType": "PermissionsResponse", }, diff --git a/features/v2/given.json b/features/v2/given.json index fbeea567872f..f083a791765c 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -556,6 +556,19 @@ "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/features/v2/org_connections.feature b/features/v2/org_connections.feature new file mode 100644 index 000000000000..321e7c77f24c --- /dev/null +++ b/features/v2/org_connections.feature @@ -0,0 +1,95 @@ +@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/features/v2/undo.json b/features/v2/undo.json index ec94e15e11da..d6587bfb7473 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2228,6 +2228,37 @@ "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": { diff --git a/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts b/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts new file mode 100644 index 000000000000..3c2d87bf836f --- /dev/null +++ b/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts @@ -0,0 +1,550 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { OrgConnectionCreateRequest } from "../models/OrgConnectionCreateRequest"; +import { OrgConnectionListResponse } from "../models/OrgConnectionListResponse"; +import { OrgConnectionResponse } from "../models/OrgConnectionResponse"; +import { OrgConnectionUpdateRequest } from "../models/OrgConnectionUpdateRequest"; + +export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory { + public async createOrgConnections( + body: OrgConnectionCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createOrgConnections"); + } + + // Path Params + const localVarPath = "/api/v2/org_connections"; + + // Make Request Context + const requestContext = _config + .getServer("v2.OrgConnectionsApi.createOrgConnections") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "OrgConnectionCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async deleteOrgConnections( + connectionId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'connectionId' is not null or undefined + if (connectionId === null || connectionId === undefined) { + throw new RequiredError("connectionId", "deleteOrgConnections"); + } + + // Path Params + const localVarPath = "/api/v2/org_connections/{connection_id}".replace( + "{connection_id}", + encodeURIComponent(String(connectionId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OrgConnectionsApi.deleteOrgConnections") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async listOrgConnections( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/org_connections"; + + // Make Request Context + const requestContext = _config + .getServer("v2.OrgConnectionsApi.listOrgConnections") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateOrgConnections( + connectionId: string, + body: OrgConnectionUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'connectionId' is not null or undefined + if (connectionId === null || connectionId === undefined) { + throw new RequiredError("connectionId", "updateOrgConnections"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateOrgConnections"); + } + + // Path Params + const localVarPath = "/api/v2/org_connections/{connection_id}".replace( + "{connection_id}", + encodeURIComponent(String(connectionId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OrgConnectionsApi.updateOrgConnections") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "OrgConnectionUpdateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class OrgConnectionsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createOrgConnections + * @throws ApiException if the response code was not in [200, 299] + */ + public async createOrgConnections( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: OrgConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgConnectionResponse" + ) as OrgConnectionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgConnectionResponse", + "" + ) as OrgConnectionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteOrgConnections + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteOrgConnections(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listOrgConnections + * @throws ApiException if the response code was not in [200, 299] + */ + public async listOrgConnections( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: OrgConnectionListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgConnectionListResponse" + ) as OrgConnectionListResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgConnectionListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgConnectionListResponse", + "" + ) as OrgConnectionListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateOrgConnections + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateOrgConnections( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: OrgConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgConnectionResponse" + ) as OrgConnectionResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgConnectionResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgConnectionResponse", + "" + ) as OrgConnectionResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface OrgConnectionsApiCreateOrgConnectionsRequest { + /** + * @type OrgConnectionCreateRequest + */ + body: OrgConnectionCreateRequest; +} + +export interface OrgConnectionsApiDeleteOrgConnectionsRequest { + /** + * The unique identifier of the org connection. + * @type string + */ + connectionId: string; +} + +export interface OrgConnectionsApiUpdateOrgConnectionsRequest { + /** + * The unique identifier of the org connection. + * @type string + */ + connectionId: string; + /** + * @type OrgConnectionUpdateRequest + */ + body: OrgConnectionUpdateRequest; +} + +export class OrgConnectionsApi { + private requestFactory: OrgConnectionsApiRequestFactory; + private responseProcessor: OrgConnectionsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: OrgConnectionsApiRequestFactory, + responseProcessor?: OrgConnectionsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new OrgConnectionsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new OrgConnectionsApiResponseProcessor(); + } + + /** + * Create a new org connection between the current org and a target org. + * @param param The request object + */ + public createOrgConnections( + param: OrgConnectionsApiCreateOrgConnectionsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createOrgConnections( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createOrgConnections(responseContext); + }); + }); + } + + /** + * Delete an existing org connection. + * @param param The request object + */ + public deleteOrgConnections( + param: OrgConnectionsApiDeleteOrgConnectionsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteOrgConnections( + param.connectionId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteOrgConnections(responseContext); + }); + }); + } + + /** + * Returns a list of org connections. + * @param param The request object + */ + public listOrgConnections( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listOrgConnections(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listOrgConnections(responseContext); + }); + }); + } + + /** + * Update an existing org connection. + * @param param The request object + */ + public updateOrgConnections( + param: OrgConnectionsApiUpdateOrgConnectionsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateOrgConnections( + param.connectionId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateOrgConnections(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index f87b74b7fca9..7d5817bb76ee 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -497,6 +497,13 @@ export { OpsgenieIntegrationApi, } from "./apis/OpsgenieIntegrationApi"; +export { + OrgConnectionsApiCreateOrgConnectionsRequest, + OrgConnectionsApiDeleteOrgConnectionsRequest, + OrgConnectionsApiUpdateOrgConnectionsRequest, + OrgConnectionsApi, +} from "./apis/OrgConnectionsApi"; + export { OrganizationsApiGetOrgConfigRequest, OrganizationsApiUpdateOrgConfigRequest, @@ -2709,6 +2716,28 @@ export { OrgConfigType } from "./models/OrgConfigType"; export { OrgConfigWrite } from "./models/OrgConfigWrite"; export { OrgConfigWriteAttributes } from "./models/OrgConfigWriteAttributes"; export { OrgConfigWriteRequest } from "./models/OrgConfigWriteRequest"; +export { OrgConnection } from "./models/OrgConnection"; +export { OrgConnectionAttributes } from "./models/OrgConnectionAttributes"; +export { OrgConnectionCreate } from "./models/OrgConnectionCreate"; +export { OrgConnectionCreateAttributes } from "./models/OrgConnectionCreateAttributes"; +export { OrgConnectionCreateRelationships } from "./models/OrgConnectionCreateRelationships"; +export { OrgConnectionCreateRequest } from "./models/OrgConnectionCreateRequest"; +export { OrgConnectionListResponse } from "./models/OrgConnectionListResponse"; +export { OrgConnectionListResponseMeta } from "./models/OrgConnectionListResponseMeta"; +export { OrgConnectionListResponseMetaPage } from "./models/OrgConnectionListResponseMetaPage"; +export { OrgConnectionOrgRelationship } from "./models/OrgConnectionOrgRelationship"; +export { OrgConnectionOrgRelationshipData } from "./models/OrgConnectionOrgRelationshipData"; +export { OrgConnectionOrgRelationshipDataType } from "./models/OrgConnectionOrgRelationshipDataType"; +export { OrgConnectionRelationships } from "./models/OrgConnectionRelationships"; +export { OrgConnectionResponse } from "./models/OrgConnectionResponse"; +export { OrgConnectionType } from "./models/OrgConnectionType"; +export { OrgConnectionTypeEnum } from "./models/OrgConnectionTypeEnum"; +export { OrgConnectionUpdate } from "./models/OrgConnectionUpdate"; +export { OrgConnectionUpdateAttributes } from "./models/OrgConnectionUpdateAttributes"; +export { OrgConnectionUpdateRequest } from "./models/OrgConnectionUpdateRequest"; +export { OrgConnectionUserRelationship } from "./models/OrgConnectionUserRelationship"; +export { OrgConnectionUserRelationshipData } from "./models/OrgConnectionUserRelationshipData"; +export { OrgConnectionUserRelationshipDataType } from "./models/OrgConnectionUserRelationshipDataType"; export { OutboundEdge } from "./models/OutboundEdge"; export { OutcomesBatchAttributes } from "./models/OutcomesBatchAttributes"; export { OutcomesBatchRequest } from "./models/OutcomesBatchRequest"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index c8bf233e35c8..084da3d8fe77 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -1395,6 +1395,24 @@ import { OrgConfigReadAttributes } from "./OrgConfigReadAttributes"; import { OrgConfigWrite } from "./OrgConfigWrite"; import { OrgConfigWriteAttributes } from "./OrgConfigWriteAttributes"; import { OrgConfigWriteRequest } from "./OrgConfigWriteRequest"; +import { OrgConnection } from "./OrgConnection"; +import { OrgConnectionAttributes } from "./OrgConnectionAttributes"; +import { OrgConnectionCreate } from "./OrgConnectionCreate"; +import { OrgConnectionCreateAttributes } from "./OrgConnectionCreateAttributes"; +import { OrgConnectionCreateRelationships } from "./OrgConnectionCreateRelationships"; +import { OrgConnectionCreateRequest } from "./OrgConnectionCreateRequest"; +import { OrgConnectionListResponse } from "./OrgConnectionListResponse"; +import { OrgConnectionListResponseMeta } from "./OrgConnectionListResponseMeta"; +import { OrgConnectionListResponseMetaPage } from "./OrgConnectionListResponseMetaPage"; +import { OrgConnectionOrgRelationship } from "./OrgConnectionOrgRelationship"; +import { OrgConnectionOrgRelationshipData } from "./OrgConnectionOrgRelationshipData"; +import { OrgConnectionRelationships } from "./OrgConnectionRelationships"; +import { OrgConnectionResponse } from "./OrgConnectionResponse"; +import { OrgConnectionUpdate } from "./OrgConnectionUpdate"; +import { OrgConnectionUpdateAttributes } from "./OrgConnectionUpdateAttributes"; +import { OrgConnectionUpdateRequest } from "./OrgConnectionUpdateRequest"; +import { OrgConnectionUserRelationship } from "./OrgConnectionUserRelationship"; +import { OrgConnectionUserRelationshipData } from "./OrgConnectionUserRelationshipData"; import { Organization } from "./Organization"; import { OrganizationAttributes } from "./OrganizationAttributes"; import { OutboundEdge } from "./OutboundEdge"; @@ -3010,6 +3028,10 @@ const enumsMap: { [key: string]: any[] } = { OpsgenieServiceType: ["opsgenie-service"], OrderDirection: ["asc", "desc"], OrgConfigType: ["org_configs"], + OrgConnectionOrgRelationshipDataType: ["orgs"], + OrgConnectionType: ["org_connection"], + OrgConnectionTypeEnum: ["logs", "metrics"], + OrgConnectionUserRelationshipDataType: ["users"], OrganizationsType: ["orgs"], OutcomeType: ["outcome"], OutcomesBatchType: ["batched-outcome"], @@ -5181,6 +5203,24 @@ const typeMap: { [index: string]: any } = { OrgConfigWrite: OrgConfigWrite, OrgConfigWriteAttributes: OrgConfigWriteAttributes, OrgConfigWriteRequest: OrgConfigWriteRequest, + OrgConnection: OrgConnection, + OrgConnectionAttributes: OrgConnectionAttributes, + OrgConnectionCreate: OrgConnectionCreate, + OrgConnectionCreateAttributes: OrgConnectionCreateAttributes, + OrgConnectionCreateRelationships: OrgConnectionCreateRelationships, + OrgConnectionCreateRequest: OrgConnectionCreateRequest, + OrgConnectionListResponse: OrgConnectionListResponse, + OrgConnectionListResponseMeta: OrgConnectionListResponseMeta, + OrgConnectionListResponseMetaPage: OrgConnectionListResponseMetaPage, + OrgConnectionOrgRelationship: OrgConnectionOrgRelationship, + OrgConnectionOrgRelationshipData: OrgConnectionOrgRelationshipData, + OrgConnectionRelationships: OrgConnectionRelationships, + OrgConnectionResponse: OrgConnectionResponse, + OrgConnectionUpdate: OrgConnectionUpdate, + OrgConnectionUpdateAttributes: OrgConnectionUpdateAttributes, + OrgConnectionUpdateRequest: OrgConnectionUpdateRequest, + OrgConnectionUserRelationship: OrgConnectionUserRelationship, + OrgConnectionUserRelationshipData: OrgConnectionUserRelationshipData, Organization: Organization, OrganizationAttributes: OrganizationAttributes, OutboundEdge: OutboundEdge, diff --git a/packages/datadog-api-client-v2/models/OrgConnection.ts b/packages/datadog-api-client-v2/models/OrgConnection.ts new file mode 100644 index 000000000000..73bf442b8bcc --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnection.ts @@ -0,0 +1,84 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionAttributes } from "./OrgConnectionAttributes"; +import { OrgConnectionRelationships } from "./OrgConnectionRelationships"; +import { OrgConnectionType } from "./OrgConnectionType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * An org connection. + */ +export class OrgConnection { + /** + * Org connection attributes. + */ + "attributes": OrgConnectionAttributes; + /** + * The unique identifier of the org connection. + */ + "id": string; + /** + * Related organizations and user. + */ + "relationships": OrgConnectionRelationships; + /** + * Org connection type. + */ + "type": OrgConnectionType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgConnectionAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "OrgConnectionRelationships", + required: true, + }, + type: { + baseName: "type", + type: "OrgConnectionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnection.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionAttributes.ts b/packages/datadog-api-client-v2/models/OrgConnectionAttributes.ts new file mode 100644 index 000000000000..99a16989a09d --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionAttributes.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionTypeEnum } from "./OrgConnectionTypeEnum"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Org connection attributes. + */ +export class OrgConnectionAttributes { + /** + * List of connection types. + */ + "connectionTypes": Array; + /** + * Timestamp when the connection was created. + */ + "createdAt": Date; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + connectionTypes: { + baseName: "connection_types", + type: "Array", + required: true, + }, + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionCreate.ts b/packages/datadog-api-client-v2/models/OrgConnectionCreate.ts new file mode 100644 index 000000000000..766846e0cea1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionCreate.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionCreateAttributes } from "./OrgConnectionCreateAttributes"; +import { OrgConnectionCreateRelationships } from "./OrgConnectionCreateRelationships"; +import { OrgConnectionType } from "./OrgConnectionType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Org connection creation data. + */ +export class OrgConnectionCreate { + /** + * Attributes for creating an org connection. + */ + "attributes": OrgConnectionCreateAttributes; + /** + * Relationships for org connection creation. + */ + "relationships": OrgConnectionCreateRelationships; + /** + * Org connection type. + */ + "type": OrgConnectionType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgConnectionCreateAttributes", + required: true, + }, + relationships: { + baseName: "relationships", + type: "OrgConnectionCreateRelationships", + required: true, + }, + type: { + baseName: "type", + type: "OrgConnectionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionCreateAttributes.ts b/packages/datadog-api-client-v2/models/OrgConnectionCreateAttributes.ts new file mode 100644 index 000000000000..138cc33ca78f --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionCreateAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionTypeEnum } from "./OrgConnectionTypeEnum"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating an org connection. + */ +export class OrgConnectionCreateAttributes { + /** + * List of connection types to establish. + */ + "connectionTypes": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + connectionTypes: { + baseName: "connection_types", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionCreateRelationships.ts b/packages/datadog-api-client-v2/models/OrgConnectionCreateRelationships.ts new file mode 100644 index 000000000000..1596af53f796 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionCreateRelationships.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionOrgRelationship } from "./OrgConnectionOrgRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships for org connection creation. + */ +export class OrgConnectionCreateRelationships { + /** + * Org relationship. + */ + "sinkOrg": OrgConnectionOrgRelationship; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + sinkOrg: { + baseName: "sink_org", + type: "OrgConnectionOrgRelationship", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionCreateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionCreateRequest.ts b/packages/datadog-api-client-v2/models/OrgConnectionCreateRequest.ts new file mode 100644 index 000000000000..b0a27e37719e --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionCreate } from "./OrgConnectionCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create an org connection. + */ +export class OrgConnectionCreateRequest { + /** + * Org connection creation data. + */ + "data": OrgConnectionCreate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgConnectionCreate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionListResponse.ts b/packages/datadog-api-client-v2/models/OrgConnectionListResponse.ts new file mode 100644 index 000000000000..9c4d984e42f1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionListResponse.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnection } from "./OrgConnection"; +import { OrgConnectionListResponseMeta } from "./OrgConnectionListResponseMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing a list of org connections. + */ +export class OrgConnectionListResponse { + /** + * List of org connections. + */ + "data": Array; + /** + * Pagination metadata. + */ + "meta"?: OrgConnectionListResponseMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + meta: { + baseName: "meta", + type: "OrgConnectionListResponseMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionListResponseMeta.ts b/packages/datadog-api-client-v2/models/OrgConnectionListResponseMeta.ts new file mode 100644 index 000000000000..0e52a4a35c80 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionListResponseMeta.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionListResponseMetaPage } from "./OrgConnectionListResponseMetaPage"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination metadata. + */ +export class OrgConnectionListResponseMeta { + /** + * Page information. + */ + "page"?: OrgConnectionListResponseMetaPage; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + page: { + baseName: "page", + type: "OrgConnectionListResponseMetaPage", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionListResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionListResponseMetaPage.ts b/packages/datadog-api-client-v2/models/OrgConnectionListResponseMetaPage.ts new file mode 100644 index 000000000000..a41998c06af0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionListResponseMetaPage.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Page information. + */ +export class OrgConnectionListResponseMetaPage { + /** + * Total number of org connections. + */ + "totalCount"?: number; + /** + * Total number of org connections matching the filter. + */ + "totalFilteredCount"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + totalCount: { + baseName: "total_count", + type: "number", + format: "int64", + }, + totalFilteredCount: { + baseName: "total_filtered_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionListResponseMetaPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationship.ts b/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationship.ts new file mode 100644 index 000000000000..19cd6d0a2c74 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationship.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionOrgRelationshipData } from "./OrgConnectionOrgRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Org relationship. + */ +export class OrgConnectionOrgRelationship { + /** + * The definition of `OrgConnectionOrgRelationshipData` object. + */ + "data"?: OrgConnectionOrgRelationshipData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgConnectionOrgRelationshipData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionOrgRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationshipData.ts b/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationshipData.ts new file mode 100644 index 000000000000..522c85fc98bd --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationshipData.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionOrgRelationshipDataType } from "./OrgConnectionOrgRelationshipDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `OrgConnectionOrgRelationshipData` object. + */ +export class OrgConnectionOrgRelationshipData { + /** + * Org UUID. + */ + "id"?: string; + /** + * Org name. + */ + "name"?: string; + /** + * The type of the organization relationship. + */ + "type"?: OrgConnectionOrgRelationshipDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + type: { + baseName: "type", + type: "OrgConnectionOrgRelationshipDataType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionOrgRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationshipDataType.ts b/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationshipDataType.ts new file mode 100644 index 000000000000..8232012ef46f --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionOrgRelationshipDataType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of the organization relationship. + */ + +export type OrgConnectionOrgRelationshipDataType = typeof ORGS | UnparsedObject; +export const ORGS = "orgs"; diff --git a/packages/datadog-api-client-v2/models/OrgConnectionRelationships.ts b/packages/datadog-api-client-v2/models/OrgConnectionRelationships.ts new file mode 100644 index 000000000000..ad738aaf4f68 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionRelationships.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionOrgRelationship } from "./OrgConnectionOrgRelationship"; +import { OrgConnectionUserRelationship } from "./OrgConnectionUserRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Related organizations and user. + */ +export class OrgConnectionRelationships { + /** + * User relationship. + */ + "createdBy"?: OrgConnectionUserRelationship; + /** + * Org relationship. + */ + "sinkOrg"?: OrgConnectionOrgRelationship; + /** + * Org relationship. + */ + "sourceOrg"?: OrgConnectionOrgRelationship; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdBy: { + baseName: "created_by", + type: "OrgConnectionUserRelationship", + }, + sinkOrg: { + baseName: "sink_org", + type: "OrgConnectionOrgRelationship", + }, + sourceOrg: { + baseName: "source_org", + type: "OrgConnectionOrgRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionResponse.ts b/packages/datadog-api-client-v2/models/OrgConnectionResponse.ts new file mode 100644 index 000000000000..1efe9481dce0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnection } from "./OrgConnection"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing a single org connection. + */ +export class OrgConnectionResponse { + /** + * An org connection. + */ + "data": OrgConnection; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgConnection", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionType.ts b/packages/datadog-api-client-v2/models/OrgConnectionType.ts new file mode 100644 index 000000000000..eac6b8d7d240 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Org connection type. + */ + +export type OrgConnectionType = typeof ORG_CONNECTION | UnparsedObject; +export const ORG_CONNECTION = "org_connection"; diff --git a/packages/datadog-api-client-v2/models/OrgConnectionTypeEnum.ts b/packages/datadog-api-client-v2/models/OrgConnectionTypeEnum.ts new file mode 100644 index 000000000000..25a27a67436a --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionTypeEnum.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Available connection types between organizations. + */ + +export type OrgConnectionTypeEnum = + | typeof LOGS + | typeof METRICS + | UnparsedObject; +export const LOGS = "logs"; +export const METRICS = "metrics"; diff --git a/packages/datadog-api-client-v2/models/OrgConnectionUpdate.ts b/packages/datadog-api-client-v2/models/OrgConnectionUpdate.ts new file mode 100644 index 000000000000..afd91508cc2b --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionUpdate.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionType } from "./OrgConnectionType"; +import { OrgConnectionUpdateAttributes } from "./OrgConnectionUpdateAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Org connection update data. + */ +export class OrgConnectionUpdate { + /** + * Attributes for updating an org connection. + */ + "attributes": OrgConnectionUpdateAttributes; + /** + * The unique identifier of the org connection. + */ + "id": string; + /** + * Org connection type. + */ + "type": OrgConnectionType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "OrgConnectionUpdateAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "OrgConnectionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionUpdate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionUpdateAttributes.ts b/packages/datadog-api-client-v2/models/OrgConnectionUpdateAttributes.ts new file mode 100644 index 000000000000..313d421ae8aa --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionUpdateAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionTypeEnum } from "./OrgConnectionTypeEnum"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for updating an org connection. + */ +export class OrgConnectionUpdateAttributes { + /** + * Updated list of connection types. + */ + "connectionTypes": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + connectionTypes: { + baseName: "connection_types", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionUpdateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionUpdateRequest.ts b/packages/datadog-api-client-v2/models/OrgConnectionUpdateRequest.ts new file mode 100644 index 000000000000..381dc38a0b61 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionUpdate } from "./OrgConnectionUpdate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to update an org connection. + */ +export class OrgConnectionUpdateRequest { + /** + * Org connection update data. + */ + "data": OrgConnectionUpdate; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgConnectionUpdate", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionUserRelationship.ts b/packages/datadog-api-client-v2/models/OrgConnectionUserRelationship.ts new file mode 100644 index 000000000000..5322a9866582 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionUserRelationship.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionUserRelationshipData } from "./OrgConnectionUserRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * User relationship. + */ +export class OrgConnectionUserRelationship { + /** + * The data for a user relationship. + */ + "data"?: OrgConnectionUserRelationshipData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "OrgConnectionUserRelationshipData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionUserRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionUserRelationshipData.ts b/packages/datadog-api-client-v2/models/OrgConnectionUserRelationshipData.ts new file mode 100644 index 000000000000..1b36bc040d64 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionUserRelationshipData.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { OrgConnectionUserRelationshipDataType } from "./OrgConnectionUserRelationshipDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data for a user relationship. + */ +export class OrgConnectionUserRelationshipData { + /** + * User UUID. + */ + "id"?: string; + /** + * User name. + */ + "name"?: string; + /** + * The type of the user relationship. + */ + "type"?: OrgConnectionUserRelationshipDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + type: { + baseName: "type", + type: "OrgConnectionUserRelationshipDataType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return OrgConnectionUserRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/OrgConnectionUserRelationshipDataType.ts b/packages/datadog-api-client-v2/models/OrgConnectionUserRelationshipDataType.ts new file mode 100644 index 000000000000..418cfc9ddf65 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgConnectionUserRelationshipDataType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of the user relationship. + */ + +export type OrgConnectionUserRelationshipDataType = + | typeof USERS + | UnparsedObject; +export const USERS = "users";