Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,9 @@ components:
example: cd73a516-a481-4af5-8352-9b577465c77b
type: string
RumRetentionQuotaScopeTypeParameter:
description: The type of scope the retention quota configuration applies to.
description: |-
The type of scope the retention quota configuration applies to.
`application` is the only supported scope type.
in: path
name: scope_type
required: true
Expand Down Expand Up @@ -92488,25 +92490,9 @@ components:
$ref: "#/components/schemas/RumRetentionFilterData"
type: array
type: object
RumRetentionQuotaAdaptiveConfig:
description: The configuration used when `mode` is `adaptive`.
properties:
max_retention_rate:
description: The maximum fraction of sessions to retain, in the range `(0, 1]`.
example: 0.5
exclusiveMinimum: true
format: double
maximum: 1
minimum: 0
type: number
required:
- max_retention_rate
type: object
RumRetentionQuotaConfigAttributes:
description: The RUM retention quota configuration properties.
properties:
adaptive:
$ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig"
custom:
$ref: "#/components/schemas/RumRetentionQuotaCustomConfig"
mode:
Expand Down Expand Up @@ -92564,8 +92550,6 @@ components:
RumRetentionQuotaConfigUpdateAttributes:
description: The RUM retention quota configuration properties to create or update.
properties:
adaptive:
$ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig"
custom:
$ref: "#/components/schemas/RumRetentionQuotaCustomConfig"
mode:
Expand Down Expand Up @@ -92631,14 +92615,13 @@ components:
type: object
RumRetentionQuotaMode:
description: |-
The retention quota mode. `custom` enforces a fixed session limit, while
`adaptive` dynamically adjusts retention.
The retention quota mode. `custom` enforces a fixed session limit.
`custom` is the only supported mode.
enum:
- custom
- adaptive
example: custom
type: string
x-enum-varnames: ["CUSTOM", "ADAPTIVE"]
x-enum-varnames: ["CUSTOM"]
RumRetentionQuotaReachedAction:
description: The action to take when the session quota is reached.
enum:
Expand All @@ -92649,7 +92632,9 @@ components:
x-enum-varnames: ["STOP", "SLOWDOWN"]
RumRetentionQuotaScopeType:
default: application
description: The type of scope the retention quota configuration applies to.
description: |-
The type of scope the retention quota configuration applies to.
`application` is the only supported scope type.
enum:
- application
example: application
Expand Down Expand Up @@ -187415,7 +187400,7 @@ paths:
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Delete a RUM retention quota configuration
tags:
- RUM Retention Quota
- RUM Retention Quotas
x-permission:
operator: OR
permissions:
Expand Down Expand Up @@ -187478,7 +187463,7 @@ paths:
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get a RUM retention quota configuration
tags:
- RUM Retention Quota
- RUM Retention Quotas
x-permission:
operator: OR
permissions:
Expand Down Expand Up @@ -187564,7 +187549,7 @@ paths:
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Create or update a RUM retention quota config
tags:
- RUM Retention Quota
- RUM Retention Quotas
x-codegen-request-body-name: body
x-permission:
operator: OR
Expand Down Expand Up @@ -218487,7 +218472,7 @@ tags:
name: RUM Remote Config
- description: |-
Manage RUM retention quota configurations for your organization's RUM applications.
name: RUM Retention Quota
name: RUM Retention Quotas
- description: View and manage Reference Tables in your organization.
name: Reference Tables
- description: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Delete a RUM retention quota configuration returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RUMRetentionQuotaAPI.new
api_instance.delete_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695")
api_instance = DatadogAPIClient::V2::RUMRetentionQuotasAPI.new
api_instance.delete_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b")
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Get a RUM retention quota configuration returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RUMRetentionQuotaAPI.new
p api_instance.get_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695")
api_instance = DatadogAPIClient::V2::RUMRetentionQuotasAPI.new
p api_instance.get_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b")
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Create or update a RUM retention quota config returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RUMRetentionQuotaAPI.new
api_instance = DatadogAPIClient::V2::RUMRetentionQuotasAPI.new

body = DatadogAPIClient::V2::RumRetentionQuotaConfigUpdateRequest.new({
data: DatadogAPIClient::V2::RumRetentionQuotaConfigUpdateData.new({
attributes: DatadogAPIClient::V2::RumRetentionQuotaConfigUpdateAttributes.new({
adaptive: DatadogAPIClient::V2::RumRetentionQuotaAdaptiveConfig.new({
max_retention_rate: 0.5,
}),
custom: DatadogAPIClient::V2::RumRetentionQuotaCustomConfig.new({
daily_reset_time: "08:00",
daily_reset_timezone: "+09:00",
Expand All @@ -18,8 +15,8 @@
}),
mode: DatadogAPIClient::V2::RumRetentionQuotaMode::CUSTOM,
}),
id: "ced16651-97b6-4e67-8590-8caec3af0695",
id: "cd73a516-a481-4af5-8352-9b577465c77b",
type: DatadogAPIClient::V2::RumRetentionQuotaConfigType::RUM_QUOTA_CONFIG,
}),
})
p api_instance.upsert_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695", body)
p api_instance.upsert_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b", body)
100 changes: 0 additions & 100 deletions features/v2/rum_retention_quota.feature

This file was deleted.

84 changes: 84 additions & 0 deletions features/v2/rum_retention_quotas.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@endpoint(rum-retention-quotas) @endpoint(rum-retention-quotas-v2)
Feature: RUM Retention Quotas
Manage RUM retention quota configurations for your organization's RUM
applications.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "RUMRetentionQuotas" API

@generated @skip @team:DataDog/rum-backend
Scenario: Create or update a RUM retention quota config returns "Bad Request" response
Given new "UpsertRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Create or update a RUM retention quota config returns "Not Found" response
Given new "UpsertRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/rum-backend
Scenario: Create or update a RUM retention quota config returns "OK" response
Given new "UpsertRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/rum-backend
Scenario: Delete a RUM retention quota configuration returns "Bad Request" response
Given new "DeleteRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Delete a RUM retention quota configuration returns "No Content" response
Given new "DeleteRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/rum-backend
Scenario: Delete a RUM retention quota configuration returns "Not Found" response
Given new "DeleteRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/rum-backend
Scenario: Get a RUM retention quota configuration returns "Bad Request" response
Given new "GetRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Get a RUM retention quota configuration returns "Not Found" response
Given new "GetRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/rum-backend
Scenario: Get a RUM retention quota configuration returns "OK" response
Given new "GetRumQuotaConfig" request
And request contains "scope_type" parameter from "REPLACE.ME"
And request contains "scope_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
6 changes: 3 additions & 3 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7147,19 +7147,19 @@
}
},
"DeleteRumQuotaConfig": {
"tag": "RUM Retention Quota",
"tag": "RUM Retention Quotas",
"undo": {
"type": "idempotent"
}
},
"GetRumQuotaConfig": {
"tag": "RUM Retention Quota",
"tag": "RUM Retention Quotas",
"undo": {
"type": "safe"
}
},
"UpsertRumQuotaConfig": {
"tag": "RUM Retention Quota",
"tag": "RUM Retention Quotas",
"undo": {
"type": "idempotent"
}
Expand Down
3 changes: 1 addition & 2 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6801,7 +6801,6 @@ def overrides
"v2.rum_retention_filter_update_attributes" => "RumRetentionFilterUpdateAttributes",
"v2.rum_retention_filter_update_data" => "RumRetentionFilterUpdateData",
"v2.rum_retention_filter_update_request" => "RumRetentionFilterUpdateRequest",
"v2.rum_retention_quota_adaptive_config" => "RumRetentionQuotaAdaptiveConfig",
"v2.rum_retention_quota_config_attributes" => "RumRetentionQuotaConfigAttributes",
"v2.rum_retention_quota_config_data" => "RumRetentionQuotaConfigData",
"v2.rum_retention_quota_config_response" => "RumRetentionQuotaConfigResponse",
Expand Down Expand Up @@ -8837,7 +8836,7 @@ def overrides
"v2.rum_replay_sessions_api" => "RumReplaySessionsAPI",
"v2.rum_replay_viewership_api" => "RumReplayViewershipAPI",
"v2.rum_retention_filters_api" => "RumRetentionFiltersAPI",
"v2.rum_retention_quota_api" => "RUMRetentionQuotaAPI",
"v2.rum_retention_quotas_api" => "RUMRetentionQuotasAPI",
"v2.salesforce_integration_api" => "SalesforceIntegrationAPI",
"v2.scorecards_api" => "ScorecardsAPI",
"v2.seats_api" => "SeatsAPI",
Expand Down
Loading
Loading