diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ab4cf98dbf5..990db11384f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -111042,72 +111042,62 @@ components: format: int64 type: integer type: object - TagPoliciesListResponse: - description: A page of tag policies. - properties: - data: - $ref: "#/components/schemas/TagPolicyDataArray" - included: - $ref: "#/components/schemas/TagPolicyIncludedResources" - required: - - data - type: object - TagPolicyAttributes: - description: The attributes of a tag policy resource. + TagRuleAttributes: + description: The attributes of a tag rule resource. properties: created_at: - description: The RFC 3339 timestamp at which the policy was created. + description: The RFC 3339 timestamp at which the rule was created. example: "2026-05-21T22:11:06.108696Z" format: date-time type: string created_by: - description: The identifier of the user who created the policy. + description: The identifier of the user who created the rule. example: "test-user" type: string deleted_at: - description: The RFC 3339 timestamp at which the policy was soft-deleted. `null` if the policy has not been deleted. Only present when `include_deleted=true` is requested. + description: The RFC 3339 timestamp at which the rule was soft-deleted. `null` if the rule has not been deleted. Only present when `include_deleted=true` is requested. format: date-time nullable: true type: string deleted_by: - description: The identifier of the user who soft-deleted the policy. `null` if the policy has not been deleted. + description: The identifier of the user who soft-deleted the rule. `null` if the rule has not been deleted. nullable: true type: string enabled: - description: Whether the policy is currently enforced. + description: Whether the rule is currently enforced. example: true type: boolean modified_at: - description: The RFC 3339 timestamp at which the policy was last modified. + description: The RFC 3339 timestamp at which the rule was last modified. example: "2026-05-21T22:11:06.108696Z" format: date-time type: string modified_by: - description: The identifier of the user who last modified the policy. + description: The identifier of the user who last modified the rule. example: "test-user" type: string + name: + description: Human-readable name for the tag rule. + example: "Service tag must be one of api or web" + type: string negated: - description: When `true`, the policy matches tag values that do NOT match any of the supplied patterns. + description: When `true`, the rule matches tag values that do NOT match any of the supplied patterns. example: false type: boolean - policy_name: - description: Human-readable name for the tag policy. - example: "Service tag must be one of api or web" - type: string - policy_type: - $ref: "#/components/schemas/TagPolicyType" required: description: When `true`, telemetry without this tag is treated as a violation. example: true type: boolean + rule_type: + $ref: "#/components/schemas/TagRuleType" scope: - description: The scope the policy applies within. + description: The scope the rule applies within. example: "env" type: string source: - $ref: "#/components/schemas/TagPolicySource" + $ref: "#/components/schemas/TagRuleSource" tag_key: - description: The tag key that the policy governs. + description: The tag key that the rule governs. example: "service" type: string tag_value_patterns: @@ -111125,7 +111115,7 @@ components: format: int64 type: integer required: - - policy_name + - name - source - scope - tag_key @@ -111133,44 +111123,44 @@ components: - negated - required - enabled - - policy_type + - rule_type - version - created_at - created_by - modified_at - modified_by type: object - TagPolicyCreateAttributes: - description: Attributes that can be supplied when creating a tag policy. + TagRuleCreateAttributes: + description: Attributes that can be supplied when creating a tag rule. properties: enabled: - description: Whether the policy is currently enforced. Defaults to `true` for newly created policies. + description: Whether the rule is currently enforced. Defaults to `true` for newly created rules. example: true type: boolean + name: + description: Human-readable name for the tag rule. + example: "Service tag must be one of api or web" + type: string negated: - description: When `true`, the policy matches tag values that do NOT match any of the supplied patterns. Defaults to `false`. + description: When `true`, the rule matches tag values that do NOT match any of the supplied patterns. Defaults to `false`. example: false type: boolean - policy_name: - description: Human-readable name for the tag policy. - example: "Service tag must be one of api or web" - type: string - policy_type: - $ref: "#/components/schemas/TagPolicyCreateType" required: description: When `true`, telemetry without this tag is treated as a violation. Defaults to `false`. example: true type: boolean + rule_type: + $ref: "#/components/schemas/TagRuleCreateType" scope: description: |- - The scope the policy applies within. Typically an environment, team, or - organization-level identifier used to limit where the policy is enforced. + The scope the rule applies within. Typically an environment, team, or + organization-level identifier used to limit where the rule is enforced. example: "env" type: string source: - $ref: "#/components/schemas/TagPolicySource" + $ref: "#/components/schemas/TagRuleSource" tag_key: - description: The tag key that the policy governs (for example, `service`). + description: The tag key that the rule governs (for example, `service`). example: "service" type: string tag_value_patterns: @@ -111186,35 +111176,35 @@ components: minItems: 1 type: array required: - - policy_name + - name - source - scope - tag_key - tag_value_patterns - - policy_type + - rule_type type: object - TagPolicyCreateData: - description: Data object for creating a tag policy. + TagRuleCreateData: + description: Data object for creating a tag rule. properties: attributes: - $ref: "#/components/schemas/TagPolicyCreateAttributes" + $ref: "#/components/schemas/TagRuleCreateAttributes" type: - $ref: "#/components/schemas/TagPolicyResourceType" + $ref: "#/components/schemas/TagRuleResourceType" required: - type - attributes type: object - TagPolicyCreateRequest: - description: Payload for creating a new tag policy. + TagRuleCreateRequest: + description: Payload for creating a new tag rule. properties: data: - $ref: "#/components/schemas/TagPolicyCreateData" + $ref: "#/components/schemas/TagRuleCreateData" required: - data type: object - TagPolicyCreateType: + TagRuleCreateType: description: |- - The policy type allowed when creating a tag policy. Only `surfacing` is accepted at + The rule type allowed when creating a tag rule. Only `surfacing` is accepted at creation time. enum: - surfacing @@ -111222,72 +111212,72 @@ components: type: string x-enum-varnames: - SURFACING - TagPolicyData: - description: A tag policy resource. + TagRuleData: + description: A tag rule resource. properties: attributes: - $ref: "#/components/schemas/TagPolicyAttributes" + $ref: "#/components/schemas/TagRuleAttributes" id: - description: The unique identifier of the tag policy. + description: The unique identifier of the tag rule. example: "123" type: string relationships: - $ref: "#/components/schemas/TagPolicyRelationships" + $ref: "#/components/schemas/TagRuleRelationships" type: - $ref: "#/components/schemas/TagPolicyResourceType" + $ref: "#/components/schemas/TagRuleResourceType" required: - type - id - attributes type: object - TagPolicyDataArray: - description: An array of tag policy data objects. + TagRuleDataArray: + description: An array of tag rule data objects. items: - $ref: "#/components/schemas/TagPolicyData" + $ref: "#/components/schemas/TagRuleData" type: array - TagPolicyInclude: - description: A related resource to include alongside a tag policy in the response. Currently the only supported value is `score`. + TagRuleInclude: + description: A related resource to include alongside a tag rule in the response. Currently the only supported value is `score`. enum: - score example: "score" type: string x-enum-varnames: - SCORE - TagPolicyIncludedResources: - description: Related resources fetched alongside the primary tag policies. Populated when an `include` query parameter is supplied. + TagRuleIncludedResources: + description: Related resources fetched alongside the primary tag rules. Populated when an `include` query parameter is supplied. items: - $ref: "#/components/schemas/TagPolicyScoreData" + $ref: "#/components/schemas/TagRuleScoreData" type: array - TagPolicyRelationships: - description: Related resources for a tag policy. Only present when the corresponding `include` query parameter is supplied. + TagRuleRelationships: + description: Related resources for a tag rule. Only present when the corresponding `include` query parameter is supplied. properties: score: - $ref: "#/components/schemas/TagPolicyScoreRelationship" + $ref: "#/components/schemas/TagRuleScoreRelationship" type: object - TagPolicyResourceType: - description: JSON:API resource type for a tag policy. + TagRuleResourceType: + description: JSON:API resource type for a tag rule. enum: - - tag_policy - example: "tag_policy" + - tag_rule + example: "tag_rule" type: string x-enum-varnames: - - TAG_POLICY - TagPolicyResponse: - description: A single tag policy. + - TAG_RULE + TagRuleResponse: + description: A single tag rule. properties: data: - $ref: "#/components/schemas/TagPolicyData" + $ref: "#/components/schemas/TagRuleData" included: - $ref: "#/components/schemas/TagPolicyIncludedResources" + $ref: "#/components/schemas/TagRuleIncludedResources" required: - data type: object - TagPolicyScoreAttributes: - description: Attributes of a tag policy compliance score. + TagRuleScoreAttributes: + description: Attributes of a tag rule compliance score. properties: score: description: |- - The compliance score for the policy over the requested time window, as a percentage + The compliance score for the rule over the requested time window, as a percentage between 0 and 100. `null` indicates that no relevant telemetry was found. example: 80 format: double @@ -111304,7 +111294,7 @@ components: format: int64 type: integer version: - description: The version of the tag policy that the score was computed against. + description: The version of the tag rule that the score was computed against. example: 1 format: int64 type: integer @@ -111314,31 +111304,31 @@ components: - ts_end - version type: object - TagPolicyScoreData: - description: A compliance score resource for a tag policy. + TagRuleScoreData: + description: A compliance score resource for a tag rule. properties: attributes: - $ref: "#/components/schemas/TagPolicyScoreAttributes" + $ref: "#/components/schemas/TagRuleScoreAttributes" id: description: The unique identifier of the compliance score resource. example: "123-v1-1779315066097-1779401466097" type: string type: - $ref: "#/components/schemas/TagPolicyScoreResourceType" + $ref: "#/components/schemas/TagRuleScoreResourceType" required: - type - id - attributes type: object - TagPolicyScoreRelationship: - description: A relationship to the compliance score resource for this policy. + TagRuleScoreRelationship: + description: A relationship to the compliance score resource for this rule. properties: data: - $ref: "#/components/schemas/TagPolicyScoreRelationshipData" + $ref: "#/components/schemas/TagRuleScoreRelationshipData" required: - data type: object - TagPolicyScoreRelationshipData: + TagRuleScoreRelationshipData: description: Identifier of the related compliance score resource. properties: id: @@ -111346,46 +111336,42 @@ components: example: "123-v1-1779315066097-1779401466097" type: string type: - $ref: "#/components/schemas/TagPolicyScoreResourceType" + $ref: "#/components/schemas/TagRuleScoreResourceType" required: - type - id type: object - TagPolicyScoreResourceType: - description: JSON:API resource type for a tag policy compliance score. + TagRuleScoreResourceType: + description: JSON:API resource type for a tag rule compliance score. enum: - - tag_policy_score - example: "tag_policy_score" + - tag_rule_score + example: "tag_rule_score" type: string x-enum-varnames: - - TAG_POLICY_SCORE - TagPolicyScoreResponse: - description: A tag policy compliance score. + - TAG_RULE_SCORE + TagRuleScoreResponse: + description: A tag rule compliance score. properties: data: - $ref: "#/components/schemas/TagPolicyScoreData" + $ref: "#/components/schemas/TagRuleScoreData" required: - data type: object - TagPolicySource: - description: The telemetry source that a tag policy applies to. + TagRuleSource: + description: The telemetry source that a tag rule applies to. enum: - logs - spans - metrics - - rum - - feed example: "logs" type: string x-enum-varnames: - LOGS - SPANS - METRICS - - RUM - - FEED - TagPolicyType: + TagRuleType: description: |- - How the policy is enforced. `blocking` rejects telemetry that violates the policy. + How the rule is enforced. `blocking` rejects telemetry that violates the rule. `surfacing` only highlights non-compliant telemetry without blocking it. enum: - blocking @@ -111395,30 +111381,30 @@ components: x-enum-varnames: - BLOCKING - SURFACING - TagPolicyUpdateAttributes: + TagRuleUpdateAttributes: description: |- - Mutable attributes of a tag policy. Each field is optional; omitting a field leaves its - current value unchanged. The `source` of a policy cannot be changed. + Mutable attributes of a tag rule. Each field is optional; omitting a field leaves its + current value unchanged. The `source` of a rule cannot be changed. properties: enabled: - description: Whether the policy is currently enforced. + description: Whether the rule is currently enforced. type: boolean + name: + description: Human-readable name for the tag rule. + type: string negated: - description: When `true`, the policy matches tag values that do NOT match any of the supplied patterns. + description: When `true`, the rule matches tag values that do NOT match any of the supplied patterns. type: boolean - policy_name: - description: Human-readable name for the tag policy. - type: string - policy_type: - $ref: "#/components/schemas/TagPolicyType" required: description: When `true`, telemetry without this tag is treated as a violation. type: boolean + rule_type: + $ref: "#/components/schemas/TagRuleType" scope: - description: The scope the policy applies within. + description: The scope the rule applies within. type: string tag_key: - description: The tag key that the policy governs. + description: The tag key that the rule governs. type: string tag_value_patterns: description: One or more patterns that valid values for the tag key must match. @@ -111427,26 +111413,36 @@ components: type: string type: array type: object - TagPolicyUpdateData: - description: Data object for updating a tag policy. + TagRuleUpdateData: + description: Data object for updating a tag rule. properties: attributes: - $ref: "#/components/schemas/TagPolicyUpdateAttributes" + $ref: "#/components/schemas/TagRuleUpdateAttributes" id: - description: The unique identifier of the tag policy being updated. + description: The unique identifier of the tag rule being updated. example: "123" type: string type: - $ref: "#/components/schemas/TagPolicyResourceType" + $ref: "#/components/schemas/TagRuleResourceType" required: - type - id type: object - TagPolicyUpdateRequest: - description: Payload for updating an existing tag policy. Only the supplied fields are modified. + TagRuleUpdateRequest: + description: Payload for updating an existing tag rule. Only the supplied fields are modified. + properties: + data: + $ref: "#/components/schemas/TagRuleUpdateData" + required: + - data + type: object + TagRulesListResponse: + description: A page of tag rules. properties: data: - $ref: "#/components/schemas/TagPolicyUpdateData" + $ref: "#/components/schemas/TagRuleDataArray" + included: + $ref: "#/components/schemas/TagRuleIncludedResources" required: - data type: object @@ -147389,13 +147385,57 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/hamr: + /api/v2/governance/tag_rules: get: description: |- - Retrieve the High Availability Multi-Region (HAMR) organization connection details for the authenticated organization. - This endpoint returns information about the HAMR connection configuration, including the target organization, - datacenter, status, and whether this is the primary or secondary organization in the HAMR relationship. - operationId: GetHamrOrgConnection + 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 the `include=score` query parameter. + operationId: ListTagRules + parameters: + - description: Whether to include rules that are currently disabled. Defaults to `false`. + example: false + in: query + name: include_disabled + required: false + schema: + type: boolean + - description: Whether to include rules that have been soft-deleted. Defaults to `false`. + example: false + in: query + name: include_deleted + required: false + schema: + type: boolean + - description: Comma-separated list of related resources to include alongside each rule in the response. Currently the only supported value is `score`. + example: "score" + in: query + name: include + required: false + schema: + $ref: "#/components/schemas/TagRuleInclude" + - description: Restrict the result set to rules whose source matches the given value. + in: query + name: filter[source] + required: false + schema: + $ref: "#/components/schemas/TagRuleSource" + - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to a recent window appropriate for the source. + example: 1779315066097 + in: query + name: ts_start + required: false + schema: + format: int64 + type: integer + - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. + example: 1779401466097 + in: query + name: ts_end + required: false + schema: + format: int64 + type: integer responses: "200": content: @@ -147404,18 +147444,40 @@ paths: default: value: data: - attributes: - hamr_status: 4 - is_primary: true - modified_at: "2024-01-01T00:00:00+00:00" - modified_by: test@example.com - target_org_datacenter: us1 - target_org_name: Production Backup Org - target_org_uuid: 00000000-0000-0000-0000-000000000001 - id: 00000000-0000-0000-0000-000000000001 - type: hamr_org_connections + - attributes: + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:11:06.108696Z" + modified_by: "test-user" + name: "Service tag must be one of api or web" + negated: false + required: true + rule_type: "surfacing" + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 1 + id: "123" + relationships: + score: + data: + id: "123-v1-1779315066097-1779401466097" + type: "tag_rule_score" + type: "tag_rule" + included: + - attributes: + score: 80 + ts_end: 1779401466097 + ts_start: 1779315066097 + version: 1 + id: "123-v1-1779315066097-1779401466097" + type: "tag_rule_score" schema: - $ref: "#/components/schemas/HamrOrgConnectionResponse" + $ref: "#/components/schemas/TagRulesListResponse" description: OK "400": content: @@ -147423,35 +147485,40 @@ paths: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Bad Request - "403": + "401": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": + description: Unauthorized + "403": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found + description: Forbidden "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get HAMR organization connection + summary: List tag rules tags: - - High Availability MultiRegion + - Tag Rules + "x-permission": + operator: OR + permissions: + - telemetry_rules_read + - metrics_read x-unstable: |- - **Note**: This endpoint is in public beta and is subject to change. + **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- - Create or update the High Availability Multi-Region (HAMR) organization connection. - This endpoint allows you to configure the HAMR connection between the authenticated organization - and a target organization, including setting the connection status (ONBOARDING, PASSIVE, FAILOVER, ACTIVE, RECOVERY) - operationId: CreateHamrOrgConnection + 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 as + `rule_id`, `version`, and the timestamp/audit fields are assigned by the server. + operationId: CreateTagRule requestBody: content: application/json: @@ -147460,19 +147527,23 @@ paths: value: data: attributes: - hamr_status: 4 - is_primary: true - modified_by: admin@example.com - target_org_datacenter: us1 - target_org_name: Production Backup Org - target_org_uuid: 660f9511-f3ac-52e5-b827-557766551111 - id: 550e8400-e29b-41d4-a716-446655440000 - type: hamr_org_connections + enabled: true + name: "Service tag must be one of api or web" + negated: false + required: true + rule_type: "surfacing" + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + type: "tag_rule" schema: - $ref: "#/components/schemas/HamrOrgConnectionRequest" + $ref: "#/components/schemas/TagRuleCreateRequest" required: true responses: - "200": + "201": content: application/json: examples: @@ -147480,51 +147551,167 @@ paths: value: data: attributes: - hamr_status: 4 - is_primary: true - modified_at: "2024-01-01T00:00:00+00:00" - modified_by: test@example.com - target_org_datacenter: us1 - target_org_name: Production Backup Org - target_org_uuid: 00000000-0000-0000-0000-000000000001 - id: 00000000-0000-0000-0000-000000000002 - type: hamr_org_connections + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:11:06.108696Z" + modified_by: "test-user" + name: "Service tag must be one of api or web" + negated: false + required: true + rule_type: "surfacing" + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 1 + id: "123" + type: "tag_rule" schema: - $ref: "#/components/schemas/HamrOrgConnectionResponse" - description: OK + $ref: "#/components/schemas/TagRuleResponse" + description: Created "400": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" - "500": + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a tag rule + tags: + - Tag Rules + "x-permission": + operator: AND + permissions: + - telemetry_rules_create + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/governance/tag_rules/{rule_id}: + delete: + description: |- + 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. Pass `hard_delete=true` to remove + the rule permanently. + operationId: DeleteTagRule + parameters: + - description: The unique identifier of the tag rule to delete. + example: "123" + in: path + name: rule_id + required: true + schema: + type: string + - description: Whether to permanently delete the rule instead of performing a soft delete. Defaults to `false`. + example: false + in: query + name: hard_delete + required: false + schema: + type: boolean + responses: + "204": + description: No Content + "400": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Internal Server Error + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - summary: Create or update HAMR organization connection + summary: Delete a tag rule tags: - - High Availability MultiRegion + - Tag Rules + "x-permission": + operator: AND + permissions: + - telemetry_rules_create x-unstable: |- - **Note**: This endpoint is in public beta and is subject to change. + **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/identity_providers: get: - description: Get all identity providers available for the current organization. - operationId: ListIdentityProviders + description: |- + Retrieve a single tag rule by ID. Optionally include the rule's current compliance + score via the `include=score` query parameter. Rules belonging to other organizations + cannot be retrieved. + operationId: GetTagRule + parameters: + - description: The unique identifier of the tag rule. + example: "123" + in: path + name: rule_id + required: true + schema: + type: string + - description: Comma-separated list of related resources to include alongside the rule. Currently the only supported value is `score`. + example: "score" + in: query + name: include + required: false + schema: + $ref: "#/components/schemas/TagRuleInclude" + - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. + example: 1779315066097 + in: query + name: ts_start + required: false + schema: + format: int64 + type: integer + - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. + example: 1779401466097 + in: query + name: ts_end + required: false + schema: + format: int64 + type: integer responses: "200": content: @@ -147533,51 +147720,95 @@ paths: default: value: data: + attributes: + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:11:06.108696Z" + modified_by: "test-user" + name: "Service tag must be one of api or web" + negated: false + required: true + rule_type: "surfacing" + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 1 + id: "123" + relationships: + score: + data: + id: "123-v1-1779315066097-1779401466097" + type: "tag_rule_score" + type: "tag_rule" + included: - attributes: - authentication_method: "SAML" - enabled: true - id: "00000000-0000-0000-0000-000000000001" - type: identity_providers - - attributes: - authentication_method: google_oidc - enabled: false - id: "00000000-0000-0000-0000-000000000002" - type: identity_providers - - attributes: - authentication_method: standard - enabled: false - id: "00000000-0000-0000-0000-000000000003" - type: identity_providers + score: 80 + ts_end: 1779401466097 + ts_start: 1779315066097 + version: 1 + id: "123-v1-1779315066097-1779401466097" + type: "tag_rule_score" schema: - $ref: "#/components/schemas/IdentityProvidersResponse" + $ref: "#/components/schemas/TagRuleResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Authentication error + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: - - org_management - summary: List identity providers + summary: Get a tag rule tags: - - Identity Providers + - Tag Rules "x-permission": operator: OR permissions: - - org_management - - user_access_manage - /api/v2/identity_providers/{idp_id}: + - telemetry_rules_read + - metrics_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: - description: Enable or disable an identity provider for the current organization. - operationId: UpdateIdentityProvider + description: |- + 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's + `source` cannot be changed after creation. + operationId: UpdateTagRule parameters: - - $ref: "#/components/parameters/IdentityProviderId" + - description: The unique identifier of the tag rule to update. + example: "123" + in: path + name: rule_id + required: true + schema: + type: string requestBody: content: application/json: @@ -147587,10 +147818,11 @@ paths: data: attributes: enabled: true - id: "00000000-0000-0000-0000-000000000001" - type: identity_providers + name: "Service tag must be one of api, web, or worker" + id: "123" + type: "tag_rule" schema: - $ref: "#/components/schemas/IdentityProviderUpdateRequest" + $ref: "#/components/schemas/TagRuleUpdateRequest" required: true responses: "200": @@ -147601,12 +147833,26 @@ paths: value: data: attributes: - authentication_method: "SAML" + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" enabled: true - id: "00000000-0000-0000-0000-000000000001" - type: identity_providers + modified_at: "2026-05-21T22:25:01.000000Z" + modified_by: "test-user" + name: "Service tag must be one of api, web, or worker" + negated: false + required: true + rule_type: "surfacing" + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 2 + id: "123" + type: "tag_rule" schema: - $ref: "#/components/schemas/IdentityProviderResponse" + $ref: "#/components/schemas/TagRuleResponse" description: OK "400": content: @@ -147614,73 +147860,71 @@ paths: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Authentication error + description: Forbidden "404": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not found + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: - - org_management - summary: Update an identity provider + summary: Update a tag rule tags: - - Identity Providers - x-codegen-request-body-name: body + - Tag Rules "x-permission": - operator: OR + operator: AND permissions: - - org_management - /api/v2/identity_providers/{idp_id}/users: + - telemetry_rules_create + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/governance/tag_rules/{rule_id}/score: get: description: |- - Get all users in the organization whose login method has been overridden - to use the specified identity provider. - operationId: ListIdentityProviderUsers + 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. A `null` score indicates that + no relevant telemetry was found. + operationId: GetTagRuleScore parameters: - - $ref: "#/components/parameters/IdentityProviderId" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageNumber" - - description: User attribute to order results by. Options include `email` and `name`. - in: query - name: sort - required: false + - description: The unique identifier of the tag rule. + example: "123" + in: path + name: rule_id + required: true schema: - default: email - example: email type: string - - description: "Direction of sort. Options: `asc`, `desc`." - in: query - name: sort_dir - required: false - schema: - $ref: "#/components/schemas/QuerySortOrder" - - description: Filter users by the given string. Defaults to no filtering. + - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. + example: 1779315066097 in: query - name: filter + name: ts_start required: false schema: - type: string - - description: |- - Filter on status attribute. - Comma-separated list, with possible values `Active`, `Pending`, and `Disabled`. - Defaults to no filtering. + format: int64 + type: integer + - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. + example: 1779401466097 in: query - name: filter[status] + name: ts_end required: false schema: - example: Active - type: string + format: int64 + type: integer responses: "200": content: @@ -147689,19 +147933,15 @@ paths: default: value: data: - - attributes: - email: example@datadoghq.com - handle: example-user - name: Example User - status: Active - id: "00000000-0000-9999-0000-000000000001" - type: users - meta: - page: - total_count: 1 - total_filtered_count: 1 + attributes: + score: 80 + ts_end: 1779401466097 + ts_start: 1779315066097 + version: 1 + id: "123-v1-1779315066097-1779401466097" + type: "tag_rule_score" schema: - $ref: "#/components/schemas/UsersResponse" + $ref: "#/components/schemas/TagRuleScoreResponse" description: OK "400": content: @@ -147709,32 +147949,386 @@ paths: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Authentication error + description: Forbidden "404": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not found + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: - - org_management - summary: List users with an identity provider override + summary: Get a tag rule compliance score tags: - - Identity Providers - x-pagination: - limitParam: page[size] - pageParam: page[number] - resultsPath: data + - Tag Rules + "x-permission": + operator: OR + permissions: + - telemetry_rules_read + - metrics_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/hamr: + get: + description: |- + Retrieve the High Availability Multi-Region (HAMR) organization connection details for the authenticated organization. + This endpoint returns information about the HAMR connection configuration, including the target organization, + datacenter, status, and whether this is the primary or secondary organization in the HAMR relationship. + operationId: GetHamrOrgConnection + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + hamr_status: 4 + is_primary: true + modified_at: "2024-01-01T00:00:00+00:00" + modified_by: test@example.com + target_org_datacenter: us1 + target_org_name: Production Backup Org + target_org_uuid: 00000000-0000-0000-0000-000000000001 + id: 00000000-0000-0000-0000-000000000001 + type: hamr_org_connections + schema: + $ref: "#/components/schemas/HamrOrgConnectionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get HAMR organization connection + tags: + - High Availability MultiRegion + x-unstable: |- + **Note**: This endpoint is in public beta and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Create or update the High Availability Multi-Region (HAMR) organization connection. + This endpoint allows you to configure the HAMR connection between the authenticated organization + and a target organization, including setting the connection status (ONBOARDING, PASSIVE, FAILOVER, ACTIVE, RECOVERY) + operationId: CreateHamrOrgConnection + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + hamr_status: 4 + is_primary: true + modified_by: admin@example.com + target_org_datacenter: us1 + target_org_name: Production Backup Org + target_org_uuid: 660f9511-f3ac-52e5-b827-557766551111 + id: 550e8400-e29b-41d4-a716-446655440000 + type: hamr_org_connections + schema: + $ref: "#/components/schemas/HamrOrgConnectionRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + hamr_status: 4 + is_primary: true + modified_at: "2024-01-01T00:00:00+00:00" + modified_by: test@example.com + target_org_datacenter: us1 + target_org_name: Production Backup Org + target_org_uuid: 00000000-0000-0000-0000-000000000001 + id: 00000000-0000-0000-0000-000000000002 + type: hamr_org_connections + schema: + $ref: "#/components/schemas/HamrOrgConnectionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create or update HAMR organization connection + tags: + - High Availability MultiRegion + x-unstable: |- + **Note**: This endpoint is in public beta and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/identity_providers: + get: + description: Get all identity providers available for the current organization. + operationId: ListIdentityProviders + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication_method: "SAML" + enabled: true + id: "00000000-0000-0000-0000-000000000001" + type: identity_providers + - attributes: + authentication_method: google_oidc + enabled: false + id: "00000000-0000-0000-0000-000000000002" + type: identity_providers + - attributes: + authentication_method: standard + enabled: false + id: "00000000-0000-0000-0000-000000000003" + type: identity_providers + schema: + $ref: "#/components/schemas/IdentityProvidersResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Authentication error + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: List identity providers + tags: + - Identity Providers + "x-permission": + operator: OR + permissions: + - org_management + - user_access_manage + /api/v2/identity_providers/{idp_id}: + patch: + description: Enable or disable an identity provider for the current organization. + operationId: UpdateIdentityProvider + parameters: + - $ref: "#/components/parameters/IdentityProviderId" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + id: "00000000-0000-0000-0000-000000000001" + type: identity_providers + schema: + $ref: "#/components/schemas/IdentityProviderUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication_method: "SAML" + enabled: true + id: "00000000-0000-0000-0000-000000000001" + type: identity_providers + schema: + $ref: "#/components/schemas/IdentityProviderResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: Update an identity provider + tags: + - Identity Providers + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - org_management + /api/v2/identity_providers/{idp_id}/users: + get: + description: |- + Get all users in the organization whose login method has been overridden + to use the specified identity provider. + operationId: ListIdentityProviderUsers + parameters: + - $ref: "#/components/parameters/IdentityProviderId" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/PageNumber" + - description: User attribute to order results by. Options include `email` and `name`. + in: query + name: sort + required: false + schema: + default: email + example: email + type: string + - description: "Direction of sort. Options: `asc`, `desc`." + in: query + name: sort_dir + required: false + schema: + $ref: "#/components/schemas/QuerySortOrder" + - description: Filter users by the given string. Defaults to no filtering. + in: query + name: filter + required: false + schema: + type: string + - description: |- + Filter on status attribute. + Comma-separated list, with possible values `Active`, `Pending`, and `Disabled`. + Defaults to no filtering. + in: query + name: filter[status] + required: false + schema: + example: Active + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + email: example@datadoghq.com + handle: example-user + name: Example User + status: Active + id: "00000000-0000-9999-0000-000000000001" + type: users + meta: + page: + total_count: 1 + total_filtered_count: 1 + schema: + $ref: "#/components/schemas/UsersResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: List users with an identity provider override + tags: + - Identity Providers + x-pagination: + limitParam: page[size] + pageParam: page[number] + resultsPath: data "x-permission": operator: OR permissions: @@ -207509,604 +208103,6 @@ paths: operator: OR permissions: - synthetics_global_variable_write - /api/v2/tag_policies: - get: - description: |- - Retrieve all tag policies for the organization. Optionally include disabled or deleted - policies, filter by telemetry source, and include each policy's current compliance score - via the `include=score` query parameter. - operationId: ListTagPolicies - parameters: - - description: Whether to include policies that are currently disabled. Defaults to `false`. - example: false - in: query - name: include_disabled - required: false - schema: - type: boolean - - description: Whether to include policies that have been soft-deleted. Defaults to `false`. - example: false - in: query - name: include_deleted - required: false - schema: - type: boolean - - description: Comma-separated list of related resources to include alongside each policy in the response. Currently the only supported value is `score`. - example: "score" - in: query - name: include - required: false - schema: - $ref: "#/components/schemas/TagPolicyInclude" - - description: Restrict the result set to policies whose source matches the given value. - in: query - name: filter[source] - required: false - schema: - $ref: "#/components/schemas/TagPolicySource" - - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to a recent window appropriate for the source. - example: 1779315066097 - in: query - name: ts_start - required: false - schema: - format: int64 - type: integer - - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. - example: 1779401466097 - in: query - name: ts_end - required: false - schema: - format: int64 - type: integer - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - created_at: "2026-05-21T22:11:06.108696Z" - created_by: "test-user" - enabled: true - modified_at: "2026-05-21T22:11:06.108696Z" - modified_by: "test-user" - negated: false - policy_name: "Service tag must be one of api or web" - policy_type: "surfacing" - required: true - scope: "env" - source: "logs" - tag_key: "service" - tag_value_patterns: - - "api" - - "web" - version: 1 - id: "123" - relationships: - score: - data: - id: "123-v1-1779315066097-1779401466097" - type: "tag_policy_score" - type: "tag_policy" - included: - - attributes: - score: 80 - ts_end: 1779401466097 - ts_start: 1779315066097 - version: 1 - id: "123-v1-1779315066097-1779401466097" - type: "tag_policy_score" - schema: - $ref: "#/components/schemas/TagPoliciesListResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: List tag policies - tags: - - Tag Policies - "x-permission": - operator: OR - permissions: - - telemetry_rules_read - - metrics_read - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: |- - Create a new tag policy for the organization. The caller's organization is derived from - the authenticated user; cross-organization creation is not supported. Fields such as - `policy_id`, `version`, and the timestamp/audit fields are assigned by the server. - operationId: CreateTagPolicy - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - enabled: true - negated: false - policy_name: "Service tag must be one of api or web" - policy_type: "surfacing" - required: true - scope: "env" - source: "logs" - tag_key: "service" - tag_value_patterns: - - "api" - - "web" - type: "tag_policy" - schema: - $ref: "#/components/schemas/TagPolicyCreateRequest" - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2026-05-21T22:11:06.108696Z" - created_by: "test-user" - enabled: true - modified_at: "2026-05-21T22:11:06.108696Z" - modified_by: "test-user" - negated: false - policy_name: "Service tag must be one of api or web" - policy_type: "surfacing" - required: true - scope: "env" - source: "logs" - tag_key: "service" - tag_value_patterns: - - "api" - - "web" - version: 1 - id: "123" - type: "tag_policy" - schema: - $ref: "#/components/schemas/TagPolicyResponse" - description: Created - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Conflict - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Create a tag policy - tags: - - Tag Policies - "x-permission": - operator: AND - permissions: - - telemetry_rules_create - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/tag_policies/{policy_id}: - delete: - description: |- - Delete a tag policy. By default the policy is soft-deleted so it can be recovered later - and so that historical score data remains queryable. Pass `hard_delete=true` to remove - the policy permanently. - operationId: DeleteTagPolicy - parameters: - - description: The unique identifier of the tag policy to delete. - example: "123" - in: path - name: policy_id - required: true - schema: - type: string - - description: Whether to permanently delete the policy instead of performing a soft delete. Defaults to `false`. - example: false - in: query - name: hard_delete - required: false - schema: - type: boolean - responses: - "204": - description: No Content - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Delete a tag policy - tags: - - Tag Policies - "x-permission": - operator: AND - permissions: - - telemetry_rules_create - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: |- - Retrieve a single tag policy by ID. Optionally include the policy's current compliance - score via the `include=score` query parameter. Policies belonging to other organizations - cannot be retrieved. - operationId: GetTagPolicy - parameters: - - description: The unique identifier of the tag policy. - example: "123" - in: path - name: policy_id - required: true - schema: - type: string - - description: Comma-separated list of related resources to include alongside the policy. Currently the only supported value is `score`. - example: "score" - in: query - name: include - required: false - schema: - $ref: "#/components/schemas/TagPolicyInclude" - - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. - example: 1779315066097 - in: query - name: ts_start - required: false - schema: - format: int64 - type: integer - - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. - example: 1779401466097 - in: query - name: ts_end - required: false - schema: - format: int64 - type: integer - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2026-05-21T22:11:06.108696Z" - created_by: "test-user" - enabled: true - modified_at: "2026-05-21T22:11:06.108696Z" - modified_by: "test-user" - negated: false - policy_name: "Service tag must be one of api or web" - policy_type: "surfacing" - required: true - scope: "env" - source: "logs" - tag_key: "service" - tag_value_patterns: - - "api" - - "web" - version: 1 - id: "123" - relationships: - score: - data: - id: "123-v1-1779315066097-1779401466097" - type: "tag_policy_score" - type: "tag_policy" - included: - - attributes: - score: 80 - ts_end: 1779401466097 - ts_start: 1779315066097 - version: 1 - id: "123-v1-1779315066097-1779401466097" - type: "tag_policy_score" - schema: - $ref: "#/components/schemas/TagPolicyResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Get a tag policy - tags: - - Tag Policies - "x-permission": - operator: OR - permissions: - - telemetry_rules_read - - metrics_read - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - patch: - description: |- - Update one or more attributes of an existing tag policy. Only the fields supplied in the - request body are modified; omitted fields retain their current values. The policy's - `source` cannot be changed after creation. - operationId: UpdateTagPolicy - parameters: - - description: The unique identifier of the tag policy to update. - example: "123" - in: path - name: policy_id - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - enabled: true - policy_name: "Service tag must be one of api, web, or worker" - id: "123" - type: "tag_policy" - schema: - $ref: "#/components/schemas/TagPolicyUpdateRequest" - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2026-05-21T22:11:06.108696Z" - created_by: "test-user" - enabled: true - modified_at: "2026-05-21T22:25:01.000000Z" - modified_by: "test-user" - negated: false - policy_name: "Service tag must be one of api, web, or worker" - policy_type: "surfacing" - required: true - scope: "env" - source: "logs" - tag_key: "service" - tag_value_patterns: - - "api" - - "web" - version: 2 - id: "123" - type: "tag_policy" - schema: - $ref: "#/components/schemas/TagPolicyResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Update a tag policy - tags: - - Tag Policies - "x-permission": - operator: AND - permissions: - - telemetry_rules_create - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/tag_policies/{policy_id}/score: - get: - description: |- - Retrieve the compliance score for a single tag policy. 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 policy. A `null` score indicates that - no relevant telemetry was found. - operationId: GetTagPolicyScore - parameters: - - description: The unique identifier of the tag policy. - example: "123" - in: path - name: policy_id - required: true - schema: - type: string - - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. - example: 1779315066097 - in: query - name: ts_start - required: false - schema: - format: int64 - type: integer - - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. - example: 1779401466097 - in: query - name: ts_end - required: false - schema: - format: int64 - type: integer - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - score: 80 - ts_end: 1779401466097 - ts_start: 1779315066097 - version: 1 - id: "123-v1-1779315066097-1779401466097" - type: "tag_policy_score" - schema: - $ref: "#/components/schemas/TagPolicyScoreResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Get a tag policy compliance score - tags: - - Tag Policies - "x-permission": - operator: OR - permissions: - - telemetry_rules_read - - metrics_read - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/tags/enrichment: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline rulesets for the organization @@ -214581,12 +214577,12 @@ tags: For more information, see the [Synthetic Monitoring documentation](https://docs.datadoghq.com/synthetics/). name: Synthetics - description: |- - Tag Policies define rules that govern which tag values are accepted for a given tag key, - scoped to a particular telemetry source (such as logs, spans, or metrics). Policies can be - `blocking` (data not matching the policy is rejected) or `surfacing` (matching data is - highlighted but not blocked). Each policy reports a compliance `score` derived from how - much recent telemetry adheres to the policy. - name: Tag Policies + Tag Rules define rules that govern which tag values are accepted for a given tag key, + scoped to a particular telemetry source (such as logs, spans, or metrics). Rules can be + `blocking` (data not matching the rule is rejected) or `surfacing` (matching data is + highlighted but not blocked). Each rule reports a compliance `score` derived from how + much recent telemetry adheres to the rule. + name: Tag Rules - description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/) for more information. name: Teams - description: |- diff --git a/examples/v2/tag-policies/CreateTagPolicy.java b/examples/v2/tag-policies/CreateTagPolicy.java deleted file mode 100644 index 46f272e6715..00000000000 --- a/examples/v2/tag-policies/CreateTagPolicy.java +++ /dev/null @@ -1,49 +0,0 @@ -// Create a tag policy returns "Created" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.TagPoliciesApi; -import com.datadog.api.client.v2.model.TagPolicyCreateAttributes; -import com.datadog.api.client.v2.model.TagPolicyCreateData; -import com.datadog.api.client.v2.model.TagPolicyCreateRequest; -import com.datadog.api.client.v2.model.TagPolicyCreateType; -import com.datadog.api.client.v2.model.TagPolicyResourceType; -import com.datadog.api.client.v2.model.TagPolicyResponse; -import com.datadog.api.client.v2.model.TagPolicySource; -import java.util.Arrays; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.createTagPolicy", true); - TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); - - TagPolicyCreateRequest body = - new TagPolicyCreateRequest() - .data( - new TagPolicyCreateData() - .attributes( - new TagPolicyCreateAttributes() - .enabled(true) - .negated(false) - .policyName("Service tag must be one of api or web") - .policyType(TagPolicyCreateType.SURFACING) - .required(true) - .scope("env") - .source(TagPolicySource.LOGS) - .tagKey("service") - .tagValuePatterns(Arrays.asList("api", "web"))) - .type(TagPolicyResourceType.TAG_POLICY)); - - try { - TagPolicyResponse result = apiInstance.createTagPolicy(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TagPoliciesApi#createTagPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/tag-policies/UpdateTagPolicy.java b/examples/v2/tag-policies/UpdateTagPolicy.java deleted file mode 100644 index 07bcef5ef2c..00000000000 --- a/examples/v2/tag-policies/UpdateTagPolicy.java +++ /dev/null @@ -1,38 +0,0 @@ -// Update a tag policy returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.TagPoliciesApi; -import com.datadog.api.client.v2.model.TagPolicyResourceType; -import com.datadog.api.client.v2.model.TagPolicyResponse; -import com.datadog.api.client.v2.model.TagPolicyType; -import com.datadog.api.client.v2.model.TagPolicyUpdateAttributes; -import com.datadog.api.client.v2.model.TagPolicyUpdateData; -import com.datadog.api.client.v2.model.TagPolicyUpdateRequest; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.updateTagPolicy", true); - TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); - - TagPolicyUpdateRequest body = - new TagPolicyUpdateRequest() - .data( - new TagPolicyUpdateData() - .attributes(new TagPolicyUpdateAttributes().policyType(TagPolicyType.SURFACING)) - .id("123") - .type(TagPolicyResourceType.TAG_POLICY)); - - try { - TagPolicyResponse result = apiInstance.updateTagPolicy("123", body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TagPoliciesApi#updateTagPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/tag-rules/CreateTagRule.java b/examples/v2/tag-rules/CreateTagRule.java new file mode 100644 index 00000000000..b9192a3f0f8 --- /dev/null +++ b/examples/v2/tag-rules/CreateTagRule.java @@ -0,0 +1,49 @@ +// Create a tag rule returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagRulesApi; +import com.datadog.api.client.v2.model.TagRuleCreateAttributes; +import com.datadog.api.client.v2.model.TagRuleCreateData; +import com.datadog.api.client.v2.model.TagRuleCreateRequest; +import com.datadog.api.client.v2.model.TagRuleCreateType; +import com.datadog.api.client.v2.model.TagRuleResourceType; +import com.datadog.api.client.v2.model.TagRuleResponse; +import com.datadog.api.client.v2.model.TagRuleSource; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createTagRule", true); + TagRulesApi apiInstance = new TagRulesApi(defaultClient); + + TagRuleCreateRequest body = + new TagRuleCreateRequest() + .data( + new TagRuleCreateData() + .attributes( + new TagRuleCreateAttributes() + .enabled(true) + .name("Service tag must be one of api or web") + .negated(false) + .required(true) + .ruleType(TagRuleCreateType.SURFACING) + .scope("env") + .source(TagRuleSource.LOGS) + .tagKey("service") + .tagValuePatterns(Arrays.asList("api", "web"))) + .type(TagRuleResourceType.TAG_RULE)); + + try { + TagRuleResponse result = apiInstance.createTagRule(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagRulesApi#createTagRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/DeleteTagPolicy.java b/examples/v2/tag-rules/DeleteTagRule.java similarity index 56% rename from examples/v2/tag-policies/DeleteTagPolicy.java rename to examples/v2/tag-rules/DeleteTagRule.java index 1f99a8f9079..0710bcaa467 100644 --- a/examples/v2/tag-policies/DeleteTagPolicy.java +++ b/examples/v2/tag-rules/DeleteTagRule.java @@ -1,19 +1,19 @@ -// Delete a tag policy returns "No Content" response +// Delete a tag rule returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.TagPoliciesApi; +import com.datadog.api.client.v2.api.TagRulesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.deleteTagPolicy", true); - TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + defaultClient.setUnstableOperationEnabled("v2.deleteTagRule", true); + TagRulesApi apiInstance = new TagRulesApi(defaultClient); try { - apiInstance.deleteTagPolicy("123"); + apiInstance.deleteTagRule("123"); } catch (ApiException e) { - System.err.println("Exception when calling TagPoliciesApi#deleteTagPolicy"); + System.err.println("Exception when calling TagRulesApi#deleteTagRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/tag-policies/ListTagPolicies.java b/examples/v2/tag-rules/GetTagRule.java similarity index 53% rename from examples/v2/tag-policies/ListTagPolicies.java rename to examples/v2/tag-rules/GetTagRule.java index 7aa01b75df1..fbf90596e9d 100644 --- a/examples/v2/tag-policies/ListTagPolicies.java +++ b/examples/v2/tag-rules/GetTagRule.java @@ -1,21 +1,21 @@ -// List tag policies returns "OK" response +// Get a tag rule returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.TagPoliciesApi; -import com.datadog.api.client.v2.model.TagPoliciesListResponse; +import com.datadog.api.client.v2.api.TagRulesApi; +import com.datadog.api.client.v2.model.TagRuleResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listTagPolicies", true); - TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + defaultClient.setUnstableOperationEnabled("v2.getTagRule", true); + TagRulesApi apiInstance = new TagRulesApi(defaultClient); try { - TagPoliciesListResponse result = apiInstance.listTagPolicies(); + TagRuleResponse result = apiInstance.getTagRule("123"); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TagPoliciesApi#listTagPolicies"); + System.err.println("Exception when calling TagRulesApi#getTagRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/tag-policies/GetTagPolicyScore.java b/examples/v2/tag-rules/GetTagRuleScore.java similarity index 51% rename from examples/v2/tag-policies/GetTagPolicyScore.java rename to examples/v2/tag-rules/GetTagRuleScore.java index 1574f9a5832..7ffd8c4e698 100644 --- a/examples/v2/tag-policies/GetTagPolicyScore.java +++ b/examples/v2/tag-rules/GetTagRuleScore.java @@ -1,21 +1,21 @@ -// Get a tag policy compliance score returns "OK" response +// Get a tag rule compliance score returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.TagPoliciesApi; -import com.datadog.api.client.v2.model.TagPolicyScoreResponse; +import com.datadog.api.client.v2.api.TagRulesApi; +import com.datadog.api.client.v2.model.TagRuleScoreResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getTagPolicyScore", true); - TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + defaultClient.setUnstableOperationEnabled("v2.getTagRuleScore", true); + TagRulesApi apiInstance = new TagRulesApi(defaultClient); try { - TagPolicyScoreResponse result = apiInstance.getTagPolicyScore("123"); + TagRuleScoreResponse result = apiInstance.getTagRuleScore("123"); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TagPoliciesApi#getTagPolicyScore"); + System.err.println("Exception when calling TagRulesApi#getTagRuleScore"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/tag-policies/GetTagPolicy.java b/examples/v2/tag-rules/ListTagRules.java similarity index 55% rename from examples/v2/tag-policies/GetTagPolicy.java rename to examples/v2/tag-rules/ListTagRules.java index b14c1c0139a..879d70d5edf 100644 --- a/examples/v2/tag-policies/GetTagPolicy.java +++ b/examples/v2/tag-rules/ListTagRules.java @@ -1,21 +1,21 @@ -// Get a tag policy returns "OK" response +// List tag rules returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.TagPoliciesApi; -import com.datadog.api.client.v2.model.TagPolicyResponse; +import com.datadog.api.client.v2.api.TagRulesApi; +import com.datadog.api.client.v2.model.TagRulesListResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getTagPolicy", true); - TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + defaultClient.setUnstableOperationEnabled("v2.listTagRules", true); + TagRulesApi apiInstance = new TagRulesApi(defaultClient); try { - TagPolicyResponse result = apiInstance.getTagPolicy("123"); + TagRulesListResponse result = apiInstance.listTagRules(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TagPoliciesApi#getTagPolicy"); + System.err.println("Exception when calling TagRulesApi#listTagRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/tag-rules/UpdateTagRule.java b/examples/v2/tag-rules/UpdateTagRule.java new file mode 100644 index 00000000000..0d7b5235d49 --- /dev/null +++ b/examples/v2/tag-rules/UpdateTagRule.java @@ -0,0 +1,38 @@ +// Update a tag rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagRulesApi; +import com.datadog.api.client.v2.model.TagRuleResourceType; +import com.datadog.api.client.v2.model.TagRuleResponse; +import com.datadog.api.client.v2.model.TagRuleType; +import com.datadog.api.client.v2.model.TagRuleUpdateAttributes; +import com.datadog.api.client.v2.model.TagRuleUpdateData; +import com.datadog.api.client.v2.model.TagRuleUpdateRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateTagRule", true); + TagRulesApi apiInstance = new TagRulesApi(defaultClient); + + TagRuleUpdateRequest body = + new TagRuleUpdateRequest() + .data( + new TagRuleUpdateData() + .attributes(new TagRuleUpdateAttributes().ruleType(TagRuleType.SURFACING)) + .id("123") + .type(TagRuleResourceType.TAG_RULE)); + + try { + TagRuleResponse result = apiInstance.updateTagRule("123", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagRulesApi#updateTagRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 5d4cf42b198..6b1122e161c 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1114,6 +1114,12 @@ public class ApiClient { put("v2.updateGovernanceControlNotificationSettings", false); put("v2.updateGovernanceDetection", false); put("v2.updateGovernanceNotificationSettings", false); + put("v2.createTagRule", false); + put("v2.deleteTagRule", false); + put("v2.getTagRule", false); + put("v2.getTagRuleScore", false); + put("v2.listTagRules", false); + put("v2.updateTagRule", false); put("v2.createHamrOrgConnection", false); put("v2.getHamrOrgConnection", false); put("v2.deleteEntityIntegrationConfig", false); @@ -1379,12 +1385,6 @@ public class ApiClient { put("v2.revertCustomRuleRevision", false); put("v2.updateAiCustomRuleset", false); put("v2.updateCustomRuleset", false); - put("v2.createTagPolicy", false); - put("v2.deleteTagPolicy", false); - put("v2.getTagPolicy", false); - put("v2.getTagPolicyScore", false); - put("v2.listTagPolicies", false); - put("v2.updateTagPolicy", false); put("v2.addMemberTeam", false); put("v2.listMemberTeams", false); put("v2.removeMemberTeam", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/TagPoliciesApi.java b/src/main/java/com/datadog/api/client/v2/api/TagRulesApi.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/api/TagPoliciesApi.java rename to src/main/java/com/datadog/api/client/v2/api/TagRulesApi.java index cb577697978..ed90012f7f8 100644 --- a/src/main/java/com/datadog/api/client/v2/api/TagPoliciesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/TagRulesApi.java @@ -4,13 +4,13 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.TagPoliciesListResponse; -import com.datadog.api.client.v2.model.TagPolicyCreateRequest; -import com.datadog.api.client.v2.model.TagPolicyInclude; -import com.datadog.api.client.v2.model.TagPolicyResponse; -import com.datadog.api.client.v2.model.TagPolicyScoreResponse; -import com.datadog.api.client.v2.model.TagPolicySource; -import com.datadog.api.client.v2.model.TagPolicyUpdateRequest; +import com.datadog.api.client.v2.model.TagRuleCreateRequest; +import com.datadog.api.client.v2.model.TagRuleInclude; +import com.datadog.api.client.v2.model.TagRuleResponse; +import com.datadog.api.client.v2.model.TagRuleScoreResponse; +import com.datadog.api.client.v2.model.TagRuleSource; +import com.datadog.api.client.v2.model.TagRuleUpdateRequest; +import com.datadog.api.client.v2.model.TagRulesListResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -21,14 +21,14 @@ @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class TagPoliciesApi { +public class TagRulesApi { private ApiClient apiClient; - public TagPoliciesApi() { + public TagRulesApi() { this(ApiClient.getDefaultApiClient()); } - public TagPoliciesApi(ApiClient apiClient) { + public TagRulesApi(ApiClient apiClient) { this.apiClient = apiClient; } @@ -51,28 +51,28 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a tag policy. + * Create a tag rule. * - *
See {@link #createTagPolicyWithHttpInfo}. + *
See {@link #createTagRuleWithHttpInfo}. * * @param body (required) - * @return TagPolicyResponse + * @return TagRuleResponse * @throws ApiException if fails to make API call */ - public TagPolicyResponse createTagPolicy(TagPolicyCreateRequest body) throws ApiException { - return createTagPolicyWithHttpInfo(body).getData(); + public TagRuleResponse createTagRule(TagRuleCreateRequest body) throws ApiException { + return createTagRuleWithHttpInfo(body).getData(); } /** - * Create a tag policy. + * Create a tag rule. * - *
See {@link #createTagPolicyWithHttpInfoAsync}. + *
See {@link #createTagRuleWithHttpInfoAsync}.
*
* @param body (required)
- * @return CompletableFuture<TagPolicyResponse>
+ * @return CompletableFuture<TagRuleResponse>
*/
- public CompletableFuture See {@link #createTagPolicyWithHttpInfo}.
+ * See {@link #createTagRuleWithHttpInfo}.
*
* @param body (required)
- * @return CompletableFuture<ApiResponse<TagPolicyResponse>>
+ * @return CompletableFuture<ApiResponse<TagRuleResponse>>
*/
- public CompletableFuture See {@link #deleteTagPolicyWithHttpInfo}.
+ * See {@link #deleteTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy to delete. (required)
+ * @param ruleId The unique identifier of the tag rule to delete. (required)
* @throws ApiException if fails to make API call
*/
- public void deleteTagPolicy(String policyId) throws ApiException {
- deleteTagPolicyWithHttpInfo(policyId, new DeleteTagPolicyOptionalParameters());
+ public void deleteTagRule(String ruleId) throws ApiException {
+ deleteTagRuleWithHttpInfo(ruleId, new DeleteTagRuleOptionalParameters());
}
/**
- * Delete a tag policy.
+ * Delete a tag rule.
*
- * See {@link #deleteTagPolicyWithHttpInfoAsync}.
+ * See {@link #deleteTagRuleWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy to delete. (required)
+ * @param ruleId The unique identifier of the tag rule to delete. (required)
* @return CompletableFuture
*/
- public CompletableFuture See {@link #deleteTagPolicyWithHttpInfo}.
+ * See {@link #deleteTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy to delete. (required)
+ * @param ruleId The unique identifier of the tag rule to delete. (required)
* @param parameters Optional parameters for the request.
* @throws ApiException if fails to make API call
*/
- public void deleteTagPolicy(String policyId, DeleteTagPolicyOptionalParameters parameters)
+ public void deleteTagRule(String ruleId, DeleteTagRuleOptionalParameters parameters)
throws ApiException {
- deleteTagPolicyWithHttpInfo(policyId, parameters);
+ deleteTagRuleWithHttpInfo(ruleId, parameters);
}
/**
- * Delete a tag policy.
+ * Delete a tag rule.
*
- * See {@link #deleteTagPolicyWithHttpInfoAsync}.
+ * See {@link #deleteTagRuleWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy to delete. (required)
+ * @param ruleId The unique identifier of the tag rule to delete. (required)
* @param parameters Optional parameters for the request.
* @return CompletableFuture
*/
- public CompletableFuture See {@link #deleteTagPolicyWithHttpInfo}.
+ * See {@link #deleteTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy to delete. (required)
+ * @param ruleId The unique identifier of the tag rule to delete. (required)
* @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<Void>>
*/
- public CompletableFuture See {@link #getTagPolicyWithHttpInfo}.
+ * See {@link #getTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy. (required)
- * @return TagPolicyResponse
+ * @param ruleId The unique identifier of the tag rule. (required)
+ * @return TagRuleResponse
* @throws ApiException if fails to make API call
*/
- public TagPolicyResponse getTagPolicy(String policyId) throws ApiException {
- return getTagPolicyWithHttpInfo(policyId, new GetTagPolicyOptionalParameters()).getData();
+ public TagRuleResponse getTagRule(String ruleId) throws ApiException {
+ return getTagRuleWithHttpInfo(ruleId, new GetTagRuleOptionalParameters()).getData();
}
/**
- * Get a tag policy.
+ * Get a tag rule.
*
- * See {@link #getTagPolicyWithHttpInfoAsync}.
+ * See {@link #getTagRuleWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy. (required)
- * @return CompletableFuture<TagPolicyResponse>
+ * @param ruleId The unique identifier of the tag rule. (required)
+ * @return CompletableFuture<TagRuleResponse>
*/
- public CompletableFuture See {@link #getTagPolicyWithHttpInfo}.
+ * See {@link #getTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return TagPolicyResponse
+ * @return TagRuleResponse
* @throws ApiException if fails to make API call
*/
- public TagPolicyResponse getTagPolicy(String policyId, GetTagPolicyOptionalParameters parameters)
+ public TagRuleResponse getTagRule(String ruleId, GetTagRuleOptionalParameters parameters)
throws ApiException {
- return getTagPolicyWithHttpInfo(policyId, parameters).getData();
+ return getTagRuleWithHttpInfo(ruleId, parameters).getData();
}
/**
- * Get a tag policy.
+ * Get a tag rule.
*
- * See {@link #getTagPolicyWithHttpInfoAsync}.
+ * See {@link #getTagRuleWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<TagPolicyResponse>
+ * @return CompletableFuture<TagRuleResponse>
*/
- public CompletableFuture See {@link #getTagPolicyWithHttpInfo}.
+ * See {@link #getTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<TagPolicyResponse>>
+ * @return CompletableFuture<ApiResponse<TagRuleResponse>>
*/
- public CompletableFuture See {@link #getTagPolicyScoreWithHttpInfo}.
+ * See {@link #getTagRuleScoreWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy. (required)
- * @return TagPolicyScoreResponse
+ * @param ruleId The unique identifier of the tag rule. (required)
+ * @return TagRuleScoreResponse
* @throws ApiException if fails to make API call
*/
- public TagPolicyScoreResponse getTagPolicyScore(String policyId) throws ApiException {
- return getTagPolicyScoreWithHttpInfo(policyId, new GetTagPolicyScoreOptionalParameters())
- .getData();
+ public TagRuleScoreResponse getTagRuleScore(String ruleId) throws ApiException {
+ return getTagRuleScoreWithHttpInfo(ruleId, new GetTagRuleScoreOptionalParameters()).getData();
}
/**
- * Get a tag policy compliance score.
+ * Get a tag rule compliance score.
*
- * See {@link #getTagPolicyScoreWithHttpInfoAsync}.
+ * See {@link #getTagRuleScoreWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy. (required)
- * @return CompletableFuture<TagPolicyScoreResponse>
+ * @param ruleId The unique identifier of the tag rule. (required)
+ * @return CompletableFuture<TagRuleScoreResponse>
*/
- public CompletableFuture See {@link #getTagPolicyScoreWithHttpInfo}.
+ * See {@link #getTagRuleScoreWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return TagPolicyScoreResponse
+ * @return TagRuleScoreResponse
* @throws ApiException if fails to make API call
*/
- public TagPolicyScoreResponse getTagPolicyScore(
- String policyId, GetTagPolicyScoreOptionalParameters parameters) throws ApiException {
- return getTagPolicyScoreWithHttpInfo(policyId, parameters).getData();
+ public TagRuleScoreResponse getTagRuleScore(
+ String ruleId, GetTagRuleScoreOptionalParameters parameters) throws ApiException {
+ return getTagRuleScoreWithHttpInfo(ruleId, parameters).getData();
}
/**
- * Get a tag policy compliance score.
+ * Get a tag rule compliance score.
*
- * See {@link #getTagPolicyScoreWithHttpInfoAsync}.
+ * See {@link #getTagRuleScoreWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<TagPolicyScoreResponse>
+ * @return CompletableFuture<TagRuleScoreResponse>
*/
- public CompletableFuture See {@link #getTagPolicyScoreWithHttpInfo}.
+ * See {@link #getTagRuleScoreWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<TagPolicyScoreResponse>>
+ * @return CompletableFuture<ApiResponse<TagRuleScoreResponse>>
*/
- public CompletableFuture See {@link #listTagPoliciesWithHttpInfo}.
+ * See {@link #listTagRulesWithHttpInfo}.
*
- * @return TagPoliciesListResponse
+ * @return TagRulesListResponse
* @throws ApiException if fails to make API call
*/
- public TagPoliciesListResponse listTagPolicies() throws ApiException {
- return listTagPoliciesWithHttpInfo(new ListTagPoliciesOptionalParameters()).getData();
+ public TagRulesListResponse listTagRules() throws ApiException {
+ return listTagRulesWithHttpInfo(new ListTagRulesOptionalParameters()).getData();
}
/**
- * List tag policies.
+ * List tag rules.
*
- * See {@link #listTagPoliciesWithHttpInfoAsync}.
+ * See {@link #listTagRulesWithHttpInfoAsync}.
*
- * @return CompletableFuture<TagPoliciesListResponse>
+ * @return CompletableFuture<TagRulesListResponse>
*/
- public CompletableFuture See {@link #listTagPoliciesWithHttpInfo}.
+ * See {@link #listTagRulesWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
- * @return TagPoliciesListResponse
+ * @return TagRulesListResponse
* @throws ApiException if fails to make API call
*/
- public TagPoliciesListResponse listTagPolicies(ListTagPoliciesOptionalParameters parameters)
+ public TagRulesListResponse listTagRules(ListTagRulesOptionalParameters parameters)
throws ApiException {
- return listTagPoliciesWithHttpInfo(parameters).getData();
+ return listTagRulesWithHttpInfo(parameters).getData();
}
/**
- * List tag policies.
+ * List tag rules.
*
- * See {@link #listTagPoliciesWithHttpInfoAsync}.
+ * See {@link #listTagRulesWithHttpInfoAsync}.
*
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<TagPoliciesListResponse>
+ * @return CompletableFuture<TagRulesListResponse>
*/
- public CompletableFuture See {@link #listTagPoliciesWithHttpInfo}.
+ * See {@link #listTagRulesWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
- * @return CompletableFuture<ApiResponse<TagPoliciesListResponse>>
+ * @return CompletableFuture<ApiResponse<TagRulesListResponse>>
*/
- public CompletableFuture See {@link #updateTagPolicyWithHttpInfo}.
+ * See {@link #updateTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy to update. (required)
+ * @param ruleId The unique identifier of the tag rule to update. (required)
* @param body (required)
- * @return TagPolicyResponse
+ * @return TagRuleResponse
* @throws ApiException if fails to make API call
*/
- public TagPolicyResponse updateTagPolicy(String policyId, TagPolicyUpdateRequest body)
+ public TagRuleResponse updateTagRule(String ruleId, TagRuleUpdateRequest body)
throws ApiException {
- return updateTagPolicyWithHttpInfo(policyId, body).getData();
+ return updateTagRuleWithHttpInfo(ruleId, body).getData();
}
/**
- * Update a tag policy.
+ * Update a tag rule.
*
- * See {@link #updateTagPolicyWithHttpInfoAsync}.
+ * See {@link #updateTagRuleWithHttpInfoAsync}.
*
- * @param policyId The unique identifier of the tag policy to update. (required)
+ * @param ruleId The unique identifier of the tag rule to update. (required)
* @param body (required)
- * @return CompletableFuture<TagPolicyResponse>
+ * @return CompletableFuture<TagRuleResponse>
*/
- public CompletableFuture See {@link #updateTagPolicyWithHttpInfo}.
+ * See {@link #updateTagRuleWithHttpInfo}.
*
- * @param policyId The unique identifier of the tag policy to update. (required)
+ * @param ruleId The unique identifier of the tag rule to update. (required)
* @param body (required)
- * @return CompletableFuture<ApiResponse<TagPolicyResponse>>
+ * @return CompletableFuture<ApiResponse<TagRuleResponse>>
*/
- public CompletableFuture
- * policy_id, version, and the timestamp/audit fields are assigned by the
- * server.
+ * 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 as rule_id
+ * , version, and the timestamp/audit fields are assigned by the server.
*
* @param body (required)
- * @return ApiResponse<TagPolicyResponse>
+ * @return ApiResponse<TagRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -100,10 +99,10 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests - false. (optional)
- * @return DeleteTagPolicyOptionalParameters
+ * @param hardDelete Whether to permanently delete the rule instead of performing a soft delete.
+ * Defaults to false. (optional)
+ * @return DeleteTagRuleOptionalParameters
*/
- public DeleteTagPolicyOptionalParameters hardDelete(Boolean hardDelete) {
+ public DeleteTagRuleOptionalParameters hardDelete(Boolean hardDelete) {
this.hardDelete = hardDelete;
return this;
}
}
/**
- * Delete a tag policy.
+ * Delete a tag rule.
*
- * hard_delete=true to remove the
- * policy permanently.
+ * 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. Pass hard_delete=true to remove the rule
+ * permanently.
*
- * @param policyId The unique identifier of the tag policy to delete. (required)
+ * @param ruleId The unique identifier of the tag rule to delete. (required)
* @param parameters Optional parameters for the request.
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
@@ -301,10 +300,10 @@ public CompletableFuture
*
*/
- public ApiResponse 429 Too many requests - score. (optional)
- * @return GetTagPolicyOptionalParameters
+ * @return GetTagRuleOptionalParameters
*/
- public GetTagPolicyOptionalParameters include(TagPolicyInclude include) {
+ public GetTagRuleOptionalParameters include(TagRuleInclude include) {
this.include = include;
return this;
}
@@ -440,9 +439,9 @@ public GetTagPolicyOptionalParameters include(TagPolicyInclude include) {
*
* @param tsStart Start of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. (optional)
- * @return GetTagPolicyOptionalParameters
+ * @return GetTagRuleOptionalParameters
*/
- public GetTagPolicyOptionalParameters tsStart(Long tsStart) {
+ public GetTagRuleOptionalParameters tsStart(Long tsStart) {
this.tsStart = tsStart;
return this;
}
@@ -453,37 +452,37 @@ public GetTagPolicyOptionalParameters tsStart(Long tsStart) {
* @param tsEnd End of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. Must be in the past and greater than ts_start.
* (optional)
- * @return GetTagPolicyOptionalParameters
+ * @return GetTagRuleOptionalParameters
*/
- public GetTagPolicyOptionalParameters tsEnd(Long tsEnd) {
+ public GetTagRuleOptionalParameters tsEnd(Long tsEnd) {
this.tsEnd = tsEnd;
return this;
}
}
/**
- * Get a tag policy.
+ * Get a tag rule.
*
- * include=score query parameter. Policies belonging to other organizations
- * cannot be retrieved.
+ * Retrieve a single tag rule by ID. Optionally include the rule's current compliance score via
+ * the include=score query parameter. Rules belonging to other organizations cannot
+ * be retrieved.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return ApiResponse<TagPolicyResponse>
+ * @return ApiResponse<TagRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -544,10 +543,10 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests - ts_start.
* (optional)
- * @return GetTagPolicyScoreOptionalParameters
+ * @return GetTagRuleScoreOptionalParameters
*/
- public GetTagPolicyScoreOptionalParameters tsEnd(Long tsEnd) {
+ public GetTagRuleScoreOptionalParameters tsEnd(Long tsEnd) {
this.tsEnd = tsEnd;
return this;
}
}
/**
- * Get a tag policy compliance score.
+ * Get a tag rule compliance score.
*
- * null score indicates that no relevant
+ * that window that conforms to the rule. A null score indicates that no relevant
* telemetry was found.
*
- * @param policyId The unique identifier of the tag policy. (required)
+ * @param ruleId The unique identifier of the tag rule. (required)
* @param parameters Optional parameters for the request.
- * @return ApiResponse<TagPolicyScoreResponse>
+ * @return ApiResponse<TagRuleScoreResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -784,10 +781,10 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests - false. (optional)
- * @return ListTagPoliciesOptionalParameters
+ * @return ListTagRulesOptionalParameters
*/
- public ListTagPoliciesOptionalParameters includeDisabled(Boolean includeDisabled) {
+ public ListTagRulesOptionalParameters includeDisabled(Boolean includeDisabled) {
this.includeDisabled = includeDisabled;
return this;
}
@@ -928,11 +925,11 @@ public ListTagPoliciesOptionalParameters includeDisabled(Boolean includeDisabled
/**
* Set includeDeleted.
*
- * @param includeDeleted Whether to include policies that have been soft-deleted. Defaults to
+ * @param includeDeleted Whether to include rules that have been soft-deleted. Defaults to
* false. (optional)
- * @return ListTagPoliciesOptionalParameters
+ * @return ListTagRulesOptionalParameters
*/
- public ListTagPoliciesOptionalParameters includeDeleted(Boolean includeDeleted) {
+ public ListTagRulesOptionalParameters includeDeleted(Boolean includeDeleted) {
this.includeDeleted = includeDeleted;
return this;
}
@@ -940,11 +937,11 @@ public ListTagPoliciesOptionalParameters includeDeleted(Boolean includeDeleted)
/**
* Set include.
*
- * @param include Comma-separated list of related resources to include alongside each policy in
+ * @param include Comma-separated list of related resources to include alongside each rule in
* the response. Currently the only supported value is score. (optional)
- * @return ListTagPoliciesOptionalParameters
+ * @return ListTagRulesOptionalParameters
*/
- public ListTagPoliciesOptionalParameters include(TagPolicyInclude include) {
+ public ListTagRulesOptionalParameters include(TagRuleInclude include) {
this.include = include;
return this;
}
@@ -952,11 +949,11 @@ public ListTagPoliciesOptionalParameters include(TagPolicyInclude include) {
/**
* Set filterSource.
*
- * @param filterSource Restrict the result set to policies whose source matches the given value.
+ * @param filterSource Restrict the result set to rules whose source matches the given value.
* (optional)
- * @return ListTagPoliciesOptionalParameters
+ * @return ListTagRulesOptionalParameters
*/
- public ListTagPoliciesOptionalParameters filterSource(TagPolicySource filterSource) {
+ public ListTagRulesOptionalParameters filterSource(TagRuleSource filterSource) {
this.filterSource = filterSource;
return this;
}
@@ -967,9 +964,9 @@ public ListTagPoliciesOptionalParameters filterSource(TagPolicySource filterSour
* @param tsStart Start of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. Defaults to a recent window appropriate for the source.
* (optional)
- * @return ListTagPoliciesOptionalParameters
+ * @return ListTagRulesOptionalParameters
*/
- public ListTagPoliciesOptionalParameters tsStart(Long tsStart) {
+ public ListTagRulesOptionalParameters tsStart(Long tsStart) {
this.tsStart = tsStart;
return this;
}
@@ -980,35 +977,35 @@ public ListTagPoliciesOptionalParameters tsStart(Long tsStart) {
* @param tsEnd End of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. Must be in the past and greater than ts_start.
* (optional)
- * @return ListTagPoliciesOptionalParameters
+ * @return ListTagRulesOptionalParameters
*/
- public ListTagPoliciesOptionalParameters tsEnd(Long tsEnd) {
+ public ListTagRulesOptionalParameters tsEnd(Long tsEnd) {
this.tsEnd = tsEnd;
return this;
}
}
/**
- * List tag policies.
+ * List tag rules.
*
- * include=score query parameter.
+ * 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 the
+ * include=score query parameter.
*
* @param parameters Optional parameters for the request.
- * @return ApiResponse<TagPoliciesListResponse>
+ * @return ApiResponse<TagRulesListResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -1065,10 +1062,10 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests -
- * source cannot be changed after creation.
+ * 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's source
+ * cannot be changed after creation.
*
- * @param policyId The unique identifier of the tag policy to update. (required)
+ * @param ruleId The unique identifier of the tag rule to update. (required)
* @param body (required)
- * @return ApiResponse<TagPolicyResponse>
+ * @return ApiResponse<TagRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
*
@@ -1235,10 +1232,10 @@ public CompletableFuture
*/
- public ApiResponse
* 429 Too many requests - null if the policy
- * has not been deleted. Only present when include_deleted=true is requested.
+ * The RFC 3339 timestamp at which the rule was soft-deleted. null if the rule has
+ * not been deleted. Only present when include_deleted=true is requested.
*
* @return deletedAt
*/
@@ -201,13 +201,13 @@ public void setDeletedAt(OffsetDateTime deletedAt) {
this.deletedAt = JsonNullable.null if the policy has not
+ * The identifier of the user who soft-deleted the rule. null if the rule has not
* been deleted.
*
* @return deletedBy
@@ -233,13 +233,13 @@ public void setDeletedBy(String deletedBy) {
this.deletedBy = JsonNullable.true, the policy matches tag values that do NOT match any of the supplied
- * patterns.
+ * Human-readable name for the tag rule.
*
- * @return negated
+ * @return name
*/
- @JsonProperty(JSON_PROPERTY_NEGATED)
+ @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public Boolean getNegated() {
- return negated;
+ public String getName() {
+ return name;
}
- public void setNegated(Boolean negated) {
- this.negated = negated;
+ public void setName(String name) {
+ this.name = name;
}
- public TagPolicyAttributes policyName(String policyName) {
- this.policyName = policyName;
+ public TagRuleAttributes negated(Boolean negated) {
+ this.negated = negated;
return this;
}
/**
- * Human-readable name for the tag policy.
+ * When true, the rule matches tag values that do NOT match any of the supplied
+ * patterns.
*
- * @return policyName
+ * @return negated
*/
- @JsonProperty(JSON_PROPERTY_POLICY_NAME)
+ @JsonProperty(JSON_PROPERTY_NEGATED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getPolicyName() {
- return policyName;
+ public Boolean getNegated() {
+ return negated;
}
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
+ public void setNegated(Boolean negated) {
+ this.negated = negated;
}
- public TagPolicyAttributes policyType(TagPolicyType policyType) {
- this.policyType = policyType;
- this.unparsed |= !policyType.isValid();
+ public TagRuleAttributes required(Boolean required) {
+ this.required = required;
return this;
}
/**
- * How the policy is enforced. blocking rejects telemetry that violates the policy.
- * surfacing only highlights non-compliant telemetry without blocking it.
+ * When true, telemetry without this tag is treated as a violation.
*
- * @return policyType
+ * @return required
*/
- @JsonProperty(JSON_PROPERTY_POLICY_TYPE)
+ @JsonProperty(JSON_PROPERTY_REQUIRED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public TagPolicyType getPolicyType() {
- return policyType;
+ public Boolean getRequired() {
+ return required;
}
- public void setPolicyType(TagPolicyType policyType) {
- if (!policyType.isValid()) {
- this.unparsed = true;
- }
- this.policyType = policyType;
+ public void setRequired(Boolean required) {
+ this.required = required;
}
- public TagPolicyAttributes required(Boolean required) {
- this.required = required;
+ public TagRuleAttributes ruleType(TagRuleType ruleType) {
+ this.ruleType = ruleType;
+ this.unparsed |= !ruleType.isValid();
return this;
}
/**
- * When true, telemetry without this tag is treated as a violation.
+ * How the rule is enforced. blocking rejects telemetry that violates the rule.
+ * surfacing only highlights non-compliant telemetry without blocking it.
*
- * @return required
+ * @return ruleType
*/
- @JsonProperty(JSON_PROPERTY_REQUIRED)
+ @JsonProperty(JSON_PROPERTY_RULE_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public Boolean getRequired() {
- return required;
+ public TagRuleType getRuleType() {
+ return ruleType;
}
- public void setRequired(Boolean required) {
- this.required = required;
+ public void setRuleType(TagRuleType ruleType) {
+ if (!ruleType.isValid()) {
+ this.unparsed = true;
+ }
+ this.ruleType = ruleType;
}
- public TagPolicyAttributes scope(String scope) {
+ public TagRuleAttributes scope(String scope) {
this.scope = scope;
return this;
}
/**
- * The scope the policy applies within.
+ * The scope the rule applies within.
*
* @return scope
*/
@@ -399,37 +399,37 @@ public void setScope(String scope) {
this.scope = scope;
}
- public TagPolicyAttributes source(TagPolicySource source) {
+ public TagRuleAttributes source(TagRuleSource source) {
this.source = source;
this.unparsed |= !source.isValid();
return this;
}
/**
- * The telemetry source that a tag policy applies to.
+ * The telemetry source that a tag rule applies to.
*
* @return source
*/
@JsonProperty(JSON_PROPERTY_SOURCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public TagPolicySource getSource() {
+ public TagRuleSource getSource() {
return source;
}
- public void setSource(TagPolicySource source) {
+ public void setSource(TagRuleSource source) {
if (!source.isValid()) {
this.unparsed = true;
}
this.source = source;
}
- public TagPolicyAttributes tagKey(String tagKey) {
+ public TagRuleAttributes tagKey(String tagKey) {
this.tagKey = tagKey;
return this;
}
/**
- * The tag key that the policy governs.
+ * The tag key that the rule governs.
*
* @return tagKey
*/
@@ -443,12 +443,12 @@ public void setTagKey(String tagKey) {
this.tagKey = tagKey;
}
- public TagPolicyAttributes tagValuePatterns(Listtrue for newly created
- * policies.
+ * Whether the rule is currently enforced. Defaults to true for newly created rules.
*
* @return enabled
*/
@@ -106,13 +104,33 @@ public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
- public TagPolicyCreateAttributes negated(Boolean negated) {
+ public TagRuleCreateAttributes name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Human-readable name for the tag rule.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public TagRuleCreateAttributes negated(Boolean negated) {
this.negated = negated;
return this;
}
/**
- * When true, the policy matches tag values that do NOT match any of the supplied
+ * When true, the rule matches tag values that do NOT match any of the supplied
* patterns. Defaults to false.
*
* @return negated
@@ -128,81 +146,61 @@ public void setNegated(Boolean negated) {
this.negated = negated;
}
- public TagPolicyCreateAttributes policyName(String policyName) {
- this.policyName = policyName;
+ public TagRuleCreateAttributes required(Boolean required) {
+ this.required = required;
return this;
}
/**
- * Human-readable name for the tag policy.
+ * When true, telemetry without this tag is treated as a violation. Defaults to
+ * false.
*
- * @return policyName
+ * @return required
*/
- @JsonProperty(JSON_PROPERTY_POLICY_NAME)
- @JsonInclude(value = JsonInclude.Include.ALWAYS)
- public String getPolicyName() {
- return policyName;
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REQUIRED)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getRequired() {
+ return required;
}
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
+ public void setRequired(Boolean required) {
+ this.required = required;
}
- public TagPolicyCreateAttributes policyType(TagPolicyCreateType policyType) {
- this.policyType = policyType;
- this.unparsed |= !policyType.isValid();
+ public TagRuleCreateAttributes ruleType(TagRuleCreateType ruleType) {
+ this.ruleType = ruleType;
+ this.unparsed |= !ruleType.isValid();
return this;
}
/**
- * The policy type allowed when creating a tag policy. Only surfacing is accepted at
+ * The rule type allowed when creating a tag rule. Only surfacing is accepted at
* creation time.
*
- * @return policyType
+ * @return ruleType
*/
- @JsonProperty(JSON_PROPERTY_POLICY_TYPE)
+ @JsonProperty(JSON_PROPERTY_RULE_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public TagPolicyCreateType getPolicyType() {
- return policyType;
+ public TagRuleCreateType getRuleType() {
+ return ruleType;
}
- public void setPolicyType(TagPolicyCreateType policyType) {
- if (!policyType.isValid()) {
+ public void setRuleType(TagRuleCreateType ruleType) {
+ if (!ruleType.isValid()) {
this.unparsed = true;
}
- this.policyType = policyType;
- }
-
- public TagPolicyCreateAttributes required(Boolean required) {
- this.required = required;
- return this;
- }
-
- /**
- * When true, telemetry without this tag is treated as a violation. Defaults to
- * false.
- *
- * @return required
- */
- @jakarta.annotation.Nullable
- @JsonProperty(JSON_PROPERTY_REQUIRED)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public Boolean getRequired() {
- return required;
- }
-
- public void setRequired(Boolean required) {
- this.required = required;
+ this.ruleType = ruleType;
}
- public TagPolicyCreateAttributes scope(String scope) {
+ public TagRuleCreateAttributes scope(String scope) {
this.scope = scope;
return this;
}
/**
- * The scope the policy applies within. Typically an environment, team, or organization-level
- * identifier used to limit where the policy is enforced.
+ * The scope the rule applies within. Typically an environment, team, or organization-level
+ * identifier used to limit where the rule is enforced.
*
* @return scope
*/
@@ -216,37 +214,37 @@ public void setScope(String scope) {
this.scope = scope;
}
- public TagPolicyCreateAttributes source(TagPolicySource source) {
+ public TagRuleCreateAttributes source(TagRuleSource source) {
this.source = source;
this.unparsed |= !source.isValid();
return this;
}
/**
- * The telemetry source that a tag policy applies to.
+ * The telemetry source that a tag rule applies to.
*
* @return source
*/
@JsonProperty(JSON_PROPERTY_SOURCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public TagPolicySource getSource() {
+ public TagRuleSource getSource() {
return source;
}
- public void setSource(TagPolicySource source) {
+ public void setSource(TagRuleSource source) {
if (!source.isValid()) {
this.unparsed = true;
}
this.source = source;
}
- public TagPolicyCreateAttributes tagKey(String tagKey) {
+ public TagRuleCreateAttributes tagKey(String tagKey) {
this.tagKey = tagKey;
return this;
}
/**
- * The tag key that the policy governs (for example, service).
+ * The tag key that the rule governs (for example, service).
*
* @return tagKey
*/
@@ -260,12 +258,12 @@ public void setTagKey(String tagKey) {
this.tagKey = tagKey;
}
- public TagPolicyCreateAttributes tagValuePatterns(Listsurfacing is accepted at
+ * creation time.
+ */
+@JsonSerialize(using = TagRuleCreateType.TagRuleCreateTypeSerializer.class)
+public class TagRuleCreateType extends ModelEnuminclude
+ * Related resources for a tag rule. Only present when the corresponding include
* query parameter is supplied.
*
* @return relationships
@@ -114,35 +113,35 @@ public TagPolicyData relationships(TagPolicyRelationships relationships) {
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public TagPolicyRelationships getRelationships() {
+ public TagRuleRelationships getRelationships() {
return relationships;
}
- public void setRelationships(TagPolicyRelationships relationships) {
+ public void setRelationships(TagRuleRelationships relationships) {
this.relationships = relationships;
if (relationships != null) {
this.unparsed |= relationships.unparsed;
}
}
- public TagPolicyData type(TagPolicyResourceType type) {
+ public TagRuleData type(TagRuleResourceType type) {
this.type = type;
this.unparsed |= !type.isValid();
return this;
}
/**
- * JSON:API resource type for a tag policy.
+ * JSON:API resource type for a tag rule.
*
* @return type
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
- public TagPolicyResourceType getType() {
+ public TagRuleResourceType getType() {
return type;
}
- public void setType(TagPolicyResourceType type) {
+ public void setType(TagRuleResourceType type) {
if (!type.isValid()) {
this.unparsed = true;
}
@@ -161,10 +160,10 @@ public void setType(TagPolicyResourceType type) {
*
* @param key The arbitrary key to set
* @param value The associated value
- * @return TagPolicyData
+ * @return TagRuleData
*/
@JsonAnySetter
- public TagPolicyData putAdditionalProperty(String key, Object value) {
+ public TagRuleData putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMapscore.
+ * A related resource to include alongside a tag rule in the response. Currently the only supported
+ * value is score.
*/
-@JsonSerialize(using = TagPolicyInclude.TagPolicyIncludeSerializer.class)
-public class TagPolicyInclude extends ModelEnuminclude
- * query parameter is supplied.
+ * Related resources for a tag rule. Only present when the corresponding include query
+ * parameter is supplied.
*/
-@JsonPropertyOrder({TagPolicyRelationships.JSON_PROPERTY_SCORE})
+@JsonPropertyOrder({TagRuleRelationships.JSON_PROPERTY_SCORE})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
-public class TagPolicyRelationships {
+public class TagRuleRelationships {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_SCORE = "score";
- private TagPolicyScoreRelationship score;
+ private TagRuleScoreRelationship score;
- public TagPolicyRelationships score(TagPolicyScoreRelationship score) {
+ public TagRuleRelationships score(TagRuleScoreRelationship score) {
this.score = score;
this.unparsed |= score.unparsed;
return this;
}
/**
- * A relationship to the compliance score resource for this policy.
+ * A relationship to the compliance score resource for this rule.
*
* @return score
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SCORE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public TagPolicyScoreRelationship getScore() {
+ public TagRuleScoreRelationship getScore() {
return score;
}
- public void setScore(TagPolicyScoreRelationship score) {
+ public void setScore(TagRuleScoreRelationship score) {
this.score = score;
if (score != null) {
this.unparsed |= score.unparsed;
@@ -65,10 +65,10 @@ public void setScore(TagPolicyScoreRelationship score) {
*
* @param key The arbitrary key to set
* @param value The associated value
- * @return TagPolicyRelationships
+ * @return TagRuleRelationships
*/
@JsonAnySetter
- public TagPolicyRelationships putAdditionalProperty(String key, Object value) {
+ public TagRuleRelationships putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMapsurfacing is accepted at
- * creation time.
- */
-@JsonSerialize(using = TagPolicyCreateType.TagPolicyCreateTypeSerializer.class)
-public class TagPolicyCreateType extends ModelEnum