Skip to main content

statuspage_components

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

Overview

Namestatuspage_components
TypeResource
Iddatadog.service_management.statuspage_components

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The ID of the component.
attributesobjectThe attributes of a component.
relationshipsobjectThe relationships of a component.
typestringComponents resource type. (components) (default: components, example: components)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_componentselectpage_id, component_idincludeRetrieves a specific component by its ID.
list_componentsselectpage_idincludeLists all components for a status page.
create_componentinsertpage_idincludeCreates a new component.
update_componentupdatepage_id, component_idincludeUpdates an existing component's attributes.
delete_componentdeletepage_id, component_idDeletes a component by its ID.

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
component_idstring (uuid)The ID of the component.
page_idstring (uuid)The ID of the status page.
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.
includestringComma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.

SELECT examples

Retrieves a specific component by its ID.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.statuspage_components
WHERE page_id = '{{ page_id }}' -- required
AND component_id = '{{ component_id }}' -- required
AND include = '{{ include }}'
;

INSERT examples

Creates a new component.

INSERT INTO datadog.service_management.statuspage_components (
data,
page_id,
include
)
SELECT
'{{ data }}',
'{{ page_id }}',
'{{ include }}'
RETURNING
data,
included
;

UPDATE examples

Updates an existing component's attributes.

UPDATE datadog.service_management.statuspage_components
SET
data = '{{ data }}'
WHERE
page_id = '{{ page_id }}' --required
AND component_id = '{{ component_id }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;

DELETE examples

Deletes a component by its ID.

DELETE FROM datadog.service_management.statuspage_components
WHERE page_id = '{{ page_id }}' --required
AND component_id = '{{ component_id }}' --required
;