diff --git a/.apigentools-info b/.apigentools-info index 271e4f3df6e..c6648ec6424 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2021-11-12 15:05:10.211771", - "spec_repo_commit": "c588c56" + "regenerated": "2021-11-12 16:34:44.905327", + "spec_repo_commit": "cbb6f12" }, "v2": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2021-11-12 15:05:10.240638", - "spec_repo_commit": "c588c56" + "regenerated": "2021-11-12 16:34:44.931401", + "spec_repo_commit": "cbb6f12" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e77cd85d4c5..09d066e7d61 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -12838,6 +12838,52 @@ components: $ref: '#/components/schemas/UsageRumSessionsHour' type: array type: object + UsageRumUnitsHour: + description: Number of RUM Units used for each hour for a given organization + (data available as of November 1, 2021). + properties: + browser_rum_lite_session_count: + description: Number of browser RUM lite sessions. + format: int64 + type: integer + browser_rum_replay_session_count: + description: Number of browser RUM replay sessions. + format: int64 + type: integer + browser_rum_units: + description: The number of browser RUM units. + format: int64 + type: integer + mobile_rum_lite_session_count: + description: Number of mobile RUM lite sessions. + format: int64 + type: integer + mobile_rum_units: + description: The number of mobile RUM units. + format: int64 + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + rum_units: + description: Total RUM units across mobile and browser RUM. + format: int64 + nullable: true + type: integer + type: object + UsageRumUnitsResponse: + description: Response containing the number of RUM Units for each hour for a + given organization. + properties: + usage: + description: Get hourly usage for RUM Units. + items: + $ref: '#/components/schemas/UsageRumUnitsHour' + type: array + type: object UsageSDSHour: description: Sensitive Data Scanner usage for a given organization for a given hour. @@ -13024,6 +13070,21 @@ components: current date for all organizations. format: int64 type: integer + browser_rum_lite_session_count_sum: + description: Shows the sum of all browser lite sessions over all hours in + the current date for all organizations. + format: int64 + type: integer + browser_rum_replay_session_count_sum: + description: Shows the sum of all browser replay sessions over all hours + in the current date for all organizations. + format: int64 + type: integer + browser_rum_units_sum: + description: Shows the sum of all browser RUM units over all hours in the + current date for all organizations. + format: int64 + type: integer container_avg: description: Shows the average of all distinct containers over all hours in the current date for all organizations. @@ -13128,6 +13189,11 @@ components: in the current date all organizations. format: int64 type: integer + mobile_rum_lite_session_count_sum: + description: Shows the sum of all mobile lite sessions over all hours in + the current date for all organizations. + format: int64 + type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. @@ -13143,6 +13209,11 @@ components: the current date for all organizations format: int64 type: integer + mobile_rum_units_sum: + description: Shows the sum of all mobile RUM units over all hours in the + current date for all organizations. + format: int64 + type: integer netflow_indexed_events_count_sum: description: Shows the sum of all Network flows indexed over all hours in the current date for all organizations. @@ -13179,6 +13250,11 @@ components: hours in the current date for all organizations. format: int64 type: integer + rum_units_sum: + description: Shows the sum of all browser and mobile RUM units over all + hours in the current date for all organizations. + format: int64 + type: integer sds_logs_scanned_bytes_sum: description: Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations. @@ -13265,6 +13341,21 @@ components: current date for the given org. format: int64 type: integer + browser_rum_lite_session_count_sum: + description: Shows the sum of all browser lite sessions over all hours in + the current date for the given org. + format: int64 + type: integer + browser_rum_replay_session_count_sum: + description: Shows the sum of all browser replay sessions over all hours + in the current date for the given org. + format: int64 + type: integer + browser_rum_units_sum: + description: Shows the sum of all browser RUM units over all hours in the + current date for the given org. + format: int64 + type: integer container_avg: description: Shows the average of all distinct containers over all hours in the current date for the given org. @@ -13307,12 +13398,12 @@ components: type: integer dbm_host_top99p_sum: description: Shows the 99th percentile of all Database Monitoring hosts - over all hours in the current month for all organizations. + over all hours in the current month for the given org. format: int64 type: integer dbm_queries_avg_sum: description: Shows the average of all distinct Database Monitoring normalized - queries over all hours in the current month for all organizations. + queries over all hours in the current month for the given org. format: int64 type: integer fargate_tasks_count_avg: @@ -13367,6 +13458,11 @@ components: in the current date for the given org. format: int64 type: integer + mobile_rum_lite_session_count_sum: + description: Shows the sum of all mobile lite sessions over all hours in + the current date for the given org. + format: int64 + type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. @@ -13382,6 +13478,11 @@ components: the current date for the given org. format: int64 type: integer + mobile_rum_units_sum: + description: Shows the sum of all mobile RUM units over all hours in the + current date for the given org. + format: int64 + type: integer name: description: The organization name. type: string @@ -13419,15 +13520,20 @@ components: hours in the current date for the given org. format: int64 type: integer + rum_units_sum: + description: Shows the sum of all browser and mobile RUM units over all + hours in the current date for the given org. + format: int64 + type: integer sds_logs_scanned_bytes_sum: description: Shows the sum of all bytes scanned of logs usage by the Sensitive - Data Scanner over all hours in the current month for all organizations. + Data Scanner over all hours in the current month for the given org. format: int64 type: integer sds_total_scanned_bytes_sum: description: Shows the sum of all bytes scanned across all usage types by - the Sensitive Data Scanner over all hours in the current month for all - organizations. + the Sensitive Data Scanner over all hours in the current month for the + given org. format: int64 type: integer synthetics_browser_check_calls_count_sum: @@ -13510,6 +13616,21 @@ components: current months for all organizations. format: int64 type: integer + browser_rum_lite_session_count_agg_sum: + description: Shows the sum of all browser lite sessions over all hours in + the current months for all organizations. + format: int64 + type: integer + browser_rum_replay_session_count_agg_sum: + description: Shows the sum of all browser replay sessions over all hours + in the current months for all organizations. + format: int64 + type: integer + browser_rum_units_agg_sum: + description: Shows the sum of all browser RUM units over all hours in the + current months for all organizations. + format: int64 + type: integer container_avg_sum: description: Shows the average of all distinct containers over all hours in the current months for all organizations. @@ -13635,6 +13756,11 @@ components: type: integer logs_by_retention: $ref: '#/components/schemas/LogsByRetention' + mobile_rum_lite_session_count_agg_sum: + description: Shows the sum of all mobile lite sessions over all hours in + the current months for all organizations. + format: int64 + type: integer mobile_rum_session_count_agg_sum: description: Shows the sum of all mobile RUM Sessions over all hours in the current months for all organizations. @@ -13650,6 +13776,11 @@ components: in the current months for all organizations. format: int64 type: integer + mobile_rum_units_agg_sum: + description: Shows the sum of all mobile RUM units over all hours in the + current months for all organizations. + format: int64 + type: integer netflow_indexed_events_count_agg_sum: description: Shows the sum of all Network flows indexed over all hours in the current months for all organizations. @@ -13698,6 +13829,11 @@ components: hours in the current months for all organizations. format: int64 type: integer + rum_units_agg_sum: + description: Shows the sum of all browser and mobile RUM units over all + hours in the current months for all organizations. + format: int64 + type: integer sds_logs_scanned_bytes_sum: description: Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations. @@ -24270,6 +24406,58 @@ paths: x-menu-order: 24 x-undo: type: safe + /api/v1/usage/rum: + get: + description: Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) + Units. + operationId: GetUsageRumUnits + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] + for usage beginning at this hour.' + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] + for usage ending **before** this hour.' + in: query + name: end_hr + required: false + schema: + format: date-time + type: string + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageRumUnitsResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage for RUM Units + tags: + - Usage Metering + x-menu-order: 35 + x-undo: + type: safe /api/v1/usage/rum_sessions: get: description: Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) diff --git a/docs/v1/UsageMeteringApi.md b/docs/v1/UsageMeteringApi.md index 387c91371a6..5827d801f66 100644 --- a/docs/v1/UsageMeteringApi.md +++ b/docs/v1/UsageMeteringApi.md @@ -29,6 +29,7 @@ All URIs are relative to *https://api.datadoghq.com* | [**getUsageNetworkHosts**](UsageMeteringApi.md#getUsageNetworkHosts) | **GET** /api/v1/usage/network_hosts | Get hourly usage for Network Hosts | | [**getUsageProfiling**](UsageMeteringApi.md#getUsageProfiling) | **GET** /api/v1/usage/profiling | Get hourly usage for profiled hosts | | [**getUsageRumSessions**](UsageMeteringApi.md#getUsageRumSessions) | **GET** /api/v1/usage/rum_sessions | Get hourly usage for RUM Sessions | +| [**getUsageRumUnits**](UsageMeteringApi.md#getUsageRumUnits) | **GET** /api/v1/usage/rum | Get hourly usage for RUM Units | | [**getUsageSDS**](UsageMeteringApi.md#getUsageSDS) | **GET** /api/v1/usage/sds | Get hourly usage for Sensitive Data Scanner | | [**getUsageSNMP**](UsageMeteringApi.md#getUsageSNMP) | **GET** /api/v1/usage/snmp | Get hourly usage for SNMP devices | | [**getUsageSummary**](UsageMeteringApi.md#getUsageSummary) | **GET** /api/v1/usage/summary | Get usage across your multi-org account | @@ -1607,6 +1608,68 @@ apiInstance [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +## **getUsageRumUnits** + +> UsageRumUnitsResponse getUsageRumUnits() + +Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) Units. + +### Example + +```typescript +import { v1 } from "@datadog/datadog-api-client"; +import * as fs from "fs"; + +const configuration = v1.createConfiguration(); +const apiInstance = new v1.UsageMeteringApi(configuration); + +let params: v1.UsageMeteringApiGetUsageRumUnitsRequest = { + // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. + startHr: new Date("1970-01-01T00:00:00.00Z"), + // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional) + endHr: new Date("1970-01-01T00:00:00.00Z"), +}; + +apiInstance + .getUsageRumUnits(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); +``` + +### Parameters + +| Name | Type | Description | Notes | +| ----------- | ---------- | --------------------------------------------------------------------------------------------------------- | -------------------------------- | +| **startHr** | [**Date**] | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. | defaults to undefined | +| **endHr** | [**Date**] | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. | (optional) defaults to undefined | + +### Return type + +**UsageRumUnitsResponse** + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json;datetime-format=rfc3339 + +### HTTP response details + +| Status code | Description | Response headers | +| ----------- | ---------------------------------- | ---------------- | +| **200** | OK | - | +| **400** | Bad Request | - | +| **403** | Forbidden - User is not authorized | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + ## **getUsageSDS** > UsageSDSResponse getUsageSDS() diff --git a/features/v1/undo.json b/features/v1/undo.json index 3c1f0f602bd..350be838950 100644 --- a/features/v1/undo.json +++ b/features/v1/undo.json @@ -1267,6 +1267,12 @@ "type": "safe" } }, + "GetUsageRumUnits": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "GetUsageRumSessions": { "tag": "Usage Metering", "undo": { diff --git a/features/v1/usage_metering.feature b/features/v1/usage_metering.feature index a365fffbd76..e9c59352b4d 100644 --- a/features/v1/usage_metering.feature +++ b/features/v1/usage_metering.feature @@ -187,6 +187,18 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK + @generated @skip + Scenario: Get hourly usage for RUM Units returns "Bad Request" response + Given new "GetUsageRumUnits" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip + Scenario: Get hourly usage for RUM Units returns "OK" response + Given new "GetUsageRumUnits" request + When the request is sent + Then the response status is 200 OK + @generated @skip Scenario: Get hourly usage for SNMP devices returns "Bad Request" response Given new "GetUsageSNMP" request diff --git a/packages/datadog-api-client-v1/.openapi-generator/FILES b/packages/datadog-api-client-v1/.openapi-generator/FILES index 8c8e97b90f2..668737b743c 100644 --- a/packages/datadog-api-client-v1/.openapi-generator/FILES +++ b/packages/datadog-api-client-v1/.openapi-generator/FILES @@ -625,6 +625,8 @@ models/UsageProfilingResponse.ts models/UsageReportsType.ts models/UsageRumSessionsHour.ts models/UsageRumSessionsResponse.ts +models/UsageRumUnitsHour.ts +models/UsageRumUnitsResponse.ts models/UsageSDSHour.ts models/UsageSDSResponse.ts models/UsageSNMPHour.ts diff --git a/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts b/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts index 505619e3880..4bb7417b727 100644 --- a/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts +++ b/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts @@ -31,6 +31,7 @@ import { UsageNetworkFlowsResponse } from "../models/UsageNetworkFlowsResponse"; import { UsageNetworkHostsResponse } from "../models/UsageNetworkHostsResponse"; import { UsageProfilingResponse } from "../models/UsageProfilingResponse"; import { UsageRumSessionsResponse } from "../models/UsageRumSessionsResponse"; +import { UsageRumUnitsResponse } from "../models/UsageRumUnitsResponse"; import { UsageSDSResponse } from "../models/UsageSDSResponse"; import { UsageSNMPResponse } from "../models/UsageSNMPResponse"; import { UsageSort } from "../models/UsageSort"; @@ -1822,6 +1823,77 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) Units. + * Get hourly usage for RUM Units + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + */ + public async getUsageRumUnits( + startHr: Date, + endHr?: Date, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'startHr' is not null or undefined + if (startHr === null || startHr === undefined) { + throw new RequiredError( + "Required parameter startHr was null or undefined when calling getUsageRumUnits." + ); + } + + // Path Params + const localVarPath = "/api/v1/usage/rum"; + + // Make Request Context + const requestContext = getServer( + _config, + "UsageMeteringApi.getUsageRumUnits" + ).makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (startHr !== undefined) { + requestContext.setQueryParam( + "start_hr", + ObjectSerializer.serialize(startHr, "Date", "date-time") + ); + } + if (endHr !== undefined) { + requestContext.setQueryParam( + "end_hr", + ObjectSerializer.serialize(endHr, "Date", "date-time") + ); + } + + // Header Params + + // Form Params + + // Body Params + + let authMethod = null; + // Apply auth methods + authMethod = _config.authMethods["AuthZ"]; + if (authMethod) { + await authMethod.applySecurityAuthentication(requestContext); + } + // Apply auth methods + authMethod = _config.authMethods["apiKeyAuth"]; + if (authMethod) { + await authMethod.applySecurityAuthentication(requestContext); + } + // Apply auth methods + authMethod = _config.authMethods["appKeyAuth"]; + if (authMethod) { + await authMethod.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Get hourly usage for Sensitive Data Scanner. * Get hourly usage for Sensitive Data Scanner @@ -3779,6 +3851,61 @@ export class UsageMeteringApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getUsageRumUnits + * @throws ApiException if the response code was not in [200, 299] + */ + public async getUsageRumUnits( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: UsageRumUnitsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UsageRumUnitsResponse", + "" + ) as UsageRumUnitsResponse; + return body; + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(400, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIErrorResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIErrorResponse", + "" + ) as APIErrorResponse; + throw new ApiException(403, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: UsageRumUnitsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "UsageRumUnitsResponse", + "" + ) as UsageRumUnitsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/packages/datadog-api-client-v1/index.ts b/packages/datadog-api-client-v1/index.ts index e1c2b6f171b..438ef21e71c 100644 --- a/packages/datadog-api-client-v1/index.ts +++ b/packages/datadog-api-client-v1/index.ts @@ -200,6 +200,7 @@ export { UsageMeteringApiGetUsageNetworkHostsRequest, UsageMeteringApiGetUsageProfilingRequest, UsageMeteringApiGetUsageRumSessionsRequest, + UsageMeteringApiGetUsageRumUnitsRequest, UsageMeteringApiGetUsageSDSRequest, UsageMeteringApiGetUsageSNMPRequest, UsageMeteringApiGetUsageSummaryRequest, diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index eeee710e9ba..b60438e628f 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -420,6 +420,8 @@ import { UsageProfilingHour } from "./UsageProfilingHour"; import { UsageProfilingResponse } from "./UsageProfilingResponse"; import { UsageRumSessionsHour } from "./UsageRumSessionsHour"; import { UsageRumSessionsResponse } from "./UsageRumSessionsResponse"; +import { UsageRumUnitsHour } from "./UsageRumUnitsHour"; +import { UsageRumUnitsResponse } from "./UsageRumUnitsResponse"; import { UsageSDSHour } from "./UsageSDSHour"; import { UsageSDSResponse } from "./UsageSDSResponse"; import { UsageSNMPHour } from "./UsageSNMPHour"; @@ -1436,6 +1438,8 @@ const typeMap: { [index: string]: any } = { UsageProfilingResponse: UsageProfilingResponse, UsageRumSessionsHour: UsageRumSessionsHour, UsageRumSessionsResponse: UsageRumSessionsResponse, + UsageRumUnitsHour: UsageRumUnitsHour, + UsageRumUnitsResponse: UsageRumUnitsResponse, UsageSDSHour: UsageSDSHour, UsageSDSResponse: UsageSDSResponse, UsageSNMPHour: UsageSNMPHour, diff --git a/packages/datadog-api-client-v1/models/UsageRumUnitsHour.ts b/packages/datadog-api-client-v1/models/UsageRumUnitsHour.ts new file mode 100644 index 00000000000..2be177526c9 --- /dev/null +++ b/packages/datadog-api-client-v1/models/UsageRumUnitsHour.ts @@ -0,0 +1,106 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class UsageRumUnitsHour { + /** + * Number of browser RUM lite sessions. + */ + "browserRumLiteSessionCount"?: number; + /** + * Number of browser RUM replay sessions. + */ + "browserRumReplaySessionCount"?: number; + /** + * The number of browser RUM units. + */ + "browserRumUnits"?: number; + /** + * Number of mobile RUM lite sessions. + */ + "mobileRumLiteSessionCount"?: number; + /** + * The number of mobile RUM units. + */ + "mobileRumUnits"?: number; + /** + * The organization name. + */ + "orgName"?: string; + /** + * The organization public ID. + */ + "publicId"?: string; + /** + * Total RUM units across mobile and browser RUM. + */ + "rumUnits"?: number; + + "unparsedObject"?: any; + + static readonly attributeTypeMap: { + [key: string]: { + baseName: string; + type: string; + required?: boolean; + format?: string; + }; + } = { + browserRumLiteSessionCount: { + baseName: "browser_rum_lite_session_count", + type: "number", + + format: "int64", + }, + browserRumReplaySessionCount: { + baseName: "browser_rum_replay_session_count", + type: "number", + + format: "int64", + }, + browserRumUnits: { + baseName: "browser_rum_units", + type: "number", + + format: "int64", + }, + mobileRumLiteSessionCount: { + baseName: "mobile_rum_lite_session_count", + type: "number", + + format: "int64", + }, + mobileRumUnits: { + baseName: "mobile_rum_units", + type: "number", + + format: "int64", + }, + orgName: { + baseName: "org_name", + type: "string", + }, + publicId: { + baseName: "public_id", + type: "string", + }, + rumUnits: { + baseName: "rum_units", + type: "number", + + format: "int64", + }, + }; + + static getAttributeTypeMap() { + return UsageRumUnitsHour.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v1/models/UsageRumUnitsResponse.ts b/packages/datadog-api-client-v1/models/UsageRumUnitsResponse.ts new file mode 100644 index 00000000000..eca68817474 --- /dev/null +++ b/packages/datadog-api-client-v1/models/UsageRumUnitsResponse.ts @@ -0,0 +1,40 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { UsageRumUnitsHour } from "./UsageRumUnitsHour"; + +export class UsageRumUnitsResponse { + /** + * Get hourly usage for RUM Units. + */ + "usage"?: Array; + + "unparsedObject"?: any; + + static readonly attributeTypeMap: { + [key: string]: { + baseName: string; + type: string; + required?: boolean; + format?: string; + }; + } = { + usage: { + baseName: "usage", + type: "Array", + }, + }; + + static getAttributeTypeMap() { + return UsageRumUnitsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v1/models/UsageSummaryDate.ts b/packages/datadog-api-client-v1/models/UsageSummaryDate.ts index e45e6614b8f..9834b1a2777 100644 --- a/packages/datadog-api-client-v1/models/UsageSummaryDate.ts +++ b/packages/datadog-api-client-v1/models/UsageSummaryDate.ts @@ -47,6 +47,18 @@ export class UsageSummaryDate { * Shows the sum of all log bytes ingested over all hours in the current date for all organizations. */ "billableIngestedBytesSum"?: number; + /** + * Shows the sum of all browser lite sessions over all hours in the current date for all organizations. + */ + "browserRumLiteSessionCountSum"?: number; + /** + * Shows the sum of all browser replay sessions over all hours in the current date for all organizations. + */ + "browserRumReplaySessionCountSum"?: number; + /** + * Shows the sum of all browser RUM units over all hours in the current date for all organizations. + */ + "browserRumUnitsSum"?: number; /** * Shows the average of all distinct containers over all hours in the current date for all organizations. */ @@ -131,6 +143,10 @@ export class UsageSummaryDate { * Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. */ "iotDeviceTop99p"?: number; + /** + * Shows the sum of all mobile lite sessions over all hours in the current date for all organizations. + */ + "mobileRumLiteSessionCountSum"?: number; /** * Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. */ @@ -143,6 +159,10 @@ export class UsageSummaryDate { * Shows the sum of all mobile RUM Sessions over all hours in the current date for all organizations */ "mobileRumSessionCountSum"?: number; + /** + * Shows the sum of all mobile RUM units over all hours in the current date for all organizations. + */ + "mobileRumUnitsSum"?: number; /** * Shows the sum of all Network flows indexed over all hours in the current date for all organizations. */ @@ -171,6 +191,10 @@ export class UsageSummaryDate { * Shows the sum of RUM Sessions (browser and mobile) over all hours in the current date for all organizations. */ "rumTotalSessionCountSum"?: number; + /** + * Shows the sum of all browser and mobile RUM units over all hours in the current date for all organizations. + */ + "rumUnitsSum"?: number; /** * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations. */ @@ -264,6 +288,24 @@ export class UsageSummaryDate { format: "int64", }, + browserRumLiteSessionCountSum: { + baseName: "browser_rum_lite_session_count_sum", + type: "number", + + format: "int64", + }, + browserRumReplaySessionCountSum: { + baseName: "browser_rum_replay_session_count_sum", + type: "number", + + format: "int64", + }, + browserRumUnitsSum: { + baseName: "browser_rum_units_sum", + type: "number", + + format: "int64", + }, containerAvg: { baseName: "container_avg", type: "number", @@ -390,6 +432,12 @@ export class UsageSummaryDate { format: "int64", }, + mobileRumLiteSessionCountSum: { + baseName: "mobile_rum_lite_session_count_sum", + type: "number", + + format: "int64", + }, mobileRumSessionCountAndroidSum: { baseName: "mobile_rum_session_count_android_sum", type: "number", @@ -408,6 +456,12 @@ export class UsageSummaryDate { format: "int64", }, + mobileRumUnitsSum: { + baseName: "mobile_rum_units_sum", + type: "number", + + format: "int64", + }, netflowIndexedEventsCountSum: { baseName: "netflow_indexed_events_count_sum", type: "number", @@ -448,6 +502,12 @@ export class UsageSummaryDate { format: "int64", }, + rumUnitsSum: { + baseName: "rum_units_sum", + type: "number", + + format: "int64", + }, sdsLogsScannedBytesSum: { baseName: "sds_logs_scanned_bytes_sum", type: "number", diff --git a/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts b/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts index 78a0f4649b8..89f75088e4d 100644 --- a/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts +++ b/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts @@ -45,6 +45,18 @@ export class UsageSummaryDateOrg { * Shows the sum of all log bytes ingested over all hours in the current date for the given org. */ "billableIngestedBytesSum"?: number; + /** + * Shows the sum of all browser lite sessions over all hours in the current date for the given org. + */ + "browserRumLiteSessionCountSum"?: number; + /** + * Shows the sum of all browser replay sessions over all hours in the current date for the given org. + */ + "browserRumReplaySessionCountSum"?: number; + /** + * Shows the sum of all browser RUM units over all hours in the current date for the given org. + */ + "browserRumUnitsSum"?: number; /** * Shows the average of all distinct containers over all hours in the current date for the given org. */ @@ -78,11 +90,11 @@ export class UsageSummaryDateOrg { */ "cwsHostTop99p"?: number; /** - * Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for all organizations. + * Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for the given org. */ "dbmHostTop99pSum"?: number; /** - * Shows the average of all distinct Database Monitoring normalized queries over all hours in the current month for all organizations. + * Shows the average of all distinct Database Monitoring normalized queries over all hours in the current month for the given org. */ "dbmQueriesAvgSum"?: number; /** @@ -129,6 +141,10 @@ export class UsageSummaryDateOrg { * Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. */ "iotDeviceTop99pSum"?: number; + /** + * Shows the sum of all mobile lite sessions over all hours in the current date for the given org. + */ + "mobileRumLiteSessionCountSum"?: number; /** * Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. */ @@ -141,6 +157,10 @@ export class UsageSummaryDateOrg { * Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org. */ "mobileRumSessionCountSum"?: number; + /** + * Shows the sum of all mobile RUM units over all hours in the current date for the given org. + */ + "mobileRumUnitsSum"?: number; /** * The organization name. */ @@ -174,11 +194,15 @@ export class UsageSummaryDateOrg { */ "rumTotalSessionCountSum"?: number; /** - * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations. + * Shows the sum of all browser and mobile RUM units over all hours in the current date for the given org. + */ + "rumUnitsSum"?: number; + /** + * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for the given org. */ "sdsLogsScannedBytesSum"?: number; /** - * Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for all organizations. + * Shows the sum of all bytes scanned across all usage types by the Sensitive Data Scanner over all hours in the current month for the given org. */ "sdsTotalScannedBytesSum"?: number; /** @@ -266,6 +290,24 @@ export class UsageSummaryDateOrg { format: "int64", }, + browserRumLiteSessionCountSum: { + baseName: "browser_rum_lite_session_count_sum", + type: "number", + + format: "int64", + }, + browserRumReplaySessionCountSum: { + baseName: "browser_rum_replay_session_count_sum", + type: "number", + + format: "int64", + }, + browserRumUnitsSum: { + baseName: "browser_rum_units_sum", + type: "number", + + format: "int64", + }, containerAvg: { baseName: "container_avg", type: "number", @@ -390,6 +432,12 @@ export class UsageSummaryDateOrg { format: "int64", }, + mobileRumLiteSessionCountSum: { + baseName: "mobile_rum_lite_session_count_sum", + type: "number", + + format: "int64", + }, mobileRumSessionCountAndroidSum: { baseName: "mobile_rum_session_count_android_sum", type: "number", @@ -408,6 +456,12 @@ export class UsageSummaryDateOrg { format: "int64", }, + mobileRumUnitsSum: { + baseName: "mobile_rum_units_sum", + type: "number", + + format: "int64", + }, name: { baseName: "name", type: "string", @@ -452,6 +506,12 @@ export class UsageSummaryDateOrg { format: "int64", }, + rumUnitsSum: { + baseName: "rum_units_sum", + type: "number", + + format: "int64", + }, sdsLogsScannedBytesSum: { baseName: "sds_logs_scanned_bytes_sum", type: "number", diff --git a/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts b/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts index 3722564f2ac..477d710bf94 100644 --- a/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts +++ b/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts @@ -52,6 +52,18 @@ export class UsageSummaryResponse { * Shows the sum of all log bytes ingested over all hours in the current months for all organizations. */ "billableIngestedBytesAggSum"?: number; + /** + * Shows the sum of all browser lite sessions over all hours in the current months for all organizations. + */ + "browserRumLiteSessionCountAggSum"?: number; + /** + * Shows the sum of all browser replay sessions over all hours in the current months for all organizations. + */ + "browserRumReplaySessionCountAggSum"?: number; + /** + * Shows the sum of all browser RUM units over all hours in the current months for all organizations. + */ + "browserRumUnitsAggSum"?: number; /** * Shows the average of all distinct containers over all hours in the current months for all organizations. */ @@ -149,6 +161,10 @@ export class UsageSummaryResponse { */ "liveIngestedBytesAggSum"?: number; "logsByRetention"?: LogsByRetention; + /** + * Shows the sum of all mobile lite sessions over all hours in the current months for all organizations. + */ + "mobileRumLiteSessionCountAggSum"?: number; /** * Shows the sum of all mobile RUM Sessions over all hours in the current months for all organizations. */ @@ -161,6 +177,10 @@ export class UsageSummaryResponse { * Shows the sum of all mobile RUM Sessions on iOS over all hours in the current months for all organizations. */ "mobileRumSessionCountIosAggSum"?: number; + /** + * Shows the sum of all mobile RUM units over all hours in the current months for all organizations. + */ + "mobileRumUnitsAggSum"?: number; /** * Shows the sum of all Network flows indexed over all hours in the current months for all organizations. */ @@ -197,6 +217,10 @@ export class UsageSummaryResponse { * Shows the sum of RUM Sessions (browser and mobile) over all hours in the current months for all organizations. */ "rumTotalSessionCountAggSum"?: number; + /** + * Shows the sum of all browser and mobile RUM units over all hours in the current months for all organizations. + */ + "rumUnitsAggSum"?: number; /** * Shows the sum of all bytes scanned of logs usage by the Sensitive Data Scanner over all hours in the current month for all organizations. */ @@ -304,6 +328,24 @@ export class UsageSummaryResponse { format: "int64", }, + browserRumLiteSessionCountAggSum: { + baseName: "browser_rum_lite_session_count_agg_sum", + type: "number", + + format: "int64", + }, + browserRumReplaySessionCountAggSum: { + baseName: "browser_rum_replay_session_count_agg_sum", + type: "number", + + format: "int64", + }, + browserRumUnitsAggSum: { + baseName: "browser_rum_units_agg_sum", + type: "number", + + format: "int64", + }, containerAvgSum: { baseName: "container_avg_sum", type: "number", @@ -452,6 +494,12 @@ export class UsageSummaryResponse { baseName: "logs_by_retention", type: "LogsByRetention", }, + mobileRumLiteSessionCountAggSum: { + baseName: "mobile_rum_lite_session_count_agg_sum", + type: "number", + + format: "int64", + }, mobileRumSessionCountAggSum: { baseName: "mobile_rum_session_count_agg_sum", type: "number", @@ -470,6 +518,12 @@ export class UsageSummaryResponse { format: "int64", }, + mobileRumUnitsAggSum: { + baseName: "mobile_rum_units_agg_sum", + type: "number", + + format: "int64", + }, netflowIndexedEventsCountAggSum: { baseName: "netflow_indexed_events_count_agg_sum", type: "number", @@ -524,6 +578,12 @@ export class UsageSummaryResponse { format: "int64", }, + rumUnitsAggSum: { + baseName: "rum_units_agg_sum", + type: "number", + + format: "int64", + }, sdsLogsScannedBytesSum: { baseName: "sds_logs_scanned_bytes_sum", type: "number", diff --git a/packages/datadog-api-client-v1/types/ObjectParamAPI.ts b/packages/datadog-api-client-v1/types/ObjectParamAPI.ts index 8f3a2740de4..9f0c57f6448 100644 --- a/packages/datadog-api-client-v1/types/ObjectParamAPI.ts +++ b/packages/datadog-api-client-v1/types/ObjectParamAPI.ts @@ -140,6 +140,7 @@ import { UsageNetworkFlowsResponse } from "../models/UsageNetworkFlowsResponse"; import { UsageNetworkHostsResponse } from "../models/UsageNetworkHostsResponse"; import { UsageProfilingResponse } from "../models/UsageProfilingResponse"; import { UsageRumSessionsResponse } from "../models/UsageRumSessionsResponse"; +import { UsageRumUnitsResponse } from "../models/UsageRumUnitsResponse"; import { UsageSDSResponse } from "../models/UsageSDSResponse"; import { UsageSNMPResponse } from "../models/UsageSNMPResponse"; import { UsageSort } from "../models/UsageSort"; @@ -5146,6 +5147,21 @@ export interface UsageMeteringApiGetUsageRumSessionsRequest { type?: string; } +export interface UsageMeteringApiGetUsageRumUnitsRequest { + /** + * Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. + * @type Date + * @memberof UsageMeteringApigetUsageRumUnits + */ + startHr: Date; + /** + * Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + * @type Date + * @memberof UsageMeteringApigetUsageRumUnits + */ + endHr?: Date; +} + export interface UsageMeteringApiGetUsageSDSRequest { /** * Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. @@ -5677,6 +5693,20 @@ export class ObjectUsageMeteringApi { .toPromise(); } + /** + * Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) Units. + * Get hourly usage for RUM Units + * @param param the request object + */ + public getUsageRumUnits( + param: UsageMeteringApiGetUsageRumUnitsRequest, + options?: Configuration + ): Promise { + return this.api + .getUsageRumUnits(param.startHr, param.endHr, options) + .toPromise(); + } + /** * Get hourly usage for Sensitive Data Scanner. * Get hourly usage for Sensitive Data Scanner diff --git a/packages/datadog-api-client-v1/types/ObservableAPI.ts b/packages/datadog-api-client-v1/types/ObservableAPI.ts index 3b76b7a0f76..fdf4817d370 100644 --- a/packages/datadog-api-client-v1/types/ObservableAPI.ts +++ b/packages/datadog-api-client-v1/types/ObservableAPI.ts @@ -141,6 +141,7 @@ import { UsageNetworkFlowsResponse } from "../models/UsageNetworkFlowsResponse"; import { UsageNetworkHostsResponse } from "../models/UsageNetworkHostsResponse"; import { UsageProfilingResponse } from "../models/UsageProfilingResponse"; import { UsageRumSessionsResponse } from "../models/UsageRumSessionsResponse"; +import { UsageRumUnitsResponse } from "../models/UsageRumUnitsResponse"; import { UsageSDSResponse } from "../models/UsageSDSResponse"; import { UsageSNMPResponse } from "../models/UsageSNMPResponse"; import { UsageSort } from "../models/UsageSort"; @@ -8768,6 +8769,51 @@ export class ObservableUsageMeteringApi { }) ); } + /** + * Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) Units. + * Get hourly usage for RUM Units + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + */ + public getUsageRumUnits( + startHr: Date, + endHr?: Date, + _options?: Configuration + ): Observable { + const requestContextPromise = this.requestFactory.getUsageRumUnits( + startHr, + endHr, + _options + ); + + // build promise chain + let middlewarePreObservable = from_(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe( + mergeMap((ctx: RequestContext) => middleware.pre(ctx)) + ); + } + + return middlewarePreObservable + .pipe( + mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx)) + ) + .pipe( + mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe( + mergeMap((rsp: ResponseContext) => middleware.post(rsp)) + ); + } + return middlewarePostObservable.pipe( + map((rsp: ResponseContext) => + this.responseProcessor.getUsageRumUnits(rsp) + ) + ); + }) + ); + } /** * Get hourly usage for Sensitive Data Scanner. * Get hourly usage for Sensitive Data Scanner diff --git a/packages/datadog-api-client-v1/types/PromiseAPI.ts b/packages/datadog-api-client-v1/types/PromiseAPI.ts index 59fb3fdf1d3..cbb7dff40fd 100644 --- a/packages/datadog-api-client-v1/types/PromiseAPI.ts +++ b/packages/datadog-api-client-v1/types/PromiseAPI.ts @@ -140,6 +140,7 @@ import { UsageNetworkFlowsResponse } from "../models/UsageNetworkFlowsResponse"; import { UsageNetworkHostsResponse } from "../models/UsageNetworkHostsResponse"; import { UsageProfilingResponse } from "../models/UsageProfilingResponse"; import { UsageRumSessionsResponse } from "../models/UsageRumSessionsResponse"; +import { UsageRumUnitsResponse } from "../models/UsageRumUnitsResponse"; import { UsageSDSResponse } from "../models/UsageSDSResponse"; import { UsageSNMPResponse } from "../models/UsageSNMPResponse"; import { UsageSort } from "../models/UsageSort"; @@ -3544,6 +3545,21 @@ export class PromiseUsageMeteringApi { return result.toPromise(); } + /** + * Get hourly usage for [RUM](https://docs.datadoghq.com/real_user_monitoring/) Units. + * Get hourly usage for RUM Units + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. + */ + public getUsageRumUnits( + startHr: Date, + endHr?: Date, + _options?: Configuration + ): Promise { + const result = this.api.getUsageRumUnits(startHr, endHr, _options); + return result.toPromise(); + } + /** * Get hourly usage for Sensitive Data Scanner. * Get hourly usage for Sensitive Data Scanner