Class TagRulesApi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to deleteTagRule.static classManage optional parameters to getTagRule.static classManage optional parameters to getTagRuleScore.static classManage optional parameters to listTagRules. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a tag rule.Create a tag rule.Create a new tag rule for the organization.Create a tag rule.voiddeleteTagRule(String ruleId) Delete a tag rule.voiddeleteTagRule(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) Delete a tag rule.deleteTagRuleAsync(String ruleId) Delete a tag rule.deleteTagRuleAsync(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) Delete a tag rule.deleteTagRuleWithHttpInfo(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) Delete a tag rule.deleteTagRuleWithHttpInfoAsync(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) Delete a tag rule.Get the API client.getTagRule(String ruleId) Get a tag rule.getTagRule(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) Get a tag rule.getTagRuleAsync(String ruleId) Get a tag rule.getTagRuleAsync(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) Get a tag rule.getTagRuleScore(String ruleId) Get a tag rule compliance score.getTagRuleScore(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) Get a tag rule compliance score.getTagRuleScoreAsync(String ruleId) Get a tag rule compliance score.getTagRuleScoreAsync(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) Get a tag rule compliance score.getTagRuleScoreWithHttpInfo(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) Retrieve the compliance score for a single tag rule.getTagRuleScoreWithHttpInfoAsync(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) Get a tag rule compliance score.getTagRuleWithHttpInfo(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) Retrieve a single tag rule by ID.getTagRuleWithHttpInfoAsync(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) Get a tag rule.List tag rules.List tag rules.List tag rules.List tag rules.Retrieve all tag rules for the organization.List tag rules.voidsetApiClient(ApiClient apiClient) Set the API client.updateTagRule(String ruleId, TagRuleUpdateRequest body) Update a tag rule.updateTagRuleAsync(String ruleId, TagRuleUpdateRequest body) Update a tag rule.updateTagRuleWithHttpInfo(String ruleId, TagRuleUpdateRequest body) Update one or more attributes of an existing tag rule.updateTagRuleWithHttpInfoAsync(String ruleId, TagRuleUpdateRequest body) Update a tag rule.
-
Constructor Details
-
TagRulesApi
public TagRulesApi() -
TagRulesApi
-
-
Method Details
-
getApiClient
Get the API client.- Returns:
- API client
-
setApiClient
Set the API client.- Parameters:
apiClient- an instance of API client
-
createTagRule
Create a tag rule.See
createTagRuleWithHttpInfo(com.datadog.api.client.v2.model.TagRuleCreateRequest).- Parameters:
body- (required)- Returns:
- TagRuleResponse
- Throws:
ApiException- if fails to make API call
-
createTagRuleAsync
Create a tag rule.See
createTagRuleWithHttpInfoAsync(com.datadog.api.client.v2.model.TagRuleCreateRequest).- Parameters:
body- (required)- Returns:
- CompletableFuture<TagRuleResponse>
-
createTagRuleWithHttpInfo
public ApiResponse<TagRuleResponse> createTagRuleWithHttpInfo(TagRuleCreateRequest body) throws ApiException Create a new tag rule for the organization. The caller's organization is derived from the authenticated user; cross-organization creation is not supported. Fields such asrule_id,version, and the timestamp/audit fields are assigned by the server.- Parameters:
body- (required)- Returns:
- ApiResponse<TagRuleResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 201 Created - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 409 Conflict - 429 Too many requests -
-
createTagRuleWithHttpInfoAsync
public CompletableFuture<ApiResponse<TagRuleResponse>> createTagRuleWithHttpInfoAsync(TagRuleCreateRequest body) Create a tag rule.See
createTagRuleWithHttpInfo(com.datadog.api.client.v2.model.TagRuleCreateRequest).- Parameters:
body- (required)- Returns:
- CompletableFuture<ApiResponse<TagRuleResponse>>
-
deleteTagRule
Delete a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule to delete. (required)- Throws:
ApiException- if fails to make API call
-
deleteTagRuleAsync
Delete a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule to delete. (required)- Returns:
- CompletableFuture
-
deleteTagRule
public void deleteTagRule(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) throws ApiException Delete a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule to delete. (required)parameters- Optional parameters for the request.- Throws:
ApiException- if fails to make API call
-
deleteTagRuleAsync
public CompletableFuture<Void> deleteTagRuleAsync(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) Delete a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule to delete. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture
-
deleteTagRuleWithHttpInfo
public ApiResponse<Void> deleteTagRuleWithHttpInfo(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) throws ApiException Delete a tag rule. By default the rule is soft-deleted so it can be recovered later and so that historical score data remains queryable. Passhard_delete=trueto remove the rule permanently.- Parameters:
ruleId- The unique identifier of the tag rule to delete. (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<Void>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 204 No Content - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 429 Too many requests -
-
deleteTagRuleWithHttpInfoAsync
public CompletableFuture<ApiResponse<Void>> deleteTagRuleWithHttpInfoAsync(String ruleId, TagRulesApi.DeleteTagRuleOptionalParameters parameters) Delete a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule to delete. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<Void>>
-
getTagRule
Get a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule. (required)- Returns:
- TagRuleResponse
- Throws:
ApiException- if fails to make API call
-
getTagRuleAsync
Get a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule. (required)- Returns:
- CompletableFuture<TagRuleResponse>
-
getTagRule
public TagRuleResponse getTagRule(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) throws ApiException Get a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- TagRuleResponse
- Throws:
ApiException- if fails to make API call
-
getTagRuleAsync
public CompletableFuture<TagRuleResponse> getTagRuleAsync(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) Get a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<TagRuleResponse>
-
getTagRuleWithHttpInfo
public ApiResponse<TagRuleResponse> getTagRuleWithHttpInfo(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) throws ApiException Retrieve a single tag rule by ID. Optionally include the rule's current compliance score via theinclude=scorequery parameter. Rules belonging to other organizations cannot be retrieved.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<TagRuleResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 429 Too many requests -
-
getTagRuleWithHttpInfoAsync
public CompletableFuture<ApiResponse<TagRuleResponse>> getTagRuleWithHttpInfoAsync(String ruleId, TagRulesApi.GetTagRuleOptionalParameters parameters) Get a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<TagRuleResponse>>
-
getTagRuleScore
Get a tag rule compliance score.- Parameters:
ruleId- The unique identifier of the tag rule. (required)- Returns:
- TagRuleScoreResponse
- Throws:
ApiException- if fails to make API call
-
getTagRuleScoreAsync
Get a tag rule compliance score.- Parameters:
ruleId- The unique identifier of the tag rule. (required)- Returns:
- CompletableFuture<TagRuleScoreResponse>
-
getTagRuleScore
public TagRuleScoreResponse getTagRuleScore(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) throws ApiException Get a tag rule compliance score.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- TagRuleScoreResponse
- Throws:
ApiException- if fails to make API call
-
getTagRuleScoreAsync
public CompletableFuture<TagRuleScoreResponse> getTagRuleScoreAsync(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) Get a tag rule compliance score.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<TagRuleScoreResponse>
-
getTagRuleScoreWithHttpInfo
public ApiResponse<TagRuleScoreResponse> getTagRuleScoreWithHttpInfo(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) throws ApiException Retrieve the compliance score for a single tag rule. The score is computed over the requested time window (or a source-appropriate default) and represents the percentage of telemetry within that window that conforms to the rule. Anullscore indicates that no relevant telemetry was found.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- ApiResponse<TagRuleScoreResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 429 Too many requests -
-
getTagRuleScoreWithHttpInfoAsync
public CompletableFuture<ApiResponse<TagRuleScoreResponse>> getTagRuleScoreWithHttpInfoAsync(String ruleId, TagRulesApi.GetTagRuleScoreOptionalParameters parameters) Get a tag rule compliance score.- Parameters:
ruleId- The unique identifier of the tag rule. (required)parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<TagRuleScoreResponse>>
-
listTagRules
List tag rules.See
listTagRulesWithHttpInfo(com.datadog.api.client.v2.api.TagRulesApi.ListTagRulesOptionalParameters).- Returns:
- TagRulesListResponse
- Throws:
ApiException- if fails to make API call
-
listTagRulesAsync
List tag rules.- Returns:
- CompletableFuture<TagRulesListResponse>
-
listTagRules
public TagRulesListResponse listTagRules(TagRulesApi.ListTagRulesOptionalParameters parameters) throws ApiException List tag rules.See
listTagRulesWithHttpInfo(com.datadog.api.client.v2.api.TagRulesApi.ListTagRulesOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- TagRulesListResponse
- Throws:
ApiException- if fails to make API call
-
listTagRulesAsync
public CompletableFuture<TagRulesListResponse> listTagRulesAsync(TagRulesApi.ListTagRulesOptionalParameters parameters) List tag rules.- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<TagRulesListResponse>
-
listTagRulesWithHttpInfo
public ApiResponse<TagRulesListResponse> listTagRulesWithHttpInfo(TagRulesApi.ListTagRulesOptionalParameters parameters) throws ApiException Retrieve all tag rules for the organization. Optionally include disabled or deleted rules, filter by telemetry source, and include each rule's current compliance score via theinclude=scorequery parameter.- Parameters:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<TagRulesListResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 429 Too many requests -
-
listTagRulesWithHttpInfoAsync
public CompletableFuture<ApiResponse<TagRulesListResponse>> listTagRulesWithHttpInfoAsync(TagRulesApi.ListTagRulesOptionalParameters parameters) List tag rules.See
listTagRulesWithHttpInfo(com.datadog.api.client.v2.api.TagRulesApi.ListTagRulesOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<TagRulesListResponse>>
-
updateTagRule
Update a tag rule.See
updateTagRuleWithHttpInfo(java.lang.String, com.datadog.api.client.v2.model.TagRuleUpdateRequest).- Parameters:
ruleId- The unique identifier of the tag rule to update. (required)body- (required)- Returns:
- TagRuleResponse
- Throws:
ApiException- if fails to make API call
-
updateTagRuleAsync
public CompletableFuture<TagRuleResponse> updateTagRuleAsync(String ruleId, TagRuleUpdateRequest body) Update a tag rule.- Parameters:
ruleId- The unique identifier of the tag rule to update. (required)body- (required)- Returns:
- CompletableFuture<TagRuleResponse>
-
updateTagRuleWithHttpInfo
public ApiResponse<TagRuleResponse> updateTagRuleWithHttpInfo(String ruleId, TagRuleUpdateRequest body) throws ApiException Update one or more attributes of an existing tag rule. Only the fields supplied in the request body are modified; omitted fields retain their current values. The rule'ssourcecannot be changed after creation.- Parameters:
ruleId- The unique identifier of the tag rule to update. (required)body- (required)- Returns:
- ApiResponse<TagRuleResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 429 Too many requests -
-
updateTagRuleWithHttpInfoAsync
public CompletableFuture<ApiResponse<TagRuleResponse>> updateTagRuleWithHttpInfoAsync(String ruleId, TagRuleUpdateRequest body) Update a tag rule.See
updateTagRuleWithHttpInfo(java.lang.String, com.datadog.api.client.v2.model.TagRuleUpdateRequest).- Parameters:
ruleId- The unique identifier of the tag rule to update. (required)body- (required)- Returns:
- CompletableFuture<ApiResponse<TagRuleResponse>>
-