Skip to main content

opsgenie_accounts

Creates, updates, deletes, gets or lists an opsgenie_accounts resource.

Overview

Nameopsgenie_accounts
TypeResource
Iddatadog.integrations.opsgenie_accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the Opsgenie account. (example: 596da4af-0563-4097-90ff-07230c3f9db3)
attributesobjectThe attributes from an Opsgenie account response.
typestringOpsgenie account resource type. (opsgenie-account) (default: opsgenie-account, example: opsgenie-account)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_opsgenie_accountsselectGet a list of all Opsgenie accounts from the Datadog Opsgenie integration.
create_opsgenie_accountinsertdataCreate a new Opsgenie account in the Datadog Opsgenie integration.
update_opsgenie_accountupdateaccount_id, dataUpdate a single Opsgenie account in the Datadog Opsgenie integration.
delete_opsgenie_accountdeleteaccount_idDelete a single Opsgenie account from the Datadog Opsgenie integration.

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
account_idstringThe UUID of the Opsgenie account.
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.

SELECT examples

Get a list of all Opsgenie accounts from the Datadog Opsgenie integration.

SELECT
id,
attributes,
type
FROM datadog.integrations.opsgenie_accounts
;

INSERT examples

Create a new Opsgenie account in the Datadog Opsgenie integration.

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

UPDATE examples

Update a single Opsgenie account in the Datadog Opsgenie integration.

UPDATE datadog.integrations.opsgenie_accounts
SET
data = '{{ data }}'
WHERE
account_id = '{{ account_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Delete a single Opsgenie account from the Datadog Opsgenie integration.

DELETE FROM datadog.integrations.opsgenie_accounts
WHERE account_id = '{{ account_id }}' --required
;