diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 397d1a8cdca0..7d7dff65309f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -110560,72 +110560,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 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. + description: Human-readable name for the tag rule. example: "Service tag must be one of api or web" type: string policy_type: - $ref: "#/components/schemas/TagPolicyType" + $ref: "#/components/schemas/TagRuleType" required: description: When `true`, telemetry without this tag is treated as a violation. example: true type: boolean 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: @@ -110658,37 +110648,37 @@ components: - 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 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. + description: Human-readable name for the tag rule. example: "Service tag must be one of api or web" type: string policy_type: - $ref: "#/components/schemas/TagPolicyCreateType" + $ref: "#/components/schemas/TagRuleCreateType" required: description: When `true`, telemetry without this tag is treated as a violation. Defaults to `false`. example: true type: boolean 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: @@ -110711,28 +110701,28 @@ components: - tag_value_patterns - policy_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 @@ -110740,72 +110730,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" type: string x-enum-varnames: - TAG_POLICY - TagPolicyResponse: - description: A single tag policy. + 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 @@ -110822,7 +110812,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 @@ -110832,31 +110822,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: @@ -110864,46 +110854,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" type: string x-enum-varnames: - TAG_POLICY_SCORE - TagPolicyScoreResponse: - description: A tag policy compliance 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 @@ -110913,30 +110899,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 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. + description: Human-readable name for the tag rule. type: string policy_type: - $ref: "#/components/schemas/TagPolicyType" + $ref: "#/components/schemas/TagRuleType" required: description: When `true`, telemetry without this tag is treated as a violation. type: boolean 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. @@ -110945,26 +110931,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/TagPolicyUpdateData" + $ref: "#/components/schemas/TagRuleUpdateData" + required: + - data + type: object + TagRulesListResponse: + description: A page of tag rules. + properties: + data: + $ref: "#/components/schemas/TagRuleDataArray" + included: + $ref: "#/components/schemas/TagRuleIncludedResources" required: - data type: object @@ -206603,38 +206599,38 @@ paths: /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 + 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: ListTagPolicies + operationId: ListTagRules parameters: - - description: Whether to include policies that are currently disabled. Defaults to `false`. + - 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 policies that have been soft-deleted. Defaults to `false`. + - 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 policy in the response. Currently the only supported value is `score`. + - 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/TagPolicyInclude" - - description: Restrict the result set to policies whose source matches the given value. + $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/TagPolicySource" + $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 @@ -206692,7 +206688,7 @@ paths: id: "123-v1-1779315066097-1779401466097" type: "tag_policy_score" schema: - $ref: "#/components/schemas/TagPoliciesListResponse" + $ref: "#/components/schemas/TagRulesListResponse" description: OK "400": content: @@ -206717,9 +206713,9 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: List tag policies + summary: List tag rules tags: - - Tag Policies + - Tag Rules "x-permission": operator: OR permissions: @@ -206730,10 +206726,10 @@ paths: 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 + 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 `policy_id`, `version`, and the timestamp/audit fields are assigned by the server. - operationId: CreateTagPolicy + operationId: CreateTagRule requestBody: content: application/json: @@ -206755,7 +206751,7 @@ paths: - "web" type: "tag_policy" schema: - $ref: "#/components/schemas/TagPolicyCreateRequest" + $ref: "#/components/schemas/TagRuleCreateRequest" required: true responses: "201": @@ -206785,7 +206781,7 @@ paths: id: "123" type: "tag_policy" schema: - $ref: "#/components/schemas/TagPolicyResponse" + $ref: "#/components/schemas/TagRuleResponse" description: Created "400": content: @@ -206816,9 +206812,9 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Create a tag policy + summary: Create a tag rule tags: - - Tag Policies + - Tag Rules "x-permission": operator: AND permissions: @@ -206829,19 +206825,19 @@ paths: /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 + 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 policy permanently. - operationId: DeleteTagPolicy + the rule permanently. + operationId: DeleteTagRule parameters: - - description: The unique identifier of the tag policy to delete. + - description: The unique identifier of the tag rule 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`. + - description: Whether to permanently delete the rule instead of performing a soft delete. Defaults to `false`. example: false in: query name: hard_delete @@ -206880,9 +206876,9 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Delete a tag policy + summary: Delete a tag rule tags: - - Tag Policies + - Tag Rules "x-permission": operator: AND permissions: @@ -206892,25 +206888,25 @@ paths: 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 + 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: GetTagPolicy + operationId: GetTagRule parameters: - - description: The unique identifier of the tag policy. + - description: The unique identifier of the tag rule. 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`. + - 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/TagPolicyInclude" + $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 @@ -206968,7 +206964,7 @@ paths: id: "123-v1-1779315066097-1779401466097" type: "tag_policy_score" schema: - $ref: "#/components/schemas/TagPolicyResponse" + $ref: "#/components/schemas/TagRuleResponse" description: OK "400": content: @@ -206999,9 +206995,9 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a tag policy + summary: Get a tag rule tags: - - Tag Policies + - Tag Rules "x-permission": operator: OR permissions: @@ -207012,12 +207008,12 @@ paths: 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 + 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: UpdateTagPolicy + operationId: UpdateTagRule parameters: - - description: The unique identifier of the tag policy to update. + - description: The unique identifier of the tag rule to update. example: "123" in: path name: policy_id @@ -207037,7 +207033,7 @@ paths: id: "123" type: "tag_policy" schema: - $ref: "#/components/schemas/TagPolicyUpdateRequest" + $ref: "#/components/schemas/TagRuleUpdateRequest" required: true responses: "200": @@ -207067,7 +207063,7 @@ paths: id: "123" type: "tag_policy" schema: - $ref: "#/components/schemas/TagPolicyResponse" + $ref: "#/components/schemas/TagRuleResponse" description: OK "400": content: @@ -207098,9 +207094,9 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Update a tag policy + summary: Update a tag rule tags: - - Tag Policies + - Tag Rules "x-permission": operator: AND permissions: @@ -207111,13 +207107,13 @@ paths: /api/v2/tag_policies/{policy_id}/score: get: description: |- - Retrieve the compliance score for a single tag policy. The score is computed over the + 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 policy. A `null` score indicates that + telemetry within that window that conforms to the rule. A `null` score indicates that no relevant telemetry was found. - operationId: GetTagPolicyScore + operationId: GetTagRuleScore parameters: - - description: The unique identifier of the tag policy. + - description: The unique identifier of the tag rule. example: "123" in: path name: policy_id @@ -207156,7 +207152,7 @@ paths: id: "123-v1-1779315066097-1779401466097" type: "tag_policy_score" schema: - $ref: "#/components/schemas/TagPolicyScoreResponse" + $ref: "#/components/schemas/TagRuleScoreResponse" description: OK "400": content: @@ -207187,9 +207183,9 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a tag policy compliance score + summary: Get a tag rule compliance score tags: - - Tag Policies + - Tag Rules "x-permission": operator: OR permissions: @@ -213664,12 +213660,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.rb b/examples/v2/tag-policies/CreateTagPolicy.rb deleted file mode 100644 index 887f9e411594..000000000000 --- a/examples/v2/tag-policies/CreateTagPolicy.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Create a tag policy returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_tag_policy".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TagPoliciesAPI.new - -body = DatadogAPIClient::V2::TagPolicyCreateRequest.new({ - data: DatadogAPIClient::V2::TagPolicyCreateData.new({ - attributes: DatadogAPIClient::V2::TagPolicyCreateAttributes.new({ - enabled: true, - negated: false, - policy_name: "Service tag must be one of api or web", - policy_type: DatadogAPIClient::V2::TagPolicyCreateType::SURFACING, - required: true, - scope: "env", - source: DatadogAPIClient::V2::TagPolicySource::LOGS, - tag_key: "service", - tag_value_patterns: [ - "api", - "web", - ], - }), - type: DatadogAPIClient::V2::TagPolicyResourceType::TAG_POLICY, - }), -}) -p api_instance.create_tag_policy(body) diff --git a/examples/v2/tag-policies/DeleteTagPolicy.rb b/examples/v2/tag-policies/DeleteTagPolicy.rb deleted file mode 100644 index 2d2754052515..000000000000 --- a/examples/v2/tag-policies/DeleteTagPolicy.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a tag policy returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_tag_policy".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TagPoliciesAPI.new -api_instance.delete_tag_policy("policy_id") diff --git a/examples/v2/tag-policies/GetTagPolicy.rb b/examples/v2/tag-policies/GetTagPolicy.rb deleted file mode 100644 index 1fc5dcbfd922..000000000000 --- a/examples/v2/tag-policies/GetTagPolicy.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a tag policy returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_tag_policy".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TagPoliciesAPI.new -p api_instance.get_tag_policy("policy_id") diff --git a/examples/v2/tag-policies/GetTagPolicyScore.rb b/examples/v2/tag-policies/GetTagPolicyScore.rb deleted file mode 100644 index aa2f99d0d7cf..000000000000 --- a/examples/v2/tag-policies/GetTagPolicyScore.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a tag policy compliance score returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_tag_policy_score".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TagPoliciesAPI.new -p api_instance.get_tag_policy_score("policy_id") diff --git a/examples/v2/tag-policies/ListTagPolicies.rb b/examples/v2/tag-policies/ListTagPolicies.rb deleted file mode 100644 index 04aa25b02572..000000000000 --- a/examples/v2/tag-policies/ListTagPolicies.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List tag policies returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_tag_policies".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TagPoliciesAPI.new -p api_instance.list_tag_policies() diff --git a/examples/v2/tag-policies/UpdateTagPolicy.rb b/examples/v2/tag-policies/UpdateTagPolicy.rb deleted file mode 100644 index 4cfaad12eced..000000000000 --- a/examples/v2/tag-policies/UpdateTagPolicy.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Update a tag policy returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_tag_policy".to_sym] = true -end -api_instance = DatadogAPIClient::V2::TagPoliciesAPI.new - -body = DatadogAPIClient::V2::TagPolicyUpdateRequest.new({ - data: DatadogAPIClient::V2::TagPolicyUpdateData.new({ - attributes: DatadogAPIClient::V2::TagPolicyUpdateAttributes.new({ - policy_type: DatadogAPIClient::V2::TagPolicyType::SURFACING, - tag_value_patterns: [], - }), - id: "123", - type: DatadogAPIClient::V2::TagPolicyResourceType::TAG_POLICY, - }), -}) -p api_instance.update_tag_policy("policy_id", body) diff --git a/examples/v2/tag-rules/CreateTagRule.rb b/examples/v2/tag-rules/CreateTagRule.rb new file mode 100644 index 000000000000..95496f13c069 --- /dev/null +++ b/examples/v2/tag-rules/CreateTagRule.rb @@ -0,0 +1,28 @@ +# Create a tag rule returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_tag_rule".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TagRulesAPI.new + +body = DatadogAPIClient::V2::TagRuleCreateRequest.new({ + data: DatadogAPIClient::V2::TagRuleCreateData.new({ + attributes: DatadogAPIClient::V2::TagRuleCreateAttributes.new({ + enabled: true, + negated: false, + policy_name: "Service tag must be one of api or web", + policy_type: DatadogAPIClient::V2::TagRuleCreateType::SURFACING, + required: true, + scope: "env", + source: DatadogAPIClient::V2::TagRuleSource::LOGS, + tag_key: "service", + tag_value_patterns: [ + "api", + "web", + ], + }), + type: DatadogAPIClient::V2::TagRuleResourceType::TAG_POLICY, + }), +}) +p api_instance.create_tag_rule(body) diff --git a/examples/v2/tag-rules/DeleteTagRule.rb b/examples/v2/tag-rules/DeleteTagRule.rb new file mode 100644 index 000000000000..716409ccaae7 --- /dev/null +++ b/examples/v2/tag-rules/DeleteTagRule.rb @@ -0,0 +1,8 @@ +# Delete a tag rule returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_tag_rule".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TagRulesAPI.new +api_instance.delete_tag_rule("policy_id") diff --git a/examples/v2/tag-rules/GetTagRule.rb b/examples/v2/tag-rules/GetTagRule.rb new file mode 100644 index 000000000000..df78a23c94b4 --- /dev/null +++ b/examples/v2/tag-rules/GetTagRule.rb @@ -0,0 +1,8 @@ +# Get a tag rule returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_tag_rule".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TagRulesAPI.new +p api_instance.get_tag_rule("policy_id") diff --git a/examples/v2/tag-rules/GetTagRuleScore.rb b/examples/v2/tag-rules/GetTagRuleScore.rb new file mode 100644 index 000000000000..6f42a6f25eb7 --- /dev/null +++ b/examples/v2/tag-rules/GetTagRuleScore.rb @@ -0,0 +1,8 @@ +# Get a tag rule compliance score returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_tag_rule_score".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TagRulesAPI.new +p api_instance.get_tag_rule_score("policy_id") diff --git a/examples/v2/tag-rules/ListTagRules.rb b/examples/v2/tag-rules/ListTagRules.rb new file mode 100644 index 000000000000..1ed05408246a --- /dev/null +++ b/examples/v2/tag-rules/ListTagRules.rb @@ -0,0 +1,8 @@ +# List tag rules returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_tag_rules".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TagRulesAPI.new +p api_instance.list_tag_rules() diff --git a/examples/v2/tag-rules/UpdateTagRule.rb b/examples/v2/tag-rules/UpdateTagRule.rb new file mode 100644 index 000000000000..d830a8390305 --- /dev/null +++ b/examples/v2/tag-rules/UpdateTagRule.rb @@ -0,0 +1,19 @@ +# Update a tag rule returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_tag_rule".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TagRulesAPI.new + +body = DatadogAPIClient::V2::TagRuleUpdateRequest.new({ + data: DatadogAPIClient::V2::TagRuleUpdateData.new({ + attributes: DatadogAPIClient::V2::TagRuleUpdateAttributes.new({ + policy_type: DatadogAPIClient::V2::TagRuleType::SURFACING, + tag_value_patterns: [], + }), + id: "123", + type: DatadogAPIClient::V2::TagRuleResourceType::TAG_POLICY, + }), +}) +p api_instance.update_tag_rule("policy_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 18b721d24b12..8ce9a012d4e7 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -6218,32 +6218,32 @@ "variable_id" => "String", "body" => "GlobalVariableJsonPatchRequest", }, - "v2.ListTagPolicies" => { + "v2.ListTagRules" => { "include_disabled" => "Boolean", "include_deleted" => "Boolean", - "include" => "TagPolicyInclude", - "filter_source" => "TagPolicySource", + "include" => "TagRuleInclude", + "filter_source" => "TagRuleSource", "ts_start" => "Integer", "ts_end" => "Integer", }, - "v2.CreateTagPolicy" => { - "body" => "TagPolicyCreateRequest", + "v2.CreateTagRule" => { + "body" => "TagRuleCreateRequest", }, - "v2.DeleteTagPolicy" => { + "v2.DeleteTagRule" => { "policy_id" => "String", "hard_delete" => "Boolean", }, - "v2.GetTagPolicy" => { + "v2.GetTagRule" => { "policy_id" => "String", - "include" => "TagPolicyInclude", + "include" => "TagRuleInclude", "ts_start" => "Integer", "ts_end" => "Integer", }, - "v2.UpdateTagPolicy" => { + "v2.UpdateTagRule" => { "policy_id" => "String", - "body" => "TagPolicyUpdateRequest", + "body" => "TagRuleUpdateRequest", }, - "v2.GetTagPolicyScore" => { + "v2.GetTagRuleScore" => { "policy_id" => "String", "ts_start" => "Integer", "ts_end" => "Integer", diff --git a/features/v2/tag_policies.feature b/features/v2/tag_rules.feature similarity index 60% rename from features/v2/tag_policies.feature rename to features/v2/tag_rules.feature index b5d064c202e7..a78d0357e315 100644 --- a/features/v2/tag_policies.feature +++ b/features/v2/tag_rules.feature @@ -1,149 +1,149 @@ -@endpoint(tag-policies) @endpoint(tag-policies-v2) -Feature: Tag Policies - Tag Policies define rules that govern which tag values are accepted for a +@endpoint(tag-rules) @endpoint(tag-rules-v2) +Feature: Tag Rules + 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). 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. + 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. Background: Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system - And an instance of "TagPolicies" API + And an instance of "TagRules" API @generated @skip @team:DataDog/aaa-governance-console - Scenario: Create a tag policy returns "Bad Request" response - Given operation "CreateTagPolicy" enabled - And new "CreateTagPolicy" request + Scenario: Create a tag rule returns "Bad Request" response + Given operation "CreateTagRule" enabled + And new "CreateTagRule" request And body with 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"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-governance-console - Scenario: Create a tag policy returns "Conflict" response - Given operation "CreateTagPolicy" enabled - And new "CreateTagPolicy" request + Scenario: Create a tag rule returns "Conflict" response + Given operation "CreateTagRule" enabled + And new "CreateTagRule" request And body with 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"}} When the request is sent Then the response status is 409 Conflict @generated @skip @team:DataDog/aaa-governance-console - Scenario: Create a tag policy returns "Created" response - Given operation "CreateTagPolicy" enabled - And new "CreateTagPolicy" request + Scenario: Create a tag rule returns "Created" response + Given operation "CreateTagRule" enabled + And new "CreateTagRule" request And body with 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"}} When the request is sent Then the response status is 201 Created @generated @skip @team:DataDog/aaa-governance-console - Scenario: Delete a tag policy returns "Bad Request" response - Given operation "DeleteTagPolicy" enabled - And new "DeleteTagPolicy" request + Scenario: Delete a tag rule returns "Bad Request" response + Given operation "DeleteTagRule" enabled + And new "DeleteTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-governance-console - Scenario: Delete a tag policy returns "No Content" response - Given operation "DeleteTagPolicy" enabled - And new "DeleteTagPolicy" request + Scenario: Delete a tag rule returns "No Content" response + Given operation "DeleteTagRule" enabled + And new "DeleteTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/aaa-governance-console - Scenario: Delete a tag policy returns "Not Found" response - Given operation "DeleteTagPolicy" enabled - And new "DeleteTagPolicy" request + Scenario: Delete a tag rule returns "Not Found" response + Given operation "DeleteTagRule" enabled + And new "DeleteTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/aaa-governance-console - Scenario: Get a tag policy compliance score returns "Bad Request" response - Given operation "GetTagPolicyScore" enabled - And new "GetTagPolicyScore" request + Scenario: Get a tag rule compliance score returns "Bad Request" response + Given operation "GetTagRuleScore" enabled + And new "GetTagRuleScore" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-governance-console - Scenario: Get a tag policy compliance score returns "Not Found" response - Given operation "GetTagPolicyScore" enabled - And new "GetTagPolicyScore" request + Scenario: Get a tag rule compliance score returns "Not Found" response + Given operation "GetTagRuleScore" enabled + And new "GetTagRuleScore" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/aaa-governance-console - Scenario: Get a tag policy compliance score returns "OK" response - Given operation "GetTagPolicyScore" enabled - And new "GetTagPolicyScore" request + Scenario: Get a tag rule compliance score returns "OK" response + Given operation "GetTagRuleScore" enabled + And new "GetTagRuleScore" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/aaa-governance-console - Scenario: Get a tag policy returns "Bad Request" response - Given operation "GetTagPolicy" enabled - And new "GetTagPolicy" request + Scenario: Get a tag rule returns "Bad Request" response + Given operation "GetTagRule" enabled + And new "GetTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-governance-console - Scenario: Get a tag policy returns "Not Found" response - Given operation "GetTagPolicy" enabled - And new "GetTagPolicy" request + Scenario: Get a tag rule returns "Not Found" response + Given operation "GetTagRule" enabled + And new "GetTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/aaa-governance-console - Scenario: Get a tag policy returns "OK" response - Given operation "GetTagPolicy" enabled - And new "GetTagPolicy" request + Scenario: Get a tag rule returns "OK" response + Given operation "GetTagRule" enabled + And new "GetTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/aaa-governance-console - Scenario: List tag policies returns "Bad Request" response - Given operation "ListTagPolicies" enabled - And new "ListTagPolicies" request + Scenario: List tag rules returns "Bad Request" response + Given operation "ListTagRules" enabled + And new "ListTagRules" request When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-governance-console - Scenario: List tag policies returns "OK" response - Given operation "ListTagPolicies" enabled - And new "ListTagPolicies" request + Scenario: List tag rules returns "OK" response + Given operation "ListTagRules" enabled + And new "ListTagRules" request When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/aaa-governance-console - Scenario: Update a tag policy returns "Bad Request" response - Given operation "UpdateTagPolicy" enabled - And new "UpdateTagPolicy" request + Scenario: Update a tag rule returns "Bad Request" response + Given operation "UpdateTagRule" enabled + And new "UpdateTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"policy_type": "surfacing", "tag_value_patterns": []}, "id": "123", "type": "tag_policy"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/aaa-governance-console - Scenario: Update a tag policy returns "Not Found" response - Given operation "UpdateTagPolicy" enabled - And new "UpdateTagPolicy" request + Scenario: Update a tag rule returns "Not Found" response + Given operation "UpdateTagRule" enabled + And new "UpdateTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"policy_type": "surfacing", "tag_value_patterns": []}, "id": "123", "type": "tag_policy"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/aaa-governance-console - Scenario: Update a tag policy returns "OK" response - Given operation "UpdateTagPolicy" enabled - And new "UpdateTagPolicy" request + Scenario: Update a tag rule returns "OK" response + Given operation "UpdateTagRule" enabled + And new "UpdateTagRule" request And request contains "policy_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"policy_type": "surfacing", "tag_value_patterns": []}, "id": "123", "type": "tag_policy"}} When the request is sent diff --git a/features/v2/undo.json b/features/v2/undo.json index 9903d959ffb8..3afad07d1d31 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -9448,16 +9448,16 @@ "type": "safe" } }, - "ListTagPolicies": { - "tag": "Tag Policies", + "ListTagRules": { + "tag": "Tag Rules", "undo": { "type": "safe" } }, - "CreateTagPolicy": { - "tag": "Tag Policies", + "CreateTagRule": { + "tag": "Tag Rules", "undo": { - "operationId": "DeleteTagPolicy", + "operationId": "DeleteTagRule", "parameters": [ { "name": "policy_id", @@ -9467,26 +9467,26 @@ "type": "unsafe" } }, - "DeleteTagPolicy": { - "tag": "Tag Policies", + "DeleteTagRule": { + "tag": "Tag Rules", "undo": { "type": "idempotent" } }, - "GetTagPolicy": { - "tag": "Tag Policies", + "GetTagRule": { + "tag": "Tag Rules", "undo": { "type": "safe" } }, - "UpdateTagPolicy": { - "tag": "Tag Policies", + "UpdateTagRule": { + "tag": "Tag Rules", "undo": { "type": "idempotent" } }, - "GetTagPolicyScore": { - "tag": "Tag Policies", + "GetTagRuleScore": { + "tag": "Tag Rules", "undo": { "type": "safe" } diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index f1a2c808bb39..b8bc3ab7e2f0 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -729,12 +729,12 @@ def initialize "v2.revert_custom_rule_revision": false, "v2.update_ai_custom_ruleset": false, "v2.update_custom_ruleset": false, - "v2.create_tag_policy": false, - "v2.delete_tag_policy": false, - "v2.get_tag_policy": false, - "v2.get_tag_policy_score": false, - "v2.list_tag_policies": false, - "v2.update_tag_policy": false, + "v2.create_tag_rule": false, + "v2.delete_tag_rule": false, + "v2.get_tag_rule": false, + "v2.get_tag_rule_score": false, + "v2.list_tag_rules": false, + "v2.update_tag_rule": false, "v2.add_member_team": false, "v2.list_member_teams": false, "v2.remove_member_team": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 88723a44e31c..88603b3c4531 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -7876,28 +7876,28 @@ def overrides "v2.tag_indexing_rule_update_attributes" => "TagIndexingRuleUpdateAttributes", "v2.tag_indexing_rule_update_data" => "TagIndexingRuleUpdateData", "v2.tag_indexing_rule_update_request" => "TagIndexingRuleUpdateRequest", - "v2.tag_policies_list_response" => "TagPoliciesListResponse", - "v2.tag_policy_attributes" => "TagPolicyAttributes", - "v2.tag_policy_create_attributes" => "TagPolicyCreateAttributes", - "v2.tag_policy_create_data" => "TagPolicyCreateData", - "v2.tag_policy_create_request" => "TagPolicyCreateRequest", - "v2.tag_policy_create_type" => "TagPolicyCreateType", - "v2.tag_policy_data" => "TagPolicyData", - "v2.tag_policy_include" => "TagPolicyInclude", - "v2.tag_policy_relationships" => "TagPolicyRelationships", - "v2.tag_policy_resource_type" => "TagPolicyResourceType", - "v2.tag_policy_response" => "TagPolicyResponse", - "v2.tag_policy_score_attributes" => "TagPolicyScoreAttributes", - "v2.tag_policy_score_data" => "TagPolicyScoreData", - "v2.tag_policy_score_relationship" => "TagPolicyScoreRelationship", - "v2.tag_policy_score_relationship_data" => "TagPolicyScoreRelationshipData", - "v2.tag_policy_score_resource_type" => "TagPolicyScoreResourceType", - "v2.tag_policy_score_response" => "TagPolicyScoreResponse", - "v2.tag_policy_source" => "TagPolicySource", - "v2.tag_policy_type" => "TagPolicyType", - "v2.tag_policy_update_attributes" => "TagPolicyUpdateAttributes", - "v2.tag_policy_update_data" => "TagPolicyUpdateData", - "v2.tag_policy_update_request" => "TagPolicyUpdateRequest", + "v2.tag_rule_attributes" => "TagRuleAttributes", + "v2.tag_rule_create_attributes" => "TagRuleCreateAttributes", + "v2.tag_rule_create_data" => "TagRuleCreateData", + "v2.tag_rule_create_request" => "TagRuleCreateRequest", + "v2.tag_rule_create_type" => "TagRuleCreateType", + "v2.tag_rule_data" => "TagRuleData", + "v2.tag_rule_include" => "TagRuleInclude", + "v2.tag_rule_relationships" => "TagRuleRelationships", + "v2.tag_rule_resource_type" => "TagRuleResourceType", + "v2.tag_rule_response" => "TagRuleResponse", + "v2.tag_rule_score_attributes" => "TagRuleScoreAttributes", + "v2.tag_rule_score_data" => "TagRuleScoreData", + "v2.tag_rule_score_relationship" => "TagRuleScoreRelationship", + "v2.tag_rule_score_relationship_data" => "TagRuleScoreRelationshipData", + "v2.tag_rule_score_resource_type" => "TagRuleScoreResourceType", + "v2.tag_rule_score_response" => "TagRuleScoreResponse", + "v2.tag_rules_list_response" => "TagRulesListResponse", + "v2.tag_rule_source" => "TagRuleSource", + "v2.tag_rule_type" => "TagRuleType", + "v2.tag_rule_update_attributes" => "TagRuleUpdateAttributes", + "v2.tag_rule_update_data" => "TagRuleUpdateData", + "v2.tag_rule_update_request" => "TagRuleUpdateRequest", "v2.targeting_rule" => "TargetingRule", "v2.targeting_rule_request" => "TargetingRuleRequest", "v2.team" => "Team", @@ -8641,7 +8641,7 @@ def overrides "v2.stegadography_api" => "StegadographyAPI", "v2.storage_management_api" => "StorageManagementAPI", "v2.synthetics_api" => "SyntheticsAPI", - "v2.tag_policies_api" => "TagPoliciesAPI", + "v2.tag_rules_api" => "TagRulesAPI", "v2.teams_api" => "TeamsAPI", "v2.test_optimization_api" => "TestOptimizationAPI", "v2.usage_metering_api" => "UsageMeteringAPI", diff --git a/lib/datadog_api_client/v2/api/tag_policies_api.rb b/lib/datadog_api_client/v2/api/tag_rules_api.rb similarity index 67% rename from lib/datadog_api_client/v2/api/tag_policies_api.rb rename to lib/datadog_api_client/v2/api/tag_rules_api.rb index abf2f946bd42..95ecc80c772d 100644 --- a/lib/datadog_api_client/v2/api/tag_policies_api.rb +++ b/lib/datadog_api_client/v2/api/tag_rules_api.rb @@ -16,44 +16,44 @@ require 'cgi' module DatadogAPIClient::V2 - class TagPoliciesAPI + class TagRulesAPI attr_accessor :api_client def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Create a tag policy. + # Create a tag rule. # - # @see #create_tag_policy_with_http_info - def create_tag_policy(body, opts = {}) - data, _status_code, _headers = create_tag_policy_with_http_info(body, opts) + # @see #create_tag_rule_with_http_info + def create_tag_rule(body, opts = {}) + data, _status_code, _headers = create_tag_rule_with_http_info(body, opts) data end - # Create a tag policy. + # Create a tag rule. # - # Create a new tag policy for the organization. The caller's organization is derived from + # 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 # `policy_id`, `version`, and the timestamp/audit fields are assigned by the server. # - # @param body [TagPolicyCreateRequest] + # @param body [TagRuleCreateRequest] # @param opts [Hash] the optional parameters - # @return [Array<(TagPolicyResponse, Integer, Hash)>] TagPolicyResponse data, response status code and response headers - def create_tag_policy_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_tag_policy".to_sym] + # @return [Array<(TagRuleResponse, Integer, Hash)>] TagRuleResponse data, response status code and response headers + def create_tag_rule_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_tag_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_tag_policy") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_tag_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_tag_policy")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_tag_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TagPoliciesAPI.create_tag_policy ...' + @api_client.config.logger.debug 'Calling API: TagRulesAPI.create_tag_rule ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TagPoliciesAPI.create_tag_policy" + fail ArgumentError, "Missing the required parameter 'body' when calling TagRulesAPI.create_tag_rule" end # resource path local_var_path = '/api/v2/tag_policies' @@ -75,13 +75,13 @@ def create_tag_policy_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'TagPolicyResponse' + return_type = opts[:debug_return_type] || 'TagRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :create_tag_policy, + :operation => :create_tag_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -93,43 +93,43 @@ def create_tag_policy_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: TagPoliciesAPI#create_tag_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: TagRulesAPI#create_tag_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a tag policy. + # Delete a tag rule. # - # @see #delete_tag_policy_with_http_info - def delete_tag_policy(policy_id, opts = {}) - delete_tag_policy_with_http_info(policy_id, opts) + # @see #delete_tag_rule_with_http_info + def delete_tag_rule(policy_id, opts = {}) + delete_tag_rule_with_http_info(policy_id, opts) nil end - # Delete a tag policy. + # Delete a tag rule. # - # Delete a tag policy. By default the policy is soft-deleted so it can be recovered later + # 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 policy permanently. + # the rule permanently. # - # @param policy_id [String] The unique identifier of the tag policy to delete. + # @param policy_id [String] The unique identifier of the tag rule to delete. # @param opts [Hash] the optional parameters - # @option opts [Boolean] :hard_delete Whether to permanently delete the policy instead of performing a soft delete. Defaults to `false`. + # @option opts [Boolean] :hard_delete Whether to permanently delete the rule instead of performing a soft delete. Defaults to `false`. # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_tag_policy_with_http_info(policy_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_tag_policy".to_sym] + def delete_tag_rule_with_http_info(policy_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_tag_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_tag_policy") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_tag_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_tag_policy")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_tag_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TagPoliciesAPI.delete_tag_policy ...' + @api_client.config.logger.debug 'Calling API: TagRulesAPI.delete_tag_rule ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? - fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagPoliciesAPI.delete_tag_policy" + fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagRulesAPI.delete_tag_rule" end # resource path local_var_path = '/api/v2/tag_policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s).gsub('%2F', '/')) @@ -156,7 +156,7 @@ def delete_tag_policy_with_http_info(policy_id, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :delete_tag_policy, + :operation => :delete_tag_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -168,45 +168,45 @@ def delete_tag_policy_with_http_info(policy_id, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: TagPoliciesAPI#delete_tag_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: TagRulesAPI#delete_tag_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a tag policy. + # Get a tag rule. # - # @see #get_tag_policy_with_http_info - def get_tag_policy(policy_id, opts = {}) - data, _status_code, _headers = get_tag_policy_with_http_info(policy_id, opts) + # @see #get_tag_rule_with_http_info + def get_tag_rule(policy_id, opts = {}) + data, _status_code, _headers = get_tag_rule_with_http_info(policy_id, opts) data end - # Get a tag policy. + # Get a tag rule. # - # 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 + # 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 policy_id [String] The unique identifier of the tag policy. + # @param policy_id [String] The unique identifier of the tag rule. # @param opts [Hash] the optional parameters - # @option opts [TagPolicyInclude] :include Comma-separated list of related resources to include alongside the policy. Currently the only supported value is `score`. + # @option opts [TagRuleInclude] :include Comma-separated list of related resources to include alongside the rule. Currently the only supported value is `score`. # @option opts [Integer] :ts_start Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. # @option opts [Integer] :ts_end 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`. - # @return [Array<(TagPolicyResponse, Integer, Hash)>] TagPolicyResponse data, response status code and response headers - def get_tag_policy_with_http_info(policy_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_tag_policy".to_sym] + # @return [Array<(TagRuleResponse, Integer, Hash)>] TagRuleResponse data, response status code and response headers + def get_tag_rule_with_http_info(policy_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_tag_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_tag_policy") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_tag_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_tag_policy")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_tag_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TagPoliciesAPI.get_tag_policy ...' + @api_client.config.logger.debug 'Calling API: TagRulesAPI.get_tag_rule ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? - fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagPoliciesAPI.get_tag_policy" + fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagRulesAPI.get_tag_rule" end allowable_values = ['score'] if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) @@ -233,13 +233,13 @@ def get_tag_policy_with_http_info(policy_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'TagPolicyResponse' + return_type = opts[:debug_return_type] || 'TagRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :get_tag_policy, + :operation => :get_tag_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -251,45 +251,45 @@ def get_tag_policy_with_http_info(policy_id, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: TagPoliciesAPI#get_tag_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: TagRulesAPI#get_tag_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a tag policy compliance score. + # Get a tag rule compliance score. # - # @see #get_tag_policy_score_with_http_info - def get_tag_policy_score(policy_id, opts = {}) - data, _status_code, _headers = get_tag_policy_score_with_http_info(policy_id, opts) + # @see #get_tag_rule_score_with_http_info + def get_tag_rule_score(policy_id, opts = {}) + data, _status_code, _headers = get_tag_rule_score_with_http_info(policy_id, opts) data end - # Get a tag policy compliance score. + # Get a tag rule compliance score. # - # Retrieve the compliance score for a single tag policy. The score is computed over the + # 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 policy. A `null` score indicates that + # telemetry within that window that conforms to the rule. A `null` score indicates that # no relevant telemetry was found. # - # @param policy_id [String] The unique identifier of the tag policy. + # @param policy_id [String] The unique identifier of the tag rule. # @param opts [Hash] the optional parameters # @option opts [Integer] :ts_start Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. # @option opts [Integer] :ts_end 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`. - # @return [Array<(TagPolicyScoreResponse, Integer, Hash)>] TagPolicyScoreResponse data, response status code and response headers - def get_tag_policy_score_with_http_info(policy_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_tag_policy_score".to_sym] + # @return [Array<(TagRuleScoreResponse, Integer, Hash)>] TagRuleScoreResponse data, response status code and response headers + def get_tag_rule_score_with_http_info(policy_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_tag_rule_score".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_tag_policy_score") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_tag_rule_score") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_tag_policy_score")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_tag_rule_score")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TagPoliciesAPI.get_tag_policy_score ...' + @api_client.config.logger.debug 'Calling API: TagRulesAPI.get_tag_rule_score ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? - fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagPoliciesAPI.get_tag_policy_score" + fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagRulesAPI.get_tag_rule_score" end # resource path local_var_path = '/api/v2/tag_policies/{policy_id}/score'.sub('{policy_id}', CGI.escape(policy_id.to_s).gsub('%2F', '/')) @@ -311,13 +311,13 @@ def get_tag_policy_score_with_http_info(policy_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'TagPolicyScoreResponse' + return_type = opts[:debug_return_type] || 'TagRuleScoreResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :get_tag_policy_score, + :operation => :get_tag_rule_score, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -329,49 +329,49 @@ def get_tag_policy_score_with_http_info(policy_id, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: TagPoliciesAPI#get_tag_policy_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: TagRulesAPI#get_tag_rule_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List tag policies. + # List tag rules. # - # @see #list_tag_policies_with_http_info - def list_tag_policies(opts = {}) - data, _status_code, _headers = list_tag_policies_with_http_info(opts) + # @see #list_tag_rules_with_http_info + def list_tag_rules(opts = {}) + data, _status_code, _headers = list_tag_rules_with_http_info(opts) data end - # List tag policies. + # List tag rules. # - # 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 + # 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 opts [Hash] the optional parameters - # @option opts [Boolean] :include_disabled Whether to include policies that are currently disabled. Defaults to `false`. - # @option opts [Boolean] :include_deleted Whether to include policies that have been soft-deleted. Defaults to `false`. - # @option opts [TagPolicyInclude] :include Comma-separated list of related resources to include alongside each policy in the response. Currently the only supported value is `score`. - # @option opts [TagPolicySource] :filter_source Restrict the result set to policies whose source matches the given value. + # @option opts [Boolean] :include_disabled Whether to include rules that are currently disabled. Defaults to `false`. + # @option opts [Boolean] :include_deleted Whether to include rules that have been soft-deleted. Defaults to `false`. + # @option opts [TagRuleInclude] :include Comma-separated list of related resources to include alongside each rule in the response. Currently the only supported value is `score`. + # @option opts [TagRuleSource] :filter_source Restrict the result set to rules whose source matches the given value. # @option opts [Integer] :ts_start 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. # @option opts [Integer] :ts_end 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`. - # @return [Array<(TagPoliciesListResponse, Integer, Hash)>] TagPoliciesListResponse data, response status code and response headers - def list_tag_policies_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_tag_policies".to_sym] + # @return [Array<(TagRulesListResponse, Integer, Hash)>] TagRulesListResponse data, response status code and response headers + def list_tag_rules_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_tag_rules".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_tag_policies") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_tag_rules") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_tag_policies")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_tag_rules")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TagPoliciesAPI.list_tag_policies ...' + @api_client.config.logger.debug 'Calling API: TagRulesAPI.list_tag_rules ...' end allowable_values = ['score'] if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" end - allowable_values = ['logs', 'spans', 'metrics', 'rum', 'feed'] + allowable_values = ['logs', 'spans', 'metrics'] if @api_client.config.client_side_validation && opts[:'filter_source'] && !allowable_values.include?(opts[:'filter_source']) fail ArgumentError, "invalid value for \"filter_source\", must be one of #{allowable_values}" end @@ -399,13 +399,13 @@ def list_tag_policies_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'TagPoliciesListResponse' + return_type = opts[:debug_return_type] || 'TagRulesListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :list_tag_policies, + :operation => :list_tag_rules, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -417,47 +417,47 @@ def list_tag_policies_with_http_info(opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: TagPoliciesAPI#list_tag_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: TagRulesAPI#list_tag_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a tag policy. + # Update a tag rule. # - # @see #update_tag_policy_with_http_info - def update_tag_policy(policy_id, body, opts = {}) - data, _status_code, _headers = update_tag_policy_with_http_info(policy_id, body, opts) + # @see #update_tag_rule_with_http_info + def update_tag_rule(policy_id, body, opts = {}) + data, _status_code, _headers = update_tag_rule_with_http_info(policy_id, body, opts) data end - # Update a tag policy. + # Update a tag rule. # - # 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 + # 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 policy_id [String] The unique identifier of the tag policy to update. - # @param body [TagPolicyUpdateRequest] + # @param policy_id [String] The unique identifier of the tag rule to update. + # @param body [TagRuleUpdateRequest] # @param opts [Hash] the optional parameters - # @return [Array<(TagPolicyResponse, Integer, Hash)>] TagPolicyResponse data, response status code and response headers - def update_tag_policy_with_http_info(policy_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_tag_policy".to_sym] + # @return [Array<(TagRuleResponse, Integer, Hash)>] TagRuleResponse data, response status code and response headers + def update_tag_rule_with_http_info(policy_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_tag_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_tag_policy") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_tag_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_tag_policy")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_tag_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TagPoliciesAPI.update_tag_policy ...' + @api_client.config.logger.debug 'Calling API: TagRulesAPI.update_tag_rule ...' end # verify the required parameter 'policy_id' is set if @api_client.config.client_side_validation && policy_id.nil? - fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagPoliciesAPI.update_tag_policy" + fail ArgumentError, "Missing the required parameter 'policy_id' when calling TagRulesAPI.update_tag_rule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TagPoliciesAPI.update_tag_policy" + fail ArgumentError, "Missing the required parameter 'body' when calling TagRulesAPI.update_tag_rule" end # resource path local_var_path = '/api/v2/tag_policies/{policy_id}'.sub('{policy_id}', CGI.escape(policy_id.to_s).gsub('%2F', '/')) @@ -479,13 +479,13 @@ def update_tag_policy_with_http_info(policy_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'TagPolicyResponse' + return_type = opts[:debug_return_type] || 'TagRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :update_tag_policy, + :operation => :update_tag_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -497,7 +497,7 @@ def update_tag_policy_with_http_info(policy_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: TagPoliciesAPI#update_tag_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: TagRulesAPI#update_tag_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/datadog_api_client/v2/models/tag_policy_attributes.rb b/lib/datadog_api_client/v2/models/tag_rule_attributes.rb similarity index 91% rename from lib/datadog_api_client/v2/models/tag_policy_attributes.rb rename to lib/datadog_api_client/v2/models/tag_rule_attributes.rb index 1874b5e5887f..7e4555b8832c 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_attributes.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_attributes.rb @@ -17,51 +17,51 @@ require 'time' module DatadogAPIClient::V2 - # The attributes of a tag policy resource. - class TagPolicyAttributes + # The attributes of a tag rule resource. + class TagRuleAttributes include BaseGenericModel - # The RFC 3339 timestamp at which the policy was created. + # The RFC 3339 timestamp at which the rule was created. attr_reader :created_at - # The identifier of the user who created the policy. + # The identifier of the user who created the rule. attr_reader :created_by - # 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. + # 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. attr_accessor :deleted_at - # The identifier of the user who soft-deleted the policy. `null` if the policy has not been deleted. + # The identifier of the user who soft-deleted the rule. `null` if the rule has not been deleted. attr_accessor :deleted_by - # Whether the policy is currently enforced. + # Whether the rule is currently enforced. attr_reader :enabled - # The RFC 3339 timestamp at which the policy was last modified. + # The RFC 3339 timestamp at which the rule was last modified. attr_reader :modified_at - # The identifier of the user who last modified the policy. + # The identifier of the user who last modified the rule. attr_reader :modified_by - # When `true`, the policy matches tag values that do NOT match any of the supplied patterns. + # When `true`, the rule matches tag values that do NOT match any of the supplied patterns. attr_reader :negated - # Human-readable name for the tag policy. + # Human-readable name for the tag rule. attr_reader :policy_name - # 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. attr_reader :policy_type # When `true`, telemetry without this tag is treated as a violation. attr_reader :required - # The scope the policy applies within. + # The scope the rule applies within. attr_reader :scope - # The telemetry source that a tag policy applies to. + # The telemetry source that a tag rule applies to. attr_reader :source - # The tag key that the policy governs. + # The tag key that the rule governs. attr_reader :tag_key # The patterns that valid values for the tag key must match. @@ -108,10 +108,10 @@ def self.openapi_types :'modified_by' => :'String', :'negated' => :'Boolean', :'policy_name' => :'String', - :'policy_type' => :'TagPolicyType', + :'policy_type' => :'TagRuleType', :'required' => :'Boolean', :'scope' => :'String', - :'source' => :'TagPolicySource', + :'source' => :'TagRuleSource', :'tag_key' => :'String', :'tag_value_patterns' => :'Array', :'version' => :'Integer' @@ -132,7 +132,7 @@ def self.openapi_nullable # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_create_attributes.rb b/lib/datadog_api_client/v2/models/tag_rule_create_attributes.rb similarity index 89% rename from lib/datadog_api_client/v2/models/tag_policy_create_attributes.rb rename to lib/datadog_api_client/v2/models/tag_rule_create_attributes.rb index 14b0469ee048..f79b17696064 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_create_attributes.rb @@ -17,34 +17,34 @@ require 'time' module DatadogAPIClient::V2 - # Attributes that can be supplied when creating a tag policy. - class TagPolicyCreateAttributes + # Attributes that can be supplied when creating a tag rule. + class TagRuleCreateAttributes include BaseGenericModel - # Whether the policy is currently enforced. Defaults to `true` for newly created policies. + # Whether the rule is currently enforced. Defaults to `true` for newly created rules. attr_accessor :enabled - # When `true`, the policy matches tag values that do NOT match any of the supplied patterns. Defaults to `false`. + # When `true`, the rule matches tag values that do NOT match any of the supplied patterns. Defaults to `false`. attr_accessor :negated - # Human-readable name for the tag policy. + # Human-readable name for the tag rule. attr_reader :policy_name - # 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. attr_reader :policy_type # When `true`, telemetry without this tag is treated as a violation. Defaults to `false`. attr_accessor :required - # 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. attr_reader :scope - # The telemetry source that a tag policy applies to. + # The telemetry source that a tag rule applies to. attr_reader :source - # The tag key that the policy governs (for example, `service`). + # The tag key that the rule governs (for example, `service`). attr_reader :tag_key # One or more patterns that valid values for the tag key must match. At least one @@ -76,10 +76,10 @@ def self.openapi_types :'enabled' => :'Boolean', :'negated' => :'Boolean', :'policy_name' => :'String', - :'policy_type' => :'TagPolicyCreateType', + :'policy_type' => :'TagRuleCreateType', :'required' => :'Boolean', :'scope' => :'String', - :'source' => :'TagPolicySource', + :'source' => :'TagRuleSource', :'tag_key' => :'String', :'tag_value_patterns' => :'Array' } @@ -90,7 +90,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyCreateAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleCreateAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_create_data.rb b/lib/datadog_api_client/v2/models/tag_rule_create_data.rb similarity index 91% rename from lib/datadog_api_client/v2/models/tag_policy_create_data.rb rename to lib/datadog_api_client/v2/models/tag_rule_create_data.rb index 4b78db9c5eb3..9497c887d188 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_create_data.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_create_data.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a tag policy. - class TagPolicyCreateData + # Data object for creating a tag rule. + class TagRuleCreateData include BaseGenericModel - # Attributes that can be supplied when creating a tag policy. + # Attributes that can be supplied when creating a tag rule. attr_reader :attributes - # JSON:API resource type for a tag policy. + # JSON:API resource type for a tag rule. attr_reader :type attr_accessor :additional_properties @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'TagPolicyCreateAttributes', - :'type' => :'TagPolicyResourceType' + :'attributes' => :'TagRuleCreateAttributes', + :'type' => :'TagRuleResourceType' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyCreateData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleCreateData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_score_response.rb b/lib/datadog_api_client/v2/models/tag_rule_create_request.rb similarity index 93% rename from lib/datadog_api_client/v2/models/tag_policy_score_response.rb rename to lib/datadog_api_client/v2/models/tag_rule_create_request.rb index 20be7e49217f..8049738200fa 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_score_response.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_create_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # A tag policy compliance score. - class TagPolicyScoreResponse + # Payload for creating a new tag rule. + class TagRuleCreateRequest include BaseGenericModel - # A compliance score resource for a tag policy. + # Data object for creating a tag rule. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'TagPolicyScoreData' + :'data' => :'TagRuleCreateData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyScoreResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleCreateRequest` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_create_type.rb b/lib/datadog_api_client/v2/models/tag_rule_create_type.rb similarity index 84% rename from lib/datadog_api_client/v2/models/tag_policy_create_type.rb rename to lib/datadog_api_client/v2/models/tag_rule_create_type.rb index 025a70e6afbc..f183a1d98ad8 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_create_type.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_create_type.rb @@ -17,9 +17,9 @@ require 'time' module DatadogAPIClient::V2 - # 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. - class TagPolicyCreateType + class TagRuleCreateType include BaseEnumModel SURFACING = "surfacing".freeze diff --git a/lib/datadog_api_client/v2/models/tag_policy_data.rb b/lib/datadog_api_client/v2/models/tag_rule_data.rb similarity index 89% rename from lib/datadog_api_client/v2/models/tag_policy_data.rb rename to lib/datadog_api_client/v2/models/tag_rule_data.rb index 89cfa1ff2726..bc0c724288d2 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_data.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_data.rb @@ -17,20 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # A tag policy resource. - class TagPolicyData + # A tag rule resource. + class TagRuleData include BaseGenericModel - # The attributes of a tag policy resource. + # The attributes of a tag rule resource. attr_reader :attributes - # The unique identifier of the tag policy. + # The unique identifier of the tag rule. attr_reader :id - # Related resources for a tag policy. Only present when the corresponding `include` query parameter is supplied. + # Related resources for a tag rule. Only present when the corresponding `include` query parameter is supplied. attr_accessor :relationships - # JSON:API resource type for a tag policy. + # JSON:API resource type for a tag rule. attr_reader :type attr_accessor :additional_properties @@ -50,10 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'TagPolicyAttributes', + :'attributes' => :'TagRuleAttributes', :'id' => :'String', - :'relationships' => :'TagPolicyRelationships', - :'type' => :'TagPolicyResourceType' + :'relationships' => :'TagRuleRelationships', + :'type' => :'TagRuleResourceType' } end @@ -62,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_include.rb b/lib/datadog_api_client/v2/models/tag_rule_include.rb similarity index 80% rename from lib/datadog_api_client/v2/models/tag_policy_include.rb rename to lib/datadog_api_client/v2/models/tag_rule_include.rb index a05c72e0fd13..7e6eae7b11b9 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_include.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_include.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # A related resource to include alongside a tag policy in the response. Currently the only supported value is `score`. - class TagPolicyInclude + # A related resource to include alongside a tag rule in the response. Currently the only supported value is `score`. + class TagRuleInclude include BaseEnumModel SCORE = "score".freeze diff --git a/lib/datadog_api_client/v2/models/tag_policy_relationships.rb b/lib/datadog_api_client/v2/models/tag_rule_relationships.rb similarity index 88% rename from lib/datadog_api_client/v2/models/tag_policy_relationships.rb rename to lib/datadog_api_client/v2/models/tag_rule_relationships.rb index f98680089ab4..20afab5b83e7 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_relationships.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_relationships.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Related resources for a tag policy. Only present when the corresponding `include` query parameter is supplied. - class TagPolicyRelationships + # Related resources for a tag rule. Only present when the corresponding `include` query parameter is supplied. + class TagRuleRelationships include BaseGenericModel - # A relationship to the compliance score resource for this policy. + # A relationship to the compliance score resource for this rule. attr_accessor :score attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'score' => :'TagPolicyScoreRelationship' + :'score' => :'TagRuleScoreRelationship' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyRelationships` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleRelationships` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_resource_type.rb b/lib/datadog_api_client/v2/models/tag_rule_resource_type.rb similarity index 89% rename from lib/datadog_api_client/v2/models/tag_policy_resource_type.rb rename to lib/datadog_api_client/v2/models/tag_rule_resource_type.rb index a14c461fc774..997eaa4635b6 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_resource_type.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_resource_type.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for a tag policy. - class TagPolicyResourceType + # JSON:API resource type for a tag rule. + class TagRuleResourceType include BaseEnumModel TAG_POLICY = "tag_policy".freeze diff --git a/lib/datadog_api_client/v2/models/tag_policy_response.rb b/lib/datadog_api_client/v2/models/tag_rule_response.rb similarity index 90% rename from lib/datadog_api_client/v2/models/tag_policy_response.rb rename to lib/datadog_api_client/v2/models/tag_rule_response.rb index dfcc3e7593aa..4360b7373c92 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_response.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_response.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # A single tag policy. - class TagPolicyResponse + # A single tag rule. + class TagRuleResponse include BaseGenericModel - # A tag policy resource. + # A tag rule resource. attr_reader :data - # Related resources fetched alongside the primary tag policies. Populated when an `include` query parameter is supplied. + # Related resources fetched alongside the primary tag rules. Populated when an `include` query parameter is supplied. attr_accessor :included attr_accessor :additional_properties @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'TagPolicyData', - :'included' => :'Array' + :'data' => :'TagRuleData', + :'included' => :'Array' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_score_attributes.rb b/lib/datadog_api_client/v2/models/tag_rule_score_attributes.rb similarity index 93% rename from lib/datadog_api_client/v2/models/tag_policy_score_attributes.rb rename to lib/datadog_api_client/v2/models/tag_rule_score_attributes.rb index 34c02aaa2ad6..c87e3df63b9d 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_score_attributes.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_score_attributes.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a tag policy compliance score. - class TagPolicyScoreAttributes + # Attributes of a tag rule compliance score. + class TagRuleScoreAttributes include BaseGenericModel - # 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. attr_accessor :score @@ -31,7 +31,7 @@ class TagPolicyScoreAttributes # Start of the time window the score was computed over, as a Unix timestamp in milliseconds. attr_reader :ts_start - # The version of the tag policy that the score was computed against. + # The version of the tag rule that the score was computed against. attr_reader :version attr_accessor :additional_properties @@ -71,7 +71,7 @@ def self.openapi_nullable # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyScoreAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleScoreAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_score_data.rb b/lib/datadog_api_client/v2/models/tag_rule_score_data.rb similarity index 92% rename from lib/datadog_api_client/v2/models/tag_policy_score_data.rb rename to lib/datadog_api_client/v2/models/tag_rule_score_data.rb index ba9765bcbb59..dd2536c14e9b 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_score_data.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_score_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A compliance score resource for a tag policy. - class TagPolicyScoreData + # A compliance score resource for a tag rule. + class TagRuleScoreData include BaseGenericModel - # Attributes of a tag policy compliance score. + # Attributes of a tag rule compliance score. attr_reader :attributes # The unique identifier of the compliance score resource. attr_reader :id - # JSON:API resource type for a tag policy compliance score. + # JSON:API resource type for a tag rule compliance score. attr_reader :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'TagPolicyScoreAttributes', + :'attributes' => :'TagRuleScoreAttributes', :'id' => :'String', - :'type' => :'TagPolicyScoreResourceType' + :'type' => :'TagRuleScoreResourceType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyScoreData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleScoreData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_score_relationship.rb b/lib/datadog_api_client/v2/models/tag_rule_score_relationship.rb similarity index 93% rename from lib/datadog_api_client/v2/models/tag_policy_score_relationship.rb rename to lib/datadog_api_client/v2/models/tag_rule_score_relationship.rb index a0f0153eb7d5..e15ed9510ab4 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_score_relationship.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_score_relationship.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # A relationship to the compliance score resource for this policy. - class TagPolicyScoreRelationship + # A relationship to the compliance score resource for this rule. + class TagRuleScoreRelationship include BaseGenericModel # Identifier of the related compliance score resource. @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'TagPolicyScoreRelationshipData' + :'data' => :'TagRuleScoreRelationshipData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyScoreRelationship` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleScoreRelationship` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_score_relationship_data.rb b/lib/datadog_api_client/v2/models/tag_rule_score_relationship_data.rb similarity index 94% rename from lib/datadog_api_client/v2/models/tag_policy_score_relationship_data.rb rename to lib/datadog_api_client/v2/models/tag_rule_score_relationship_data.rb index d1ce4536c666..14a55ddbb7fc 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_score_relationship_data.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_score_relationship_data.rb @@ -18,13 +18,13 @@ module DatadogAPIClient::V2 # Identifier of the related compliance score resource. - class TagPolicyScoreRelationshipData + class TagRuleScoreRelationshipData include BaseGenericModel # The unique identifier of the related compliance score resource. attr_reader :id - # JSON:API resource type for a tag policy compliance score. + # JSON:API resource type for a tag rule compliance score. attr_reader :type attr_accessor :additional_properties @@ -43,7 +43,7 @@ def self.attribute_map def self.openapi_types { :'id' => :'String', - :'type' => :'TagPolicyScoreResourceType' + :'type' => :'TagRuleScoreResourceType' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyScoreRelationshipData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleScoreRelationshipData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_score_resource_type.rb b/lib/datadog_api_client/v2/models/tag_rule_score_resource_type.rb similarity index 86% rename from lib/datadog_api_client/v2/models/tag_policy_score_resource_type.rb rename to lib/datadog_api_client/v2/models/tag_rule_score_resource_type.rb index 4185e47b90af..91c977d22d33 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_score_resource_type.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_score_resource_type.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for a tag policy compliance score. - class TagPolicyScoreResourceType + # JSON:API resource type for a tag rule compliance score. + class TagRuleScoreResourceType include BaseEnumModel TAG_POLICY_SCORE = "tag_policy_score".freeze diff --git a/lib/datadog_api_client/v2/models/tag_policy_create_request.rb b/lib/datadog_api_client/v2/models/tag_rule_score_response.rb similarity index 93% rename from lib/datadog_api_client/v2/models/tag_policy_create_request.rb rename to lib/datadog_api_client/v2/models/tag_rule_score_response.rb index 09e079e48947..0127aad8d445 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_create_request.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_score_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Payload for creating a new tag policy. - class TagPolicyCreateRequest + # A tag rule compliance score. + class TagRuleScoreResponse include BaseGenericModel - # Data object for creating a tag policy. + # A compliance score resource for a tag rule. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'TagPolicyCreateData' + :'data' => :'TagRuleScoreData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleScoreResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_source.rb b/lib/datadog_api_client/v2/models/tag_rule_source.rb similarity index 83% rename from lib/datadog_api_client/v2/models/tag_policy_source.rb rename to lib/datadog_api_client/v2/models/tag_rule_source.rb index 142a261a8db6..0313f93b5eec 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_source.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_source.rb @@ -17,14 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # The telemetry source that a tag policy applies to. - class TagPolicySource + # The telemetry source that a tag rule applies to. + class TagRuleSource include BaseEnumModel LOGS = "logs".freeze SPANS = "spans".freeze METRICS = "metrics".freeze - RUM = "rum".freeze - FEED = "feed".freeze end end diff --git a/lib/datadog_api_client/v2/models/tag_policy_type.rb b/lib/datadog_api_client/v2/models/tag_rule_type.rb similarity index 86% rename from lib/datadog_api_client/v2/models/tag_policy_type.rb rename to lib/datadog_api_client/v2/models/tag_rule_type.rb index 11a94f3b4a8f..57dfd1993638 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_type.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_type.rb @@ -17,9 +17,9 @@ require 'time' module DatadogAPIClient::V2 - # 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. - class TagPolicyType + class TagRuleType include BaseEnumModel BLOCKING = "blocking".freeze diff --git a/lib/datadog_api_client/v2/models/tag_policy_update_attributes.rb b/lib/datadog_api_client/v2/models/tag_rule_update_attributes.rb similarity index 87% rename from lib/datadog_api_client/v2/models/tag_policy_update_attributes.rb rename to lib/datadog_api_client/v2/models/tag_rule_update_attributes.rb index 882b6a469486..f2a590a3f157 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_update_attributes.rb @@ -17,31 +17,31 @@ require 'time' module DatadogAPIClient::V2 - # 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. - class TagPolicyUpdateAttributes + # 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. + class TagRuleUpdateAttributes include BaseGenericModel - # Whether the policy is currently enforced. + # Whether the rule is currently enforced. attr_accessor :enabled - # When `true`, the policy matches tag values that do NOT match any of the supplied patterns. + # When `true`, the rule matches tag values that do NOT match any of the supplied patterns. attr_accessor :negated - # Human-readable name for the tag policy. + # Human-readable name for the tag rule. attr_accessor :policy_name - # 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. attr_accessor :policy_type # When `true`, telemetry without this tag is treated as a violation. attr_accessor :required - # The scope the policy applies within. + # The scope the rule applies within. attr_accessor :scope - # The tag key that the policy governs. + # The tag key that the rule governs. attr_accessor :tag_key # One or more patterns that valid values for the tag key must match. @@ -71,7 +71,7 @@ def self.openapi_types :'enabled' => :'Boolean', :'negated' => :'Boolean', :'policy_name' => :'String', - :'policy_type' => :'TagPolicyType', + :'policy_type' => :'TagRuleType', :'required' => :'Boolean', :'scope' => :'String', :'tag_key' => :'String', @@ -84,7 +84,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyUpdateAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleUpdateAttributes` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_update_data.rb b/lib/datadog_api_client/v2/models/tag_rule_update_data.rb similarity index 88% rename from lib/datadog_api_client/v2/models/tag_policy_update_data.rb rename to lib/datadog_api_client/v2/models/tag_rule_update_data.rb index a0bc2be1c418..67149617fc44 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_update_data.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_update_data.rb @@ -17,18 +17,18 @@ require 'time' module DatadogAPIClient::V2 - # Data object for updating a tag policy. - class TagPolicyUpdateData + # Data object for updating a tag rule. + class TagRuleUpdateData include BaseGenericModel - # 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. attr_accessor :attributes - # The unique identifier of the tag policy being updated. + # The unique identifier of the tag rule being updated. attr_reader :id - # JSON:API resource type for a tag policy. + # JSON:API resource type for a tag rule. attr_reader :type attr_accessor :additional_properties @@ -47,9 +47,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'TagPolicyUpdateAttributes', + :'attributes' => :'TagRuleUpdateAttributes', :'id' => :'String', - :'type' => :'TagPolicyResourceType' + :'type' => :'TagRuleResourceType' } end @@ -58,7 +58,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyUpdateData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleUpdateData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policy_update_request.rb b/lib/datadog_api_client/v2/models/tag_rule_update_request.rb similarity index 91% rename from lib/datadog_api_client/v2/models/tag_policy_update_request.rb rename to lib/datadog_api_client/v2/models/tag_rule_update_request.rb index d1c26e48a10c..d1a20186fe3a 100644 --- a/lib/datadog_api_client/v2/models/tag_policy_update_request.rb +++ b/lib/datadog_api_client/v2/models/tag_rule_update_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Payload for updating an existing tag policy. Only the supplied fields are modified. - class TagPolicyUpdateRequest + # Payload for updating an existing tag rule. Only the supplied fields are modified. + class TagRuleUpdateRequest include BaseGenericModel - # Data object for updating a tag policy. + # Data object for updating a tag rule. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'TagPolicyUpdateData' + :'data' => :'TagRuleUpdateData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPolicyUpdateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRuleUpdateRequest` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/tag_policies_list_response.rb b/lib/datadog_api_client/v2/models/tag_rules_list_response.rb similarity index 89% rename from lib/datadog_api_client/v2/models/tag_policies_list_response.rb rename to lib/datadog_api_client/v2/models/tag_rules_list_response.rb index 58f7e00e4be6..e55138477ed7 100644 --- a/lib/datadog_api_client/v2/models/tag_policies_list_response.rb +++ b/lib/datadog_api_client/v2/models/tag_rules_list_response.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # A page of tag policies. - class TagPoliciesListResponse + # A page of tag rules. + class TagRulesListResponse include BaseGenericModel - # An array of tag policy data objects. + # An array of tag rule data objects. attr_reader :data - # Related resources fetched alongside the primary tag policies. Populated when an `include` query parameter is supplied. + # Related resources fetched alongside the primary tag rules. Populated when an `include` query parameter is supplied. attr_accessor :included attr_accessor :additional_properties @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array', - :'included' => :'Array' + :'data' => :'Array', + :'included' => :'Array' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagPoliciesListResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TagRulesListResponse` initialize method" end self.additional_properties = {}