Skip to content

Commit 356efed

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e7c3997 of spec repo
1 parent 3d77f00 commit 356efed

7 files changed

Lines changed: 66 additions & 64 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4180,14 +4180,14 @@ components:
41804180
type: boolean
41814181
type: object
41824182
HostTags:
4183-
description: Set of tags to associate with your host.
4183+
description: Host name and an array of its tags
41844184
properties:
41854185
host:
41864186
description: Your host name.
41874187
example: test.host
41884188
type: string
41894189
tags:
4190-
description: A list of tags to apply to the host.
4190+
description: A list of tags associated with a host.
41914191
items:
41924192
description: A given tag in a list.
41934193
example: environment:production
@@ -18703,18 +18703,18 @@ components:
1870318703
- match
1870418704
type: object
1870518705
TagToHosts:
18706-
description: In this object, the key is the tag, the value is a list of host
18707-
names that are reporting that tag.
18706+
description: In this object, the key is the tag, and the value is a list of
18707+
host names that are reporting that tag.
1870818708
properties:
1870918709
tags:
1871018710
additionalProperties:
18711-
description: A list of additional properties for tags.
18711+
description: A list of host names which contain this tag
1871218712
items:
1871318713
description: A given tag in a list.
1871418714
example: test.metric.host
1871518715
type: string
1871618716
type: array
18717-
description: A list of tags to apply to the host.
18717+
description: A mapping of tags to host names
1871818718
type: object
1871918719
type: object
1872018720
TargetFormatType:
@@ -35726,11 +35726,13 @@ paths:
3572635726
- synthetics_global_variable_write
3572735727
/api/v1/tags/hosts:
3572835728
get:
35729-
description: Return a mapping of tags to hosts for your whole infrastructure.
35729+
description: Returns a mapping of tags to hosts. For each tag, the response
35730+
returns a list of host names that contain this tag. There is a restriction
35731+
of 10k total host names from the org that can be attached to tags and returned.
3573035732
operationId: ListHostTags
3573135733
parameters:
35732-
- description: When specified, filters host list to those tags with the specified
35733-
source.
35734+
- description: Source to filter. [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
35735+
Use "user" source for custom-defined tags.
3573435736
in: query
3573535737
name: source
3573635738
required: false
@@ -35761,29 +35763,29 @@ paths:
3576135763
- apiKeyAuth: []
3576235764
appKeyAuth: []
3576335765
- AuthZ: []
35764-
summary: Get Tags
35766+
summary: Get All Host Tags
3576535767
tags:
3576635768
- Tags
3576735769
x-permission:
3576835770
operator: OPEN
3576935771
permissions: []
3577035772
/api/v1/tags/hosts/{host_name}:
3577135773
delete:
35772-
description: 'This endpoint allows you to remove all user-assigned tags
35774+
description: 'This endpoint allows you to remove all tags
3577335775

35774-
for a single host.'
35776+
for a single host. If no source is specified, only deletes from the source
35777+
"User".'
3577535778
operationId: DeleteHostTags
3577635779
parameters:
35777-
- description: This endpoint allows you to remove all user-assigned tags for
35778-
a single host.
35780+
- description: Specified host name to delete tags
3577935781
in: path
3578035782
name: host_name
3578135783
required: true
3578235784
schema:
3578335785
type: string
35784-
- description: 'The source of the tags (for example chef, puppet).
35785-
35786-
[Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).'
35786+
- description: Source of the tags to be deleted. [Complete list of source attribute
35787+
values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
35788+
Use "user" source for custom-defined tags.
3578735789
in: query
3578835790
name: source
3578935791
required: false
@@ -35813,14 +35815,14 @@ paths:
3581335815
description: Return the list of tags that apply to a given host.
3581435816
operationId: GetHostTags
3581535817
parameters:
35816-
- description: When specified, filters list of tags to those tags with the specified
35817-
source.
35818+
- description: Name of the host to retrieve tags for
3581835819
in: path
3581935820
name: host_name
3582035821
required: true
3582135822
schema:
3582235823
type: string
35823-
- description: Source to filter.
35824+
- description: Source to filter. [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
35825+
Use "user" source for custom-defined tags.
3582435826
in: query
3582535827
name: source
3582635828
required: false
@@ -35847,25 +35849,25 @@ paths:
3584735849
description: Not Found
3584835850
'429':
3584935851
$ref: '#/components/responses/TooManyRequestsResponse'
35850-
summary: Get host tags
35852+
summary: Get Host Tags
3585135853
tags:
3585235854
- Tags
3585335855
post:
3585435856
description: 'This endpoint allows you to add new tags to a host,
3585535857

35856-
optionally specifying where these tags come from.'
35858+
optionally specifying what source these tags come from. If tags already exist,
35859+
appends new tags to the tag list. If no source is specified, defaults to "user".'
3585735860
operationId: CreateHostTags
3585835861
parameters:
35859-
- description: This endpoint allows you to add new tags to a host, optionally
35860-
specifying where the tags came from.
35862+
- description: Specified host name to add new tags
3586135863
in: path
3586235864
name: host_name
3586335865
required: true
3586435866
schema:
3586535867
type: string
35866-
- description: 'The source of the tags.
35867-
35868-
[Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).'
35868+
- description: Source to add tags. [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
35869+
Use "user" source for custom-defined tags. If no source is specified, defaults
35870+
to "user".
3586935871
example: chef
3587035872
in: query
3587135873
name: source
@@ -35910,16 +35912,15 @@ paths:
3591035912
an integration source with those supplied in the request.'
3591135913
operationId: UpdateHostTags
3591235914
parameters:
35913-
- description: This endpoint allows you to update/replace all in an integration
35914-
source with those supplied in the request.
35915+
- description: Specified host name to change tags
3591535916
in: path
3591635917
name: host_name
3591735918
required: true
3591835919
schema:
3591935920
type: string
35920-
- description: 'The source of the tags (for example chef, puppet).
35921-
35922-
[Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value)'
35921+
- description: Source to update tags. [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
35922+
Use "user" source for custom-defined tags. If no source specified, defaults
35923+
to "user".
3592335924
in: query
3592435925
name: source
3592535926
required: false
@@ -38935,7 +38936,8 @@ tags:
3893538936

3893638937
by a source. For example, some valid sources include nagios, hudson, jenkins,
3893738938

38938-
users, feed, chef, puppet, git, bitbucket, fabric, capistrano, etc.
38939+
users, feed, chef, puppet, git, bitbucket, fabric, capistrano, etc. Find a complete
38940+
list of source type names under [API Source Attributes](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
3893938941

3894038942

3894138943
Read more about tags on [Getting Started with Tags](https://docs.datadoghq.com/getting_started/tagging/).'

examples/v1/tags/GetHostTags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get host tags returns "OK" response
2+
Get Host Tags returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration

examples/v1/tags/ListHostTags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get Tags returns "OK" response
2+
Get All Host Tags returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration

src/datadog_api_client/v1/api/tags_api.py

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TagsApi:
2525
2626
The component of your infrastructure responsible for a tag is identified
2727
by a source. For example, some valid sources include nagios, hudson, jenkins,
28-
users, feed, chef, puppet, git, bitbucket, fabric, capistrano, etc.
28+
users, feed, chef, puppet, git, bitbucket, fabric, capistrano, etc. Find a complete list of source type names under `API Source Attributes <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_.
2929
3030
Read more about tags on `Getting Started with Tags <https://docs.datadoghq.com/getting_started/tagging/>`_.
3131
"""
@@ -185,14 +185,13 @@ def create_host_tags(
185185
"""Add tags to a host.
186186
187187
This endpoint allows you to add new tags to a host,
188-
optionally specifying where these tags come from.
188+
optionally specifying what source these tags come from. If tags already exist, appends new tags to the tag list. If no source is specified, defaults to "user".
189189
190-
:param host_name: This endpoint allows you to add new tags to a host, optionally specifying where the tags came from.
190+
:param host_name: Specified host name to add new tags
191191
:type host_name: str
192192
:param body: Update host tags request body.
193193
:type body: HostTags
194-
:param source: The source of the tags.
195-
`Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_.
194+
:param source: Source to add tags. `Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_. Use "user" source for custom-defined tags. If no source is specified, defaults to "user".
196195
:type source: str, optional
197196
:rtype: HostTags
198197
"""
@@ -214,13 +213,12 @@ def delete_host_tags(
214213
) -> None:
215214
"""Remove host tags.
216215
217-
This endpoint allows you to remove all user-assigned tags
218-
for a single host.
216+
This endpoint allows you to remove all tags
217+
for a single host. If no source is specified, only deletes from the source "User".
219218
220-
:param host_name: This endpoint allows you to remove all user-assigned tags for a single host.
219+
:param host_name: Specified host name to delete tags
221220
:type host_name: str
222-
:param source: The source of the tags (for example chef, puppet).
223-
`Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_.
221+
:param source: Source of the tags to be deleted. `Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_. Use "user" source for custom-defined tags.
224222
:type source: str, optional
225223
:rtype: None
226224
"""
@@ -238,13 +236,13 @@ def get_host_tags(
238236
*,
239237
source: Union[str, UnsetType] = unset,
240238
) -> HostTags:
241-
"""Get host tags.
239+
"""Get Host Tags.
242240
243241
Return the list of tags that apply to a given host.
244242
245-
:param host_name: When specified, filters list of tags to those tags with the specified source.
243+
:param host_name: Name of the host to retrieve tags for
246244
:type host_name: str
247-
:param source: Source to filter.
245+
:param source: Source to filter. `Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_. Use "user" source for custom-defined tags.
248246
:type source: str, optional
249247
:rtype: HostTags
250248
"""
@@ -261,11 +259,11 @@ def list_host_tags(
261259
*,
262260
source: Union[str, UnsetType] = unset,
263261
) -> TagToHosts:
264-
"""Get Tags.
262+
"""Get All Host Tags.
265263
266-
Return a mapping of tags to hosts for your whole infrastructure.
264+
Returns a mapping of tags to hosts. For each tag, the response returns a list of host names that contain this tag. There is a restriction of 10k total host names from the org that can be attached to tags and returned.
267265
268-
:param source: When specified, filters host list to those tags with the specified source.
266+
:param source: Source to filter. `Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_. Use "user" source for custom-defined tags.
269267
:type source: str, optional
270268
:rtype: TagToHosts
271269
"""
@@ -287,12 +285,11 @@ def update_host_tags(
287285
This endpoint allows you to update/replace all tags in
288286
an integration source with those supplied in the request.
289287
290-
:param host_name: This endpoint allows you to update/replace all in an integration source with those supplied in the request.
288+
:param host_name: Specified host name to change tags
291289
:type host_name: str
292290
:param body: Add tags to host
293291
:type body: HostTags
294-
:param source: The source of the tags (for example chef, puppet).
295-
`Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_
292+
:param source: Source to update tags. `Complete list of source attribute values <https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value>`_. Use "user" source for custom-defined tags. If no source specified, defaults to "user".
296293
:type source: str, optional
297294
:rtype: HostTags
298295
"""

src/datadog_api_client/v1/model/host_tags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def openapi_types(_):
2828

2929
def __init__(self_, host: Union[str, UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, **kwargs):
3030
"""
31-
Set of tags to associate with your host.
31+
Host name and an array of its tags
3232
3333
:param host: Your host name.
3434
:type host: str, optional
3535
36-
:param tags: A list of tags to apply to the host.
36+
:param tags: A list of tags associated with a host.
3737
:type tags: [str], optional
3838
"""
3939
if host is not unset:

src/datadog_api_client/v1/model/tag_to_hosts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def openapi_types(_):
2626

2727
def __init__(self_, tags: Union[Dict[str, List[str]], UnsetType] = unset, **kwargs):
2828
"""
29-
In this object, the key is the tag, the value is a list of host names that are reporting that tag.
29+
In this object, the key is the tag, and the value is a list of host names that are reporting that tag.
3030
31-
:param tags: A list of tags to apply to the host.
31+
:param tags: A mapping of tags to host names
3232
:type tags: {str: ([str],)}, optional
3333
"""
3434
if tags is not unset:

tests/v1/features/tags.feature

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ Feature: Tags
66
tags to a particular host. The component of your infrastructure
77
responsible for a tag is identified by a source. For example, some valid
88
sources include nagios, hudson, jenkins, users, feed, chef, puppet, git,
9-
bitbucket, fabric, capistrano, etc. Read more about tags on [Getting
10-
Started with Tags](https://docs.datadoghq.com/getting_started/tagging/).
9+
bitbucket, fabric, capistrano, etc. Find a complete list of source type
10+
names under [API Source
11+
Attributes](https://docs.datadoghq.com/integrations/faq/list-of-api-
12+
source-attribute-value). Read more about tags on [Getting Started with
13+
Tags](https://docs.datadoghq.com/getting_started/tagging/).
1114

1215
Background:
1316
Given a valid "apiKeyAuth" key in the system
@@ -31,26 +34,26 @@ Feature: Tags
3134
Then the response status is 404 Not Found
3235

3336
@generated @skip @team:DataDog/core-index
34-
Scenario: Get Tags returns "Not Found" response
37+
Scenario: Get All Host Tags returns "Not Found" response
3538
Given new "ListHostTags" request
3639
When the request is sent
3740
Then the response status is 404 Not Found
3841

3942
@generated @skip @team:DataDog/core-index
40-
Scenario: Get Tags returns "OK" response
43+
Scenario: Get All Host Tags returns "OK" response
4144
Given new "ListHostTags" request
4245
When the request is sent
4346
Then the response status is 200 OK
4447

4548
@generated @skip @team:DataDog/core-index
46-
Scenario: Get host tags returns "Not Found" response
49+
Scenario: Get Host Tags returns "Not Found" response
4750
Given new "GetHostTags" request
4851
And request contains "host_name" parameter from "REPLACE.ME"
4952
When the request is sent
5053
Then the response status is 404 Not Found
5154

5255
@generated @skip @team:DataDog/core-index
53-
Scenario: Get host tags returns "OK" response
56+
Scenario: Get Host Tags returns "OK" response
5457
Given new "GetHostTags" request
5558
And request contains "host_name" parameter from "REPLACE.ME"
5659
When the request is sent

0 commit comments

Comments
 (0)