Skip to content

Commit a9b4c0b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 6a02de5 of spec repo (#3890)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d80a173 commit a9b4c0b

17 files changed

Lines changed: 2442 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,13 @@ components:
15581558
required: true
15591559
schema:
15601560
type: string
1561+
RumPermanentRetentionFilterIDParameter:
1562+
description: The identifier of the permanent RUM retention filter.
1563+
in: path
1564+
name: permanent_rf_id
1565+
required: true
1566+
schema:
1567+
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
15611568
RumRetentionFilterIDParameter:
15621569
description: Retention filter ID.
15631570
in: path
@@ -71551,6 +71558,100 @@ components:
7155171558
$ref: "#/components/schemas/RumMetricResponseData"
7155271559
type: array
7155371560
type: object
71561+
RumPermanentRetentionFilterAttributes:
71562+
description: The attributes of a permanent RUM retention filter.
71563+
properties:
71564+
cross_product_sampling:
71565+
$ref: "#/components/schemas/RumCrossProductSampling"
71566+
description:
71567+
description: A description of what the filter retains.
71568+
example: "All sessions generated by Synthetics are retained at 100%."
71569+
type: string
71570+
editability:
71571+
$ref: "#/components/schemas/RumPermanentRetentionFilterEditability"
71572+
name:
71573+
description: The display name of the permanent retention filter.
71574+
example: "Synthetics Sessions"
71575+
type: string
71576+
type: object
71577+
RumPermanentRetentionFilterData:
71578+
description: A permanent RUM retention filter.
71579+
properties:
71580+
attributes:
71581+
$ref: "#/components/schemas/RumPermanentRetentionFilterAttributes"
71582+
id:
71583+
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
71584+
type:
71585+
$ref: "#/components/schemas/RumPermanentRetentionFilterType"
71586+
type: object
71587+
RumPermanentRetentionFilterEditability:
71588+
description: Indicates which cross-product fields of a permanent RUM retention filter can be updated.
71589+
properties:
71590+
trace_editable:
71591+
description: Whether the APM trace cross-product configuration of the filter can be updated.
71592+
example: true
71593+
type: boolean
71594+
type: object
71595+
RumPermanentRetentionFilterID:
71596+
description: The identifier of a permanent RUM retention filter.
71597+
enum:
71598+
- rum_apm_flat_sampling
71599+
- synthetics_sessions
71600+
- forced_replay_sessions
71601+
example: synthetics_sessions
71602+
type: string
71603+
x-enum-varnames: ["RUM_APM_FLAT_SAMPLING", "SYNTHETICS_SESSIONS", "FORCED_REPLAY_SESSIONS"]
71604+
RumPermanentRetentionFilterResponse:
71605+
description: A permanent RUM retention filter object.
71606+
properties:
71607+
data:
71608+
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
71609+
type: object
71610+
RumPermanentRetentionFilterType:
71611+
default: permanent_retention_filters
71612+
description: The type of the resource. The value should always be `permanent_retention_filters`.
71613+
enum:
71614+
- permanent_retention_filters
71615+
example: permanent_retention_filters
71616+
type: string
71617+
x-enum-varnames: ["PERMANENT_RETENTION_FILTERS"]
71618+
RumPermanentRetentionFilterUpdateAttributes:
71619+
description: The configuration to update on a permanent RUM retention filter.
71620+
properties:
71621+
cross_product_sampling:
71622+
$ref: "#/components/schemas/RumCrossProductSamplingUpdate"
71623+
type: object
71624+
RumPermanentRetentionFilterUpdateData:
71625+
description: The new permanent RUM retention filter configuration to update.
71626+
properties:
71627+
attributes:
71628+
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateAttributes"
71629+
id:
71630+
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
71631+
type:
71632+
$ref: "#/components/schemas/RumPermanentRetentionFilterType"
71633+
required:
71634+
- id
71635+
- type
71636+
- attributes
71637+
type: object
71638+
RumPermanentRetentionFilterUpdateRequest:
71639+
description: The permanent RUM retention filter body to update.
71640+
properties:
71641+
data:
71642+
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateData"
71643+
required:
71644+
- data
71645+
type: object
71646+
RumPermanentRetentionFiltersResponse:
71647+
description: All permanent RUM retention filters for a RUM application.
71648+
properties:
71649+
data:
71650+
description: A list of permanent RUM retention filters.
71651+
items:
71652+
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
71653+
type: array
71654+
type: object
7155471655
RumRetentionFilterAttributes:
7155571656
description: The object describing attributes of a RUM retention filter.
7155671657
properties:
@@ -146732,6 +146833,159 @@ paths:
146732146833
tags:
146733146834
- Rum Retention Filters
146734146835
x-codegen-request-body-name: body
146836+
/api/v2/rum/applications/{app_id}/retention_filters/permanent:
146837+
get:
146838+
description: |-
146839+
Get the list of permanent RUM retention filters for a RUM application.
146840+
Permanent retention filters are predefined filters that cannot be created or deleted.
146841+
For each filter, the `editability` block indicates which cross-product fields can be updated.
146842+
operationId: ListPermanentRetentionFilters
146843+
parameters:
146844+
- $ref: "#/components/parameters/RumApplicationIDParameter"
146845+
responses:
146846+
"200":
146847+
content:
146848+
application/json:
146849+
examples:
146850+
default:
146851+
value:
146852+
data:
146853+
- attributes:
146854+
cross_product_sampling:
146855+
trace_enabled: true
146856+
trace_sample_rate: 100.0
146857+
description: RUM retains all Synthetics sessions.
146858+
editability:
146859+
trace_editable: true
146860+
name: Synthetics Sessions
146861+
id: synthetics_sessions
146862+
type: permanent_retention_filters
146863+
- attributes:
146864+
cross_product_sampling:
146865+
trace_enabled: true
146866+
trace_sample_rate: 100.0
146867+
description: RUM retains all sessions with forced replays.
146868+
editability:
146869+
trace_editable: true
146870+
name: Forced Replay Sessions
146871+
id: forced_replay_sessions
146872+
type: permanent_retention_filters
146873+
- attributes:
146874+
cross_product_sampling:
146875+
trace_enabled: true
146876+
trace_sample_rate: 100.0
146877+
description: Configures APM trace sampling for RUM sessions using flat sampling.
146878+
editability:
146879+
trace_editable: false
146880+
name: RUM APM Flat Sampling
146881+
id: rum_apm_flat_sampling
146882+
type: permanent_retention_filters
146883+
schema:
146884+
$ref: "#/components/schemas/RumPermanentRetentionFiltersResponse"
146885+
description: OK
146886+
"403":
146887+
$ref: "#/components/responses/NotAuthorizedResponse"
146888+
"429":
146889+
$ref: "#/components/responses/TooManyRequestsResponse"
146890+
summary: Get all permanent RUM retention filters
146891+
tags:
146892+
- Rum Retention Filters
146893+
/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}:
146894+
get:
146895+
description: Get a permanent RUM retention filter for a RUM application by its identifier.
146896+
operationId: GetPermanentRetentionFilter
146897+
parameters:
146898+
- $ref: "#/components/parameters/RumApplicationIDParameter"
146899+
- $ref: "#/components/parameters/RumPermanentRetentionFilterIDParameter"
146900+
responses:
146901+
"200":
146902+
content:
146903+
application/json:
146904+
examples:
146905+
default:
146906+
value:
146907+
data:
146908+
attributes:
146909+
cross_product_sampling:
146910+
trace_enabled: true
146911+
trace_sample_rate: 75.0
146912+
description: RUM retains all Synthetics sessions.
146913+
editability:
146914+
trace_editable: true
146915+
name: Synthetics Sessions
146916+
id: synthetics_sessions
146917+
type: permanent_retention_filters
146918+
schema:
146919+
$ref: "#/components/schemas/RumPermanentRetentionFilterResponse"
146920+
description: OK
146921+
"403":
146922+
$ref: "#/components/responses/NotAuthorizedResponse"
146923+
"404":
146924+
$ref: "#/components/responses/NotFoundResponse"
146925+
"429":
146926+
$ref: "#/components/responses/TooManyRequestsResponse"
146927+
summary: Get a permanent RUM retention filter
146928+
tags:
146929+
- Rum Retention Filters
146930+
patch:
146931+
description: |-
146932+
Update the cross-product sampling configuration of a permanent RUM retention filter for a RUM application.
146933+
Only fields marked as editable in the `editability` block of the filter can be updated.
146934+
Updating a non-editable field returns a `400` response.
146935+
operationId: UpdatePermanentRetentionFilter
146936+
parameters:
146937+
- $ref: "#/components/parameters/RumApplicationIDParameter"
146938+
- $ref: "#/components/parameters/RumPermanentRetentionFilterIDParameter"
146939+
requestBody:
146940+
content:
146941+
application/json:
146942+
examples:
146943+
default:
146944+
value:
146945+
data:
146946+
attributes:
146947+
cross_product_sampling:
146948+
trace_enabled: true
146949+
trace_sample_rate: 50.0
146950+
id: synthetics_sessions
146951+
type: permanent_retention_filters
146952+
schema:
146953+
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateRequest"
146954+
description: New configuration of the permanent RUM retention filter.
146955+
required: true
146956+
responses:
146957+
"200":
146958+
content:
146959+
application/json:
146960+
examples:
146961+
default:
146962+
value:
146963+
data:
146964+
attributes:
146965+
cross_product_sampling:
146966+
trace_enabled: true
146967+
trace_sample_rate: 50.0
146968+
description: RUM retains all Synthetics sessions.
146969+
editability:
146970+
trace_editable: true
146971+
name: Synthetics Sessions
146972+
id: synthetics_sessions
146973+
type: permanent_retention_filters
146974+
schema:
146975+
$ref: "#/components/schemas/RumPermanentRetentionFilterResponse"
146976+
description: Updated
146977+
"400":
146978+
$ref: "#/components/responses/BadRequestResponse"
146979+
"403":
146980+
$ref: "#/components/responses/NotAuthorizedResponse"
146981+
"404":
146982+
$ref: "#/components/responses/NotFoundResponse"
146983+
"429":
146984+
$ref: "#/components/responses/TooManyRequestsResponse"
146985+
summary: Update a permanent RUM retention filter
146986+
tags:
146987+
- Rum Retention Filters
146988+
x-codegen-request-body-name: body
146735146989
/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}:
146736146990
delete:
146737146991
description: Delete a RUM retention filter for a RUM application.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Get a permanent RUM retention filter returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.RumRetentionFiltersApi;
6+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterID;
7+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterResponse;
8+
9+
public class Example {
10+
public static void main(String[] args) {
11+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
12+
RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient);
13+
14+
try {
15+
RumPermanentRetentionFilterResponse result =
16+
apiInstance.getPermanentRetentionFilter(
17+
"app_id", RumPermanentRetentionFilterID.SYNTHETICS_SESSIONS);
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println(
21+
"Exception when calling RumRetentionFiltersApi#getPermanentRetentionFilter");
22+
System.err.println("Status code: " + e.getCode());
23+
System.err.println("Reason: " + e.getResponseBody());
24+
System.err.println("Response headers: " + e.getResponseHeaders());
25+
e.printStackTrace();
26+
}
27+
}
28+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get all permanent RUM retention filters returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.RumRetentionFiltersApi;
6+
import com.datadog.api.client.v2.model.RumPermanentRetentionFiltersResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient);
12+
13+
try {
14+
RumPermanentRetentionFiltersResponse result =
15+
apiInstance.listPermanentRetentionFilters("app_id");
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println(
19+
"Exception when calling RumRetentionFiltersApi#listPermanentRetentionFilters");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Update a permanent RUM retention filter returns "Updated" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.RumRetentionFiltersApi;
6+
import com.datadog.api.client.v2.model.RumCrossProductSamplingUpdate;
7+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterID;
8+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterResponse;
9+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterType;
10+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterUpdateAttributes;
11+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterUpdateData;
12+
import com.datadog.api.client.v2.model.RumPermanentRetentionFilterUpdateRequest;
13+
14+
public class Example {
15+
public static void main(String[] args) {
16+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
17+
RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient);
18+
19+
RumPermanentRetentionFilterUpdateRequest body =
20+
new RumPermanentRetentionFilterUpdateRequest()
21+
.data(
22+
new RumPermanentRetentionFilterUpdateData()
23+
.attributes(
24+
new RumPermanentRetentionFilterUpdateAttributes()
25+
.crossProductSampling(
26+
new RumCrossProductSamplingUpdate()
27+
.traceEnabled(true)
28+
.traceSampleRate(25.0)))
29+
.id(RumPermanentRetentionFilterID.SYNTHETICS_SESSIONS)
30+
.type(RumPermanentRetentionFilterType.PERMANENT_RETENTION_FILTERS));
31+
32+
try {
33+
RumPermanentRetentionFilterResponse result =
34+
apiInstance.updatePermanentRetentionFilter(
35+
"app_id", RumPermanentRetentionFilterID.SYNTHETICS_SESSIONS, body);
36+
System.out.println(result);
37+
} catch (ApiException e) {
38+
System.err.println(
39+
"Exception when calling RumRetentionFiltersApi#updatePermanentRetentionFilter");
40+
System.err.println("Status code: " + e.getCode());
41+
System.err.println("Reason: " + e.getResponseBody());
42+
System.err.println("Response headers: " + e.getResponseHeaders());
43+
e.printStackTrace();
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)