diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 51ea971a3e8..49c921bf48d 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -4179,7 +4179,7 @@ components: example: false type: boolean type: object - HostTags: + HostTagsInput: description: Set of tags to associate with your host. properties: host: @@ -4194,6 +4194,21 @@ components: type: string type: array type: object + HostTagsOutput: + description: Set of tags to associate with your host. + properties: + host: + description: Your host name. + example: test.host + type: string + tags: + description: A list of tags attached to a given host. + items: + description: A given tag in a list. + example: environment:production + type: string + type: array + type: object HostTotals: description: Total number of host currently monitored by Datadog. properties: @@ -18689,18 +18704,18 @@ components: - match type: object TagToHosts: - description: In this object, the key is the tag, the value is a list of host - names that are reporting that tag. + description: In this object, the key is the tag, and the value is a list of + host names that are reporting that tag. properties: tags: additionalProperties: - description: A list of additional properties for tags. + description: A list of host names which contain this tag items: description: A given tag in a list. example: test.metric.host type: string type: array - description: A list of tags to apply to the host. + description: A mapping of tags to host names type: object type: object TargetFormatType: @@ -35712,11 +35727,13 @@ paths: - synthetics_global_variable_write /api/v1/tags/hosts: get: - description: Return a mapping of tags to hosts for your whole infrastructure. + description: 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 host names from the org that can be attached to tags and returned. operationId: ListHostTags parameters: - - description: When specified, filters host list to those tags with the specified - source. + - description: 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. in: query name: source required: false @@ -35747,7 +35764,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get Tags + summary: Get All Host Tags tags: - Tags x-permission: @@ -35760,16 +35777,14 @@ paths: for a single host.' operationId: DeleteHostTags parameters: - - description: This endpoint allows you to remove all user-assigned tags for - a single host. + - description: Specified host name to delete tags in: path name: host_name required: true schema: type: string - - description: 'The source of the tags (for example chef, puppet). - - [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).' + - description: 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. in: query name: source required: false @@ -35799,14 +35814,14 @@ paths: description: Return the list of tags that apply to a given host. operationId: GetHostTags parameters: - - description: When specified, filters list of tags to those tags with the specified - source. + - description: Specified host name to view tags in: path name: host_name required: true schema: type: string - - description: Source to filter. + - description: 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. in: query name: source required: false @@ -35817,7 +35832,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HostTags' + $ref: '#/components/schemas/HostTagsOutput' description: OK '403': content: @@ -35833,25 +35848,23 @@ paths: description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get host tags + summary: Get Host Tags tags: - Tags post: description: 'This endpoint allows you to add new tags to a host, - optionally specifying where these tags come from.' + optionally specifying what source these tags come from.' operationId: CreateHostTags parameters: - - description: This endpoint allows you to add new tags to a host, optionally - specifying where the tags came from. + - description: Specified host name to add new tags in: path name: host_name required: true schema: type: string - - description: 'The source of the tags. - - [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).' + - description: 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. example: chef in: query name: source @@ -35862,7 +35875,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HostTags' + $ref: '#/components/schemas/HostTagsInput' description: Update host tags request body. required: true responses: @@ -35870,7 +35883,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HostTags' + $ref: '#/components/schemas/HostTagsOutput' description: Created '403': content: @@ -35896,16 +35909,14 @@ paths: an integration source with those supplied in the request.' operationId: UpdateHostTags parameters: - - description: This endpoint allows you to update/replace all in an integration - source with those supplied in the request. + - description: Specified host name to change tags in: path name: host_name required: true schema: type: string - - description: 'The source of the tags (for example chef, puppet). - - [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value)' + - description: 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. in: query name: source required: false @@ -35915,7 +35926,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HostTags' + $ref: '#/components/schemas/HostTagsInput' description: Add tags to host required: true responses: @@ -35923,7 +35934,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/HostTags' + $ref: '#/components/schemas/HostTagsOutput' description: OK '403': content: @@ -38918,7 +38929,8 @@ tags: by a source. For example, some valid sources include nagios, hudson, jenkins, - users, feed, chef, puppet, git, bitbucket, fabric, capistrano, etc. + 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). Read more about tags on [Getting Started with Tags](https://docs.datadoghq.com/getting_started/tagging/).' diff --git a/examples/v1/tags/CreateHostTags.java b/examples/v1/tags/CreateHostTags.java index 2f09445a66c..a63fb8e71ef 100644 --- a/examples/v1/tags/CreateHostTags.java +++ b/examples/v1/tags/CreateHostTags.java @@ -3,7 +3,8 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v1.api.TagsApi; -import com.datadog.api.client.v1.model.HostTags; +import com.datadog.api.client.v1.model.HostTagsInput; +import com.datadog.api.client.v1.model.HostTagsOutput; import java.util.Collections; public class Example { @@ -11,11 +12,13 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); TagsApi apiInstance = new TagsApi(defaultClient); - HostTags body = - new HostTags().host("test.host").tags(Collections.singletonList("environment:production")); + HostTagsInput body = + new HostTagsInput() + .host("test.host") + .tags(Collections.singletonList("environment:production")); try { - HostTags result = apiInstance.createHostTags("host_name", body); + HostTagsOutput result = apiInstance.createHostTags("host_name", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#createHostTags"); diff --git a/examples/v1/tags/GetHostTags.java b/examples/v1/tags/GetHostTags.java index 41cbdae0358..acfe67724b7 100644 --- a/examples/v1/tags/GetHostTags.java +++ b/examples/v1/tags/GetHostTags.java @@ -1,9 +1,9 @@ -// Get host tags returns "OK" response +// Get Host Tags returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v1.api.TagsApi; -import com.datadog.api.client.v1.model.HostTags; +import com.datadog.api.client.v1.model.HostTagsOutput; public class Example { public static void main(String[] args) { @@ -11,7 +11,7 @@ public static void main(String[] args) { TagsApi apiInstance = new TagsApi(defaultClient); try { - HostTags result = apiInstance.getHostTags("host_name"); + HostTagsOutput result = apiInstance.getHostTags("host_name"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#getHostTags"); diff --git a/examples/v1/tags/ListHostTags.java b/examples/v1/tags/ListHostTags.java index a63fe39f365..5a7cb72c8ff 100644 --- a/examples/v1/tags/ListHostTags.java +++ b/examples/v1/tags/ListHostTags.java @@ -1,4 +1,4 @@ -// Get Tags returns "OK" response +// Get All Host Tags returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v1/tags/UpdateHostTags.java b/examples/v1/tags/UpdateHostTags.java index cf9f8c70d77..9600dd11b51 100644 --- a/examples/v1/tags/UpdateHostTags.java +++ b/examples/v1/tags/UpdateHostTags.java @@ -3,7 +3,8 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v1.api.TagsApi; -import com.datadog.api.client.v1.model.HostTags; +import com.datadog.api.client.v1.model.HostTagsInput; +import com.datadog.api.client.v1.model.HostTagsOutput; import java.util.Collections; public class Example { @@ -11,11 +12,13 @@ public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); TagsApi apiInstance = new TagsApi(defaultClient); - HostTags body = - new HostTags().host("test.host").tags(Collections.singletonList("environment:production")); + HostTagsInput body = + new HostTagsInput() + .host("test.host") + .tags(Collections.singletonList("environment:production")); try { - HostTags result = apiInstance.updateHostTags("host_name", body); + HostTagsOutput result = apiInstance.updateHostTags("host_name", body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#updateHostTags"); diff --git a/src/main/java/com/datadog/api/client/v1/api/TagsApi.java b/src/main/java/com/datadog/api/client/v1/api/TagsApi.java index bb99d2b0979..9810eb53fd8 100644 --- a/src/main/java/com/datadog/api/client/v1/api/TagsApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/TagsApi.java @@ -4,7 +4,8 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v1.model.HostTags; +import com.datadog.api.client.v1.model.HostTagsInput; +import com.datadog.api.client.v1.model.HostTagsOutput; import com.datadog.api.client.v1.model.TagToHosts; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; @@ -52,9 +53,10 @@ public static class CreateHostTagsOptionalParameters { /** * Set source. * - * @param source The source of the tags. Complete - * list of source attribute values. (optional) + * list of source attribute values. Use "user" source for custom-defined tags. + * (optional) * @return CreateHostTagsOptionalParameters */ public CreateHostTagsOptionalParameters source(String source) { @@ -68,13 +70,12 @@ public CreateHostTagsOptionalParameters source(String source) { * *
See {@link #createHostTagsWithHttpInfo}. * - * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where - * the tags came from. (required) + * @param hostName Specified host name to add new tags (required) * @param body Update host tags request body. (required) - * @return HostTags + * @return HostTagsOutput * @throws ApiException if fails to make API call */ - public HostTags createHostTags(String hostName, HostTags body) throws ApiException { + public HostTagsOutput createHostTags(String hostName, HostTagsInput body) throws ApiException { return createHostTagsWithHttpInfo(hostName, body, new CreateHostTagsOptionalParameters()) .getData(); } @@ -84,12 +85,12 @@ public HostTags createHostTags(String hostName, HostTags body) throws ApiExcepti * *
See {@link #createHostTagsWithHttpInfoAsync}.
*
- * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where
- * the tags came from. (required)
+ * @param hostName Specified host name to add new tags (required)
* @param body Update host tags request body. (required)
- * @return CompletableFuture<HostTags>
+ * @return CompletableFuture<HostTagsOutput>
*/
- public CompletableFuture See {@link #createHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where
- * the tags came from. (required)
+ * @param hostName Specified host name to add new tags (required)
* @param body Update host tags request body. (required)
* @param parameters Optional parameters for the request.
- * @return HostTags
+ * @return HostTagsOutput
* @throws ApiException if fails to make API call
*/
- public HostTags createHostTags(
- String hostName, HostTags body, CreateHostTagsOptionalParameters parameters)
+ public HostTagsOutput createHostTags(
+ String hostName, HostTagsInput body, CreateHostTagsOptionalParameters parameters)
throws ApiException {
return createHostTagsWithHttpInfo(hostName, body, parameters).getData();
}
@@ -120,14 +120,13 @@ public HostTags createHostTags(
*
* See {@link #createHostTagsWithHttpInfoAsync}.
*
- * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where
- * the tags came from. (required)
+ * @param hostName Specified host name to add new tags (required)
* @param body Update host tags request body. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<HostTags>
+ * @return CompletableFuture<HostTagsOutput>
*/
- public CompletableFuture See {@link #createHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to add new tags to a host, optionally specifying where
- * the tags came from. (required)
+ * @param hostName Specified host name to add new tags (required)
* @param body Update host tags request body. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<HostTags>>
+ * @return CompletableFuture<ApiResponse<HostTagsOutput>>
*/
- public CompletableFuture See {@link #deleteHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to remove all user-assigned tags for a single host.
- * (required)
+ * @param hostName Specified host name to delete tags (required)
* @throws ApiException if fails to make API call
*/
public void deleteHostTags(String hostName) throws ApiException {
@@ -308,8 +305,7 @@ public void deleteHostTags(String hostName) throws ApiException {
*
* See {@link #deleteHostTagsWithHttpInfoAsync}.
*
- * @param hostName This endpoint allows you to remove all user-assigned tags for a single host.
- * (required)
+ * @param hostName Specified host name to delete tags (required)
* @return CompletableFuture
*/
public CompletableFuture See {@link #deleteHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to remove all user-assigned tags for a single host.
- * (required)
+ * @param hostName Specified host name to delete tags (required)
* @param parameters Optional parameters for the request.
* @throws ApiException if fails to make API call
*/
@@ -340,8 +335,7 @@ public void deleteHostTags(String hostName, DeleteHostTagsOptionalParameters par
*
* See {@link #deleteHostTagsWithHttpInfoAsync}.
*
- * @param hostName This endpoint allows you to remove all user-assigned tags for a single host.
- * (required)
+ * @param hostName Specified host name to delete tags (required)
* @param parameters Optional parameters for the request.
* @return CompletableFuture
*/
@@ -357,8 +351,7 @@ public CompletableFuture See {@link #deleteHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to remove all user-assigned tags for a single host.
- * (required)
+ * @param hostName Specified host name to delete tags (required)
* @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<Void>>
*/
@@ -479,7 +471,10 @@ public static class GetHostTagsOptionalParameters {
/**
* Set source.
*
- * @param source Source to filter. (optional)
+ * @param source Source to filter. Complete
+ * list of source attribute values. Use "user" source for custom-defined tags.
+ * (optional)
* @return GetHostTagsOptionalParameters
*/
public GetHostTagsOptionalParameters source(String source) {
@@ -489,29 +484,27 @@ public GetHostTagsOptionalParameters source(String source) {
}
/**
- * Get host tags.
+ * Get Host Tags.
*
* See {@link #getHostTagsWithHttpInfo}.
*
- * @param hostName When specified, filters list of tags to those tags with the specified source.
- * (required)
- * @return HostTags
+ * @param hostName Specified host name to view tags (required)
+ * @return HostTagsOutput
* @throws ApiException if fails to make API call
*/
- public HostTags getHostTags(String hostName) throws ApiException {
+ public HostTagsOutput getHostTags(String hostName) throws ApiException {
return getHostTagsWithHttpInfo(hostName, new GetHostTagsOptionalParameters()).getData();
}
/**
- * Get host tags.
+ * Get Host Tags.
*
* See {@link #getHostTagsWithHttpInfoAsync}.
*
- * @param hostName When specified, filters list of tags to those tags with the specified source.
- * (required)
- * @return CompletableFuture<HostTags>
+ * @param hostName Specified host name to view tags (required)
+ * @return CompletableFuture<HostTagsOutput>
*/
- public CompletableFuture See {@link #getHostTagsWithHttpInfo}.
*
- * @param hostName When specified, filters list of tags to those tags with the specified source.
- * (required)
+ * @param hostName Specified host name to view tags (required)
* @param parameters Optional parameters for the request.
- * @return HostTags
+ * @return HostTagsOutput
* @throws ApiException if fails to make API call
*/
- public HostTags getHostTags(String hostName, GetHostTagsOptionalParameters parameters)
+ public HostTagsOutput getHostTags(String hostName, GetHostTagsOptionalParameters parameters)
throws ApiException {
return getHostTagsWithHttpInfo(hostName, parameters).getData();
}
/**
- * Get host tags.
+ * Get Host Tags.
*
* See {@link #getHostTagsWithHttpInfoAsync}.
*
- * @param hostName When specified, filters list of tags to those tags with the specified source.
- * (required)
+ * @param hostName Specified host name to view tags (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<HostTags>
+ * @return CompletableFuture<HostTagsOutput>
*/
- public CompletableFuture See {@link #getHostTagsWithHttpInfo}.
*
- * @param hostName When specified, filters list of tags to those tags with the specified source.
- * (required)
+ * @param hostName Specified host name to view tags (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<HostTags>>
+ * @return CompletableFuture<ApiResponse<HostTagsOutput>>
*/
- public CompletableFuture See {@link #listHostTagsWithHttpInfo}.
*
@@ -702,7 +693,7 @@ public TagToHosts listHostTags() throws ApiException {
}
/**
- * Get Tags.
+ * Get All Host Tags.
*
* See {@link #listHostTagsWithHttpInfoAsync}.
*
@@ -717,7 +708,7 @@ public CompletableFuture See {@link #listHostTagsWithHttpInfo}.
*
@@ -730,7 +721,7 @@ public TagToHosts listHostTags(ListHostTagsOptionalParameters parameters) throws
}
/**
- * Get Tags.
+ * Get All Host Tags.
*
* See {@link #listHostTagsWithHttpInfoAsync}.
*
@@ -747,7 +738,9 @@ public CompletableFuture See {@link #listHostTagsWithHttpInfo}.
*
@@ -848,9 +841,10 @@ public static class UpdateHostTagsOptionalParameters {
/**
* Set source.
*
- * @param source The source of the tags (for example chef, puppet). Complete
- * list of source attribute values (optional)
+ * list of source attribute values. Use "user" source for custom-defined tags.
+ * (optional)
* @return UpdateHostTagsOptionalParameters
*/
public UpdateHostTagsOptionalParameters source(String source) {
@@ -864,13 +858,12 @@ public UpdateHostTagsOptionalParameters source(String source) {
*
* See {@link #updateHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to update/replace all in an integration source with
- * those supplied in the request. (required)
+ * @param hostName Specified host name to change tags (required)
* @param body Add tags to host (required)
- * @return HostTags
+ * @return HostTagsOutput
* @throws ApiException if fails to make API call
*/
- public HostTags updateHostTags(String hostName, HostTags body) throws ApiException {
+ public HostTagsOutput updateHostTags(String hostName, HostTagsInput body) throws ApiException {
return updateHostTagsWithHttpInfo(hostName, body, new UpdateHostTagsOptionalParameters())
.getData();
}
@@ -880,12 +873,12 @@ public HostTags updateHostTags(String hostName, HostTags body) throws ApiExcepti
*
* See {@link #updateHostTagsWithHttpInfoAsync}.
*
- * @param hostName This endpoint allows you to update/replace all in an integration source with
- * those supplied in the request. (required)
+ * @param hostName Specified host name to change tags (required)
* @param body Add tags to host (required)
- * @return CompletableFuture<HostTags>
+ * @return CompletableFuture<HostTagsOutput>
*/
- public CompletableFuture See {@link #updateHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to update/replace all in an integration source with
- * those supplied in the request. (required)
+ * @param hostName Specified host name to change tags (required)
* @param body Add tags to host (required)
* @param parameters Optional parameters for the request.
- * @return HostTags
+ * @return HostTagsOutput
* @throws ApiException if fails to make API call
*/
- public HostTags updateHostTags(
- String hostName, HostTags body, UpdateHostTagsOptionalParameters parameters)
+ public HostTagsOutput updateHostTags(
+ String hostName, HostTagsInput body, UpdateHostTagsOptionalParameters parameters)
throws ApiException {
return updateHostTagsWithHttpInfo(hostName, body, parameters).getData();
}
@@ -916,14 +908,13 @@ public HostTags updateHostTags(
*
* See {@link #updateHostTagsWithHttpInfoAsync}.
*
- * @param hostName This endpoint allows you to update/replace all in an integration source with
- * those supplied in the request. (required)
+ * @param hostName Specified host name to change tags (required)
* @param body Add tags to host (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<HostTags>
+ * @return CompletableFuture<HostTagsOutput>
*/
- public CompletableFuture See {@link #updateHostTagsWithHttpInfo}.
*
- * @param hostName This endpoint allows you to update/replace all in an integration source with
- * those supplied in the request. (required)
+ * @param hostName Specified host name to change tags (required)
* @param body Add tags to host (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<HostTags>>
+ * @return CompletableFuture<ApiResponse<HostTagsOutput>>
*/
- public CompletableFuture
@@ -155,8 +153,8 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests -
@@ -572,7 +562,7 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests -
@@ -951,8 +941,8 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests -