Skip to main content

connections

Creates, updates, deletes, gets or lists a connections resource.

Overview

Nameconnections
TypeResource
Iddatadog.organization.connections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The unique identifier of the org connection. (example: f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a)
attributesobjectOrg connection attributes.
relationshipsobjectRelated organizations and user.
typestringOrg connection type. (org_connection) (example: org_connection)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_org_connectionsselectsink_org_id, source_org_id, limit, offsetReturns a list of org connections.
create_org_connectionsinsertdataCreate a new org connection between the current org and a target org.
update_org_connectionsupdateconnection_id, dataUpdate an existing org connection.
delete_org_connectionsdeleteconnection_idDelete an existing org connection.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
connection_idstring (uuid)The unique identifier of the org connection.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
limitinteger (int64)The limit of number of entries you want to return. Default is 1000. (example: 1000)
offsetinteger (int64)The pagination offset which you want to query from. Default is 0. (example: 0)
sink_org_idstringThe Org ID of the sink org. (example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1)
source_org_idstringThe Org ID of the source org. (example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1)

SELECT examples

Returns a list of org connections.

SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.connections
WHERE sink_org_id = '{{ sink_org_id }}'
AND source_org_id = '{{ source_org_id }}'
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
;

INSERT examples

Create a new org connection between the current org and a target org.

INSERT INTO datadog.organization.connections (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;

UPDATE examples

Update an existing org connection.

UPDATE datadog.organization.connections
SET
data = '{{ data }}'
WHERE
connection_id = '{{ connection_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete an existing org connection.

DELETE FROM datadog.organization.connections
WHERE connection_id = '{{ connection_id }}' --required
;