@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TagPoliciesApi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TagPoliciesApi.DeleteTagPolicyOptionalParameters
Manage optional parameters to deleteTagPolicy.
|
static class |
TagPoliciesApi.GetTagPolicyOptionalParameters
Manage optional parameters to getTagPolicy.
|
static class |
TagPoliciesApi.GetTagPolicyScoreOptionalParameters
Manage optional parameters to getTagPolicyScore.
|
static class |
TagPoliciesApi.ListTagPoliciesOptionalParameters
Manage optional parameters to listTagPolicies.
|
| Constructor and Description |
|---|
TagPoliciesApi() |
TagPoliciesApi(ApiClient apiClient) |
public TagPoliciesApi()
public TagPoliciesApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient - an instance of API clientpublic TagPolicyResponse createTagPolicy(TagPolicyCreateRequest body) throws ApiException
See createTagPolicyWithHttpInfo(com.datadog.api.client.v2.model.TagPolicyCreateRequest).
body - (required)ApiException - if fails to make API callpublic CompletableFuture<TagPolicyResponse> createTagPolicyAsync(TagPolicyCreateRequest body)
See createTagPolicyWithHttpInfoAsync(com.datadog.api.client.v2.model.TagPolicyCreateRequest).
body - (required)public ApiResponse<TagPolicyResponse> createTagPolicyWithHttpInfo(TagPolicyCreateRequest body) throws ApiException
policy_id, version, and the timestamp/audit fields are assigned by the
server.body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 201 | Created | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 409 | Conflict | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<TagPolicyResponse>> createTagPolicyWithHttpInfoAsync(TagPolicyCreateRequest body)
See createTagPolicyWithHttpInfo(com.datadog.api.client.v2.model.TagPolicyCreateRequest).
body - (required)public void deleteTagPolicy(String policyId) throws ApiException
policyId - The unique identifier of the tag policy to delete. (required)ApiException - if fails to make API callpublic CompletableFuture<Void> deleteTagPolicyAsync(String policyId)
policyId - The unique identifier of the tag policy to delete. (required)public void deleteTagPolicy(String policyId, TagPoliciesApi.DeleteTagPolicyOptionalParameters parameters) throws ApiException
policyId - The unique identifier of the tag policy to delete. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<Void> deleteTagPolicyAsync(String policyId, TagPoliciesApi.DeleteTagPolicyOptionalParameters parameters)
policyId - The unique identifier of the tag policy to delete. (required)parameters - Optional parameters for the request.public ApiResponse<Void> deleteTagPolicyWithHttpInfo(String policyId, TagPoliciesApi.DeleteTagPolicyOptionalParameters parameters) throws ApiException
hard_delete=true to remove the
policy permanently.policyId - The unique identifier of the tag policy to delete. (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 204 | No Content | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<Void>> deleteTagPolicyWithHttpInfoAsync(String policyId, TagPoliciesApi.DeleteTagPolicyOptionalParameters parameters)
policyId - The unique identifier of the tag policy to delete. (required)parameters - Optional parameters for the request.public TagPolicyResponse getTagPolicy(String policyId) throws ApiException
policyId - The unique identifier of the tag policy. (required)ApiException - if fails to make API callpublic CompletableFuture<TagPolicyResponse> getTagPolicyAsync(String policyId)
policyId - The unique identifier of the tag policy. (required)public TagPolicyResponse getTagPolicy(String policyId, TagPoliciesApi.GetTagPolicyOptionalParameters parameters) throws ApiException
policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<TagPolicyResponse> getTagPolicyAsync(String policyId, TagPoliciesApi.GetTagPolicyOptionalParameters parameters)
policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.public ApiResponse<TagPolicyResponse> getTagPolicyWithHttpInfo(String policyId, TagPoliciesApi.GetTagPolicyOptionalParameters parameters) throws ApiException
include=score query parameter. Policies belonging to other organizations
cannot be retrieved.policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<TagPolicyResponse>> getTagPolicyWithHttpInfoAsync(String policyId, TagPoliciesApi.GetTagPolicyOptionalParameters parameters)
policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.public TagPolicyScoreResponse getTagPolicyScore(String policyId) throws ApiException
policyId - The unique identifier of the tag policy. (required)ApiException - if fails to make API callpublic CompletableFuture<TagPolicyScoreResponse> getTagPolicyScoreAsync(String policyId)
policyId - The unique identifier of the tag policy. (required)public TagPolicyScoreResponse getTagPolicyScore(String policyId, TagPoliciesApi.GetTagPolicyScoreOptionalParameters parameters) throws ApiException
policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<TagPolicyScoreResponse> getTagPolicyScoreAsync(String policyId, TagPoliciesApi.GetTagPolicyScoreOptionalParameters parameters)
policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.public ApiResponse<TagPolicyScoreResponse> getTagPolicyScoreWithHttpInfo(String policyId, TagPoliciesApi.GetTagPolicyScoreOptionalParameters parameters) throws ApiException
null score indicates that no relevant
telemetry was found.policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<TagPolicyScoreResponse>> getTagPolicyScoreWithHttpInfoAsync(String policyId, TagPoliciesApi.GetTagPolicyScoreOptionalParameters parameters)
policyId - The unique identifier of the tag policy. (required)parameters - Optional parameters for the request.public TagPoliciesListResponse listTagPolicies() throws ApiException
ApiException - if fails to make API callpublic CompletableFuture<TagPoliciesListResponse> listTagPoliciesAsync()
public TagPoliciesListResponse listTagPolicies(TagPoliciesApi.ListTagPoliciesOptionalParameters parameters) throws ApiException
parameters - Optional parameters for the request.ApiException - if fails to make API callpublic CompletableFuture<TagPoliciesListResponse> listTagPoliciesAsync(TagPoliciesApi.ListTagPoliciesOptionalParameters parameters)
parameters - Optional parameters for the request.public ApiResponse<TagPoliciesListResponse> listTagPoliciesWithHttpInfo(TagPoliciesApi.ListTagPoliciesOptionalParameters parameters) throws ApiException
include=score query parameter.parameters - Optional parameters for the request.ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<TagPoliciesListResponse>> listTagPoliciesWithHttpInfoAsync(TagPoliciesApi.ListTagPoliciesOptionalParameters parameters)
parameters - Optional parameters for the request.public TagPolicyResponse updateTagPolicy(String policyId, TagPolicyUpdateRequest body) throws ApiException
policyId - The unique identifier of the tag policy to update. (required)body - (required)ApiException - if fails to make API callpublic CompletableFuture<TagPolicyResponse> updateTagPolicyAsync(String policyId, TagPolicyUpdateRequest body)
policyId - The unique identifier of the tag policy to update. (required)body - (required)public ApiResponse<TagPolicyResponse> updateTagPolicyWithHttpInfo(String policyId, TagPolicyUpdateRequest body) throws ApiException
source cannot be changed after creation.policyId - The unique identifier of the tag policy to update. (required)body - (required)ApiException - if fails to make API call| Status Code | Description | Response Headers |
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too many requests | - |
public CompletableFuture<ApiResponse<TagPolicyResponse>> updateTagPolicyWithHttpInfoAsync(String policyId, TagPolicyUpdateRequest body)
policyId - The unique identifier of the tag policy to update. (required)body - (required)Copyright © 2026. All rights reserved.