Skip to content

Commit 3da63d7

Browse files
dd-octo-sts[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit d07c88a of spec repo (#4234)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 93a3290 commit 3da63d7

9 files changed

Lines changed: 109 additions & 32 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22492,7 +22492,9 @@ components:
2249222492
$ref: "#/components/schemas/ContainerType"
2249322493
type: object
2249422494
ContainerAttributes:
22495-
description: Attributes for a container.
22495+
description: |-
22496+
Attributes for a container. For CPU or memory metrics, use its full `container_id` as
22497+
`container_id:<container_id>` in `tag_filters` with the `container` data source.
2249622498
properties:
2249722499
container_id:
2249822500
description: The ID of the container.
@@ -22559,7 +22561,8 @@ components:
2255922561
description: Attributes for a container group.
2256022562
properties:
2256122563
count:
22562-
description: Number of containers in the group.
22564+
description: >-
22565+
Number of containers in the group. A container with multiple values for a grouping tag can appear in multiple groups. Summing group counts can overcount distinct containers.
2256322566
format: int64
2256422567
type: integer
2256522568
tags:
@@ -22573,7 +22576,10 @@ components:
2257322576
$ref: "#/components/schemas/ContainerGroupRelationshipsLink"
2257422577
type: object
2257522578
ContainerGroupRelationshipsData:
22576-
description: Links data.
22579+
description: |-
22580+
This array is always empty, even when the group includes containers. To retrieve the containers
22581+
in this group, make a new request to this endpoint with the `filter[tags]` value from
22582+
`links.related`, using your site's API host.
2257722583
items:
2257822584
description: A link data.
2257922585
type: string
@@ -22925,20 +22931,22 @@ components:
2292522931
description: The cursor used to get the current results, if any.
2292622932
type: string
2292722933
limit:
22928-
description: Number of results returned
22934+
description: Maximum number of results requested.
2292922935
format: int32
2293022936
maximum: 10000
2293122937
minimum: 0
2293222938
type: integer
2293322939
next_cursor:
22934-
description: The cursor used to get the next results, if any.
22940+
description: |-
22941+
The cursor used to get the next results, if any. To make the next request, use the same
22942+
parameters with the addition of the `page[cursor]`. Empty for grouped results.
2293522943
type: string
2293622944
prev_cursor:
2293722945
description: The cursor used to get the previous results, if any.
2293822946
nullable: true
2293922947
type: string
2294022948
total:
22941-
description: Total number of records that match the query.
22949+
description: Total number of containers that match the query. Always `0` for grouped results.
2294222950
format: int64
2294322951
type: integer
2294422952
type:
@@ -23046,7 +23054,7 @@ components:
2304623054
description: List of containers.
2304723055
properties:
2304823056
data:
23049-
description: Array of Container objects.
23057+
description: Array of containers or container group objects.
2305023058
items:
2305123059
$ref: "#/components/schemas/ContainerItem"
2305223060
type: array
@@ -158040,31 +158048,49 @@ paths:
158040158048
permissions: []
158041158049
/api/v2/containers:
158042158050
get:
158043-
description: Get all containers for your organization.
158051+
description: |-
158052+
Get all containers for your organization. Use `group_by` to return container groups with counts.
158053+
Grouped results are limited by `page[size]` and do not support pagination.
158054+
158055+
To get CPU or memory metrics, use a `container` data source query with `/api/v2/query/scalar`
158056+
or `/api/v2/query/timeseries`.
158044158057
operationId: ListContainers
158045158058
parameters:
158046-
- description: Comma-separated list of tags to filter containers by.
158059+
- description: |-
158060+
Comma-separated `key:value` tags. A container must match every tag. Wildcards, negation
158061+
(`-key:value`), spaces, and `IN (...)` are not supported. To cover several hosts, make one
158062+
request per host.
158047158063
example: env:prod,short_image:cassandra
158048158064
in: query
158049158065
name: filter[tags]
158050158066
required: false
158051158067
schema:
158052158068
type: string
158053-
- description: Comma-separated list of tags to group containers by.
158069+
- description: |-
158070+
Comma-separated list of up to three tag keys to group containers by. Returns `container_group`
158071+
objects with counts and tags. Grouped results ignore `sort` and do not support pagination.
158072+
Containers with multiple values for a grouping tag can appear in multiple groups.
158073+
Summing group counts can overcount distinct containers.
158054158074
example: datacenter,cluster
158055158075
in: query
158056158076
name: group_by
158057158077
required: false
158058158078
schema:
158059158079
type: string
158060-
- description: Attribute to sort containers by.
158080+
- description: |-
158081+
Attribute to sort individual containers by: `name`, `created_at`, `started_at`, `state`,
158082+
`container_id`, `host`, `image_name`, or `image_digest`. Defaults to `started_at` in ascending
158083+
order. Prefix the attribute with `-` for descending order, such as `-started_at`.
158084+
Ignored when `group_by` is specified.
158061158085
example: started_at
158062158086
in: query
158063158087
name: sort
158064158088
required: false
158065158089
schema:
158066158090
type: string
158067-
- description: Maximum number of results returned.
158091+
- description: |-
158092+
Maximum number of results returned. For grouped results, defaults to `100` with a maximum
158093+
of `1000` groups.
158068158094
in: query
158069158095
name: page[size]
158070158096
required: false
@@ -158103,6 +158129,27 @@ paths:
158103158129
limit: 1000
158104158130
total: 1
158105158131
type: cursor_limit
158132+
grouped:
158133+
summary: Containers grouped by short_image
158134+
value:
158135+
data:
158136+
- attributes:
158137+
count: 3
158138+
tags:
158139+
short_image: nginx
158140+
id: short_image:nginx
158141+
relationships:
158142+
containers:
158143+
data: []
158144+
links:
158145+
related: https://api.datadoghq.com/api/v2/containers?filter[tags]=short_image:nginx
158146+
type: container_group
158147+
meta:
158148+
pagination:
158149+
limit: 100
158150+
next_cursor: ""
158151+
total: 0
158152+
type: cursor_limit
158106158153
schema:
158107158154
$ref: "#/components/schemas/ContainersResponse"
158108158155
description: OK
@@ -255840,7 +255887,8 @@ tags:
255840255887
The Container Images API allows you to query Container Image data for your organization. See the [Container Images View page](https://docs.datadoghq.com/infrastructure/containers/container_images/) for more information.
255841255888
name: Container Images
255842255889
- description: |-
255843-
The Containers API allows you to query container data for your organization. See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for more information.
255890+
The Containers API allows you to query container data for your organization.
255891+
See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for more information.
255844255892
name: Containers
255845255893
- description: |-
255846255894
Programmatic management of a customer's Datadog organization. Use this API to perform

‎src/datadog_api_client/v2/api/containers_api.py‎

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
class ContainersApi:
2222
"""
23-
The Containers API allows you to query container data for your organization. See the `Container Monitoring page <https://docs.datadoghq.com/containers/>`_ for more information.
23+
The Containers API allows you to query container data for your organization.
24+
See the `Container Monitoring page <https://docs.datadoghq.com/containers/>`_ for more information.
2425
"""
2526

2627
def __init__(self, api_client=None):
@@ -85,15 +86,28 @@ def list_containers(
8586
) -> ContainersResponse:
8687
"""Get All Containers.
8788
88-
Get all containers for your organization.
89+
Get all containers for your organization. Use ``group_by`` to return container groups with counts.
90+
Grouped results are limited by ``page[size]`` and do not support pagination.
8991
90-
:param filter_tags: Comma-separated list of tags to filter containers by.
92+
To get CPU or memory metrics, use a ``container`` data source query with ``/api/v2/query/scalar``
93+
or ``/api/v2/query/timeseries``.
94+
95+
:param filter_tags: Comma-separated ``key:value`` tags. A container must match every tag. Wildcards, negation
96+
( ``-key:value`` ), spaces, and ``IN (...)`` are not supported. To cover several hosts, make one
97+
request per host.
9198
:type filter_tags: str, optional
92-
:param group_by: Comma-separated list of tags to group containers by.
99+
:param group_by: Comma-separated list of up to three tag keys to group containers by. Returns ``container_group``
100+
objects with counts and tags. Grouped results ignore ``sort`` and do not support pagination.
101+
Containers with multiple values for a grouping tag can appear in multiple groups.
102+
Summing group counts can overcount distinct containers.
93103
:type group_by: str, optional
94-
:param sort: Attribute to sort containers by.
104+
:param sort: Attribute to sort individual containers by: ``name`` , ``created_at`` , ``started_at`` , ``state`` ,
105+
``container_id`` , ``host`` , ``image_name`` , or ``image_digest``. Defaults to ``started_at`` in ascending
106+
order. Prefix the attribute with ``-`` for descending order, such as ``-started_at``.
107+
Ignored when ``group_by`` is specified.
95108
:type sort: str, optional
96-
:param page_size: Maximum number of results returned.
109+
:param page_size: Maximum number of results returned. For grouped results, defaults to ``100`` with a maximum
110+
of ``1000`` groups.
97111
:type page_size: int, optional
98112
:param page_cursor: String to query the next page of results.
99113
This key is provided with each valid response from the API in ``meta.pagination.next_cursor``.
@@ -131,13 +145,22 @@ def list_containers_with_pagination(
131145
132146
Provide a paginated version of :meth:`list_containers`, returning all items.
133147
134-
:param filter_tags: Comma-separated list of tags to filter containers by.
148+
:param filter_tags: Comma-separated ``key:value`` tags. A container must match every tag. Wildcards, negation
149+
( ``-key:value`` ), spaces, and ``IN (...)`` are not supported. To cover several hosts, make one
150+
request per host.
135151
:type filter_tags: str, optional
136-
:param group_by: Comma-separated list of tags to group containers by.
152+
:param group_by: Comma-separated list of up to three tag keys to group containers by. Returns ``container_group``
153+
objects with counts and tags. Grouped results ignore ``sort`` and do not support pagination.
154+
Containers with multiple values for a grouping tag can appear in multiple groups.
155+
Summing group counts can overcount distinct containers.
137156
:type group_by: str, optional
138-
:param sort: Attribute to sort containers by.
157+
:param sort: Attribute to sort individual containers by: ``name`` , ``created_at`` , ``started_at`` , ``state`` ,
158+
``container_id`` , ``host`` , ``image_name`` , or ``image_digest``. Defaults to ``started_at`` in ascending
159+
order. Prefix the attribute with ``-`` for descending order, such as ``-started_at``.
160+
Ignored when ``group_by`` is specified.
139161
:type sort: str, optional
140-
:param page_size: Maximum number of results returned.
162+
:param page_size: Maximum number of results returned. For grouped results, defaults to ``100`` with a maximum
163+
of ``1000`` groups.
141164
:type page_size: int, optional
142165
:param page_cursor: String to query the next page of results.
143166
This key is provided with each valid response from the API in ``meta.pagination.next_cursor``.

‎src/datadog_api_client/v2/model/container.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def __init__(
4646
"""
4747
Container object.
4848
49-
:param attributes: Attributes for a container.
49+
:param attributes: Attributes for a container. For CPU or memory metrics, use its full ``container_id`` as
50+
``container_id:<container_id>`` in ``tag_filters`` with the ``container`` data source.
5051
:type attributes: ContainerAttributes, optional
5152
5253
:param id: Container ID.

‎src/datadog_api_client/v2/model/container_attributes.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def __init__(
5858
**kwargs,
5959
):
6060
"""
61-
Attributes for a container.
61+
Attributes for a container. For CPU or memory metrics, use its full ``container_id`` as
62+
``container_id:<container_id>`` in ``tag_filters`` with the ``container`` data source.
6263
6364
:param container_id: The ID of the container.
6465
:type container_id: str, optional

‎src/datadog_api_client/v2/model/container_group_attributes.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self_, count: Union[int, UnsetType] = unset, tags: Union[dict, Unse
3030
"""
3131
Attributes for a container group.
3232
33-
:param count: Number of containers in the group.
33+
:param count: Number of containers in the group. A container with multiple values for a grouping tag can appear in multiple groups. Summing group counts can overcount distinct containers.
3434
:type count: int, optional
3535
3636
:param tags: Tags from the group name parsed in key/value format.

‎src/datadog_api_client/v2/model/container_group_relationships_link.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def __init__(
4141
"""
4242
Relationships to Containers inside a Container Group.
4343
44-
:param data: Links data.
44+
:param data: This array is always empty, even when the group includes containers. To retrieve the containers
45+
in this group, make a new request to this endpoint with the ``filter[tags]`` value from
46+
``links.related`` , using your site's API host.
4547
:type data: [str], optional
4648
4749
:param links: Links attributes.

‎src/datadog_api_client/v2/model/container_item.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def __init__(self, **kwargs):
1515
"""
1616
Possible Container models.
1717
18-
:param attributes: Attributes for a container.
18+
:param attributes: Attributes for a container. For CPU or memory metrics, use its full `container_id` as
19+
`container_id:<container_id>` in `tag_filters` with the `container` data source.
1920
:type attributes: ContainerAttributes, optional
2021
2122
:param id: Container ID.

‎src/datadog_api_client/v2/model/container_meta_page.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ def __init__(
6464
:param cursor: The cursor used to get the current results, if any.
6565
:type cursor: str, optional
6666
67-
:param limit: Number of results returned
67+
:param limit: Maximum number of results requested.
6868
:type limit: int, optional
6969
70-
:param next_cursor: The cursor used to get the next results, if any.
70+
:param next_cursor: The cursor used to get the next results, if any. To make the next request, use the same
71+
parameters with the addition of the ``page[cursor]``. Empty for grouped results.
7172
:type next_cursor: str, optional
7273
7374
:param prev_cursor: The cursor used to get the previous results, if any.
7475
:type prev_cursor: str, none_type, optional
7576
76-
:param total: Total number of records that match the query.
77+
:param total: Total number of containers that match the query. Always ``0`` for grouped results.
7778
:type total: int, optional
7879
7980
:param type: Type of Container pagination.

‎src/datadog_api_client/v2/model/containers_response.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __init__(
5050
"""
5151
List of containers.
5252
53-
:param data: Array of Container objects.
53+
:param data: Array of containers or container group objects.
5454
:type data: [ContainerItem], optional
5555
5656
:param links: Pagination links.

0 commit comments

Comments
 (0)