statuspage_components
Creates, updates, deletes, gets or lists a statuspage_components resource.
Overview
| Name | statuspage_components |
| Type | Resource |
| Id | datadog.service_management.statuspage_components |
Fields
The following fields are returned by SELECT queries:
- get_component
- list_components
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the component. |
attributes | object | The attributes of a component. |
relationships | object | The relationships of a component. |
type | string | Components resource type. (components) (default: components, example: components) |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the component. |
attributes | object | The attributes of a component. |
relationships | object | The relationships of a component. |
type | string | Components resource type. (components) (default: components, example: components) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_component | select | page_id, component_id | include | Retrieves a specific component by its ID. |
list_components | select | page_id | include | Lists all components for a status page. |
create_component | insert | page_id | include | Creates a new component. |
update_component | update | page_id, component_id | include | Updates an existing component's attributes. |
delete_component | delete | page_id, component_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
component_id | string (uuid) | The ID of the component. |
page_id | string (uuid) | The ID of the status page. |
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. |
include | string | Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group. |
SELECT examples
- get_component
- list_components
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 }}'
;
Lists all components for a status page.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.statuspage_components
WHERE page_id = '{{ page_id }}' -- required
AND include = '{{ include }}'
;
INSERT examples
- create_component
- Manifest
Creates a new component.
INSERT INTO datadog.service_management.statuspage_components (
data,
page_id,
include
)
SELECT
'{{ data }}',
'{{ page_id }}',
'{{ include }}'
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: statuspage_components
props:
- name: page_id
value: "{{ page_id }}"
description: Required parameter for the statuspage_components resource.
- name: data
description: |
The data object for creating a component.
value:
attributes:
components:
- name: "{{ name }}"
position: {{ position }}
type: "{{ type }}"
name: "{{ name }}"
position: {{ position }}
type: "{{ type }}"
relationships:
group:
data:
id: "{{ id }}"
type: "{{ type }}"
type: "{{ type }}"
- name: include
value: "{{ include }}"
description: Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.
description: Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page, group.
UPDATE examples
- update_component
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
- delete_component
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
;