containers
Creates, updates, deletes, gets or lists a containers resource.
Overview
| Name | containers |
| Type | Resource |
| Id | datadog.infrastructure.containers |
Fields
The following fields are returned by SELECT queries:
- list_containers
| Name | Datatype | Description |
|---|---|---|
id | string | Container ID. |
attributes | object | Attributes for a container. |
relationships | object | Relationships to containers inside a container group. |
type | string | Type of container. (container) (default: container, example: container) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_containers | select | filter[tags], group_by, sort, page[size], page[cursor] | Get all containers for your organization. |
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 |
|---|---|---|
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[tags] | string | Comma-separated list of tags to filter containers by. (example: env:prod,short_image:cassandra) |
group_by | string | Comma-separated list of tags to group containers by. (example: datacenter,cluster) |
page[cursor] | string | String to query the next page of results. This key is provided with each valid response from the API in meta.pagination.next_cursor. |
page[size] | integer (int32) | Maximum number of results returned. |
sort | string | Attribute to sort containers by. (example: started_at) |
SELECT examples
- list_containers
Get all containers for your organization.
SELECT
id,
attributes,
relationships,
type
FROM datadog.infrastructure.containers
WHERE filter[tags] = '{{ filter[tags] }}'
AND group_by = '{{ group_by }}'
AND sort = '{{ sort }}'
AND page[size] = '{{ page[size] }}'
AND page[cursor] = '{{ page[cursor] }}'
;