opsgenie_accounts
Creates, updates, deletes, gets or lists an opsgenie_accounts resource.
Overview
| Name | opsgenie_accounts |
| Type | Resource |
| Id | datadog.integrations.opsgenie_accounts |
Fields
The following fields are returned by SELECT queries:
- list_opsgenie_accounts
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Opsgenie account. (example: 596da4af-0563-4097-90ff-07230c3f9db3) |
attributes | object | The attributes from an Opsgenie account response. |
type | string | Opsgenie account resource type. (opsgenie-account) (default: opsgenie-account, example: opsgenie-account) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_opsgenie_accounts | select | Get a list of all Opsgenie accounts from the Datadog Opsgenie integration. | ||
create_opsgenie_account | insert | data | Create a new Opsgenie account in the Datadog Opsgenie integration. | |
update_opsgenie_account | update | account_id, data | Update a single Opsgenie account in the Datadog Opsgenie integration. | |
delete_opsgenie_account | delete | account_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The UUID of the Opsgenie account. |
site | string | The 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
- list_opsgenie_accounts
Get a list of all Opsgenie accounts from the Datadog Opsgenie integration.
SELECT
id,
attributes,
type
FROM datadog.integrations.opsgenie_accounts
;
INSERT examples
- create_opsgenie_account
- Manifest
Create a new Opsgenie account in the Datadog Opsgenie integration.
INSERT INTO datadog.integrations.opsgenie_accounts (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: opsgenie_accounts
props:
- name: data
description: |
Opsgenie account data for a create request.
value:
attributes:
api_key: "{{ api_key }}"
region: "{{ region }}"
type: "{{ type }}"
UPDATE examples
- update_opsgenie_account
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_opsgenie_account
Delete a single Opsgenie account from the Datadog Opsgenie integration.
DELETE FROM datadog.integrations.opsgenie_accounts
WHERE account_id = '{{ account_id }}' --required
;