catalog_entities
Creates, updates, deletes, gets or lists a catalog_entities resource.
Overview
| Name | catalog_entities |
| Type | Resource |
| Id | datadog.catalog.catalog_entities |
Fields
The following fields are returned by SELECT queries:
- list_catalog_entity
| Name | Datatype | Description |
|---|---|---|
id | string | Entity ID. |
attributes | object | Entity attributes. |
meta | object | Entity metadata. |
relationships | object | Entity relationships. |
type | string | Entity. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_catalog_entity | select | page[offset], page[limit], filter[id], filter[ref], filter[name], filter[kind], filter[owner], filter[relation][type], filter[exclude_snapshot], include, include_discovered | Get a list of entities from Software Catalog. | |
upsert_catalog_entity | insert | api_version, kind, metadata | Create or update entities in Software Catalog. | |
delete_catalog_entity | delete | entity_id | Delete a single entity in Software Catalog. | |
preview_catalog_entities | exec |
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 |
|---|---|---|
entity_id | string | UUID or Entity Ref. |
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. |
filter[exclude_snapshot] | string | Filter entities by excluding snapshotted entities. |
filter[id] | string | Filter entities by UUID. |
filter[kind] | string | Filter entities by kind. |
filter[name] | string | Filter entities by name. |
filter[owner] | string | Filter entities by owner. |
filter[ref] | string | Filter entities by reference (example: service:shopping-cart) |
filter[relation][type] | string | Filter entities by relation type. |
include | string | Include relationship data. |
include_discovered | boolean | If true, includes discovered services from APM and USM that do not have entity definitions. (wire: includeDiscovered) |
page[limit] | integer (int64) | Maximum number of entities in the response. (example: 100) |
page[offset] | integer (int64) | Specific offset to use as the beginning of the returned page. |
SELECT examples
- list_catalog_entity
Get a list of entities from Software Catalog.
SELECT
id,
attributes,
meta,
relationships,
type
FROM datadog.catalog.catalog_entities
WHERE page[offset] = '{{ page[offset] }}'
AND page[limit] = '{{ page[limit] }}'
AND filter[id] = '{{ filter[id] }}'
AND filter[ref] = '{{ filter[ref] }}'
AND filter[name] = '{{ filter[name] }}'
AND filter[kind] = '{{ filter[kind] }}'
AND filter[owner] = '{{ filter[owner] }}'
AND filter[relation][type] = '{{ filter[relation][type] }}'
AND filter[exclude_snapshot] = '{{ filter[exclude_snapshot] }}'
AND include = '{{ include }}'
AND include_discovered = '{{ include_discovered }}'
;
INSERT examples
- upsert_catalog_entity
- Manifest
Create or update entities in Software Catalog.
INSERT INTO datadog.catalog.catalog_entities (
api_version,
datadog,
extensions,
integrations,
kind,
metadata,
spec
)
SELECT
'{{ api_version }}' /* required */,
'{{ datadog }}',
'{{ extensions }}',
'{{ integrations }}',
'{{ kind }}' /* required */,
'{{ metadata }}' /* required */,
'{{ spec }}'
RETURNING
data,
included,
meta
;
# Description fields are for documentation purposes
- name: catalog_entities
props:
- name: api_version
value: "{{ api_version }}"
description: |
The version of the schema data that was used to populate this entity's data. This could be via the API, Terraform, or YAML file in a repository. The field is known as schema-version in the previous version.
valid_values: ['v3', 'v2.2', 'v2.1', 'v2']
- name: datadog
description: |
Datadog product integrations for the service entity.
value:
codeLocations:
- paths: "{{ paths }}"
repositoryURL: "{{ repositoryURL }}"
events:
- name: "{{ name }}"
query: "{{ query }}"
logs:
- name: "{{ name }}"
query: "{{ query }}"
performanceData:
tags:
- "{{ tags }}"
pipelines:
fingerprints:
- "{{ fingerprints }}"
- name: extensions
value: "{{ extensions }}"
description: |
Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
- name: integrations
description: |
A base schema for defining third-party integrations.
value:
opsgenie:
region: "{{ region }}"
serviceURL: "{{ serviceURL }}"
pagerduty:
serviceURL: "{{ serviceURL }}"
- name: kind
value: "{{ kind }}"
description: |
The definition of Entity V3 Service Kind object.
valid_values: ['service']
- name: metadata
description: |
The definition of Entity V3 Metadata object.
value:
additionalOwners:
- name: "{{ name }}"
type: "{{ type }}"
contacts:
- contact: "{{ contact }}"
name: "{{ name }}"
type: "{{ type }}"
description: "{{ description }}"
displayName: "{{ displayName }}"
id: "{{ id }}"
inheritFrom: "{{ inheritFrom }}"
links:
- name: "{{ name }}"
provider: "{{ provider }}"
type: "{{ type }}"
url: "{{ url }}"
managed: "{{ managed }}"
name: "{{ name }}"
namespace: "{{ namespace }}"
owner: "{{ owner }}"
tags:
- "{{ tags }}"
- name: spec
description: |
The definition of Entity V3 Service Spec object.
value:
componentOf:
- "{{ componentOf }}"
dependsOn:
- "{{ dependsOn }}"
languages:
- "{{ languages }}"
lifecycle: "{{ lifecycle }}"
tier: "{{ tier }}"
type: "{{ type }}"
DELETE examples
- delete_catalog_entity
Delete a single entity in Software Catalog.
DELETE FROM datadog.catalog.catalog_entities
WHERE entity_id = '{{ entity_id }}' --required
;
Lifecycle Methods
EXEC variables use wire (API) names.
- preview_catalog_entities
Accepted
EXEC datadog.catalog.catalog_entities.preview_catalog_entities
;