diff --git a/.apigentools-info b/.apigentools-info index 8fd2082b5e59..fdc3ded1dcd3 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-31 17:39:57.837620", - "spec_repo_commit": "3826157e" + "regenerated": "2025-04-01 20:56:02.087355", + "spec_repo_commit": "f629f10b" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-31 17:39:57.854596", - "spec_repo_commit": "3826157e" + "regenerated": "2025-04-01 20:56:02.103559", + "spec_repo_commit": "f629f10b" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4aacf7eab58b..d99088e0a321 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30188,6 +30188,125 @@ components: description: Link to the Incident created on ServiceNow type: string type: object + SingleAggregatedConnectionResponseArray: + description: The definition of `SingleAggregatedConnectionResponseArray` object. + example: + data: + - attributes: + bytes_sent_by_client: 100 + bytes_sent_by_server: 200 + group_bys: + client_team: + - networks + server_service: + - hucklebuck + packets_sent_by_client: 10 + packets_sent_by_server: 20 + rtt_micro_seconds: 800 + tcp_closed_connections: 30 + tcp_established_connections: 40 + tcp_refusals: 7 + tcp_resets: 5 + tcp_retransmits: 30 + tcp_timeouts: 6 + id: client_team:networks, server_service:hucklebuck + type: aggregated_connection + properties: + data: + description: The `SingleAggregatedConnectionResponseArray` `data`. + items: + $ref: '#/components/schemas/SingleAggregatedConnectionResponseData' + type: array + type: object + SingleAggregatedConnectionResponseData: + description: The definition of `SingleAggregatedConnectionResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/SingleAggregatedConnectionResponseDataAttributes' + id: + description: The `SingleAggregatedConnectionResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/SingleAggregatedConnectionResponseDataType' + type: object + SingleAggregatedConnectionResponseDataAttributes: + description: The definition of `SingleAggregatedConnectionResponseDataAttributes` + object. + properties: + bytes_sent_by_client: + description: The total number of bytes sent by the client over the given + period. + format: int64 + type: integer + bytes_sent_by_server: + description: The total number of bytes sent by the server over the given + period. + format: int64 + type: integer + group_bys: + additionalProperties: + items: + type: string + type: array + description: The `attributes` `group_bys`. + type: object + packets_sent_by_client: + description: The total number of packets sent by the client over the given + period. + format: int64 + type: integer + packets_sent_by_server: + description: The total number of packets sent by the server over the given + period. + format: int64 + type: integer + rtt_micro_seconds: + description: Measured as TCP smoothed roundtrip time in microseconds (the + time between a TCP frame being sent and acknowledged). + format: int64 + type: integer + tcp_closed_connections: + description: The number of TCP connections in a closed state. Measured in + connections per second from the client. + format: int64 + type: integer + tcp_established_connections: + description: The number of TCP connections in an established state. Measured + in connections per second from the client. + format: int64 + type: integer + tcp_refusals: + description: The number of TCP connections that were refused by the server. + Typically this indicates an attempt to connect to an IP/port that is not + receiving connections, or a firewall/security misconfiguration. + format: int64 + type: integer + tcp_resets: + description: The number of TCP connections that were reset by the server. + format: int64 + type: integer + tcp_retransmits: + description: TCP Retransmits represent detected failures that are retransmitted + to ensure delivery. Measured in count of retransmits from the client. + format: int64 + type: integer + tcp_timeouts: + description: The number of TCP connections that timed out from the perspective + of the operating system. This can indicate general connectivity and latency + issues. + format: int64 + type: integer + type: object + SingleAggregatedConnectionResponseDataType: + default: aggregated_connection + description: 'Aggregated connection resource type. Allowed enum values: `aggregated_connection`. + + default: `aggregated_connection`' + enum: + - aggregated_connection + type: string + x-enum-varnames: + - AGGREGATED_CONNECTION SlackIntegrationMetadata: description: Incident integration metadata for the Slack integration. properties: @@ -44282,6 +44401,68 @@ paths: summary: Update the tags for a device tags: - Network Device Monitoring + /api/v2/network/connections/aggregate: + get: + description: Get aggregated connections + operationId: GetAggregatedConnections + parameters: + - description: Unix timestamp (number of seconds since epoch) of the start of + the query window. If not provided, the start of the query window is 15 minutes + before the "to" timestamp. If neither "from" nor "to" are provided, the + query window is [now - 15m, now]. + in: query + name: from + schema: + format: int64 + type: integer + - description: Unix timestamp (number of seconds since epoch) of the end of + the query window. If not provided, the end of the query window is the current + time. If neither "from" nor "to" are provided, the query window is [now + - 15m, now]. + in: query + name: to + schema: + format: int64 + type: integer + - description: Comma-separated list of fields to group connections by. + in: query + name: group_by + schema: + type: string + - description: Comma-separated list of tags to filter connections by. + in: query + name: tags + schema: + type: string + - description: The number of connections to be returned. The maximum value is + 5000. + in: query + name: limit + schema: + default: 100 + format: int32 + maximum: 5000 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SingleAggregatedConnectionResponseArray' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get aggregated connections + tags: + - Cloud Network Monitoring + x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/). + + type: safe' /api/v2/org_configs: get: description: Returns all Org Configs (name, description, and value). @@ -53624,6 +53805,10 @@ tags: and the `cloud_cost` data source. For more information, see the [Cloud Cost Management documentation](https://docs.datadoghq.com/cloud_cost_management/). name: Cloud Cost Management +- description: The Cloud Network Monitoring API allows you to fetch aggregated connections + and their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/) + for more information. + name: Cloud Network Monitoring - description: Manage your Datadog Cloudflare integration directly through the Datadog API. See the [Cloudflare integration page](https://docs.datadoghq.com/integrations/cloudflare/) for more information. diff --git a/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-aggregated-connections-returns-OK-response_2723470451/frozen.json b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-aggregated-connections-returns-OK-response_2723470451/frozen.json new file mode 100644 index 000000000000..d59144bf7d17 --- /dev/null +++ b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-aggregated-connections-returns-OK-response_2723470451/frozen.json @@ -0,0 +1 @@ +"2025-03-31T18:18:50.338Z" diff --git a/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-aggregated-connections-returns-OK-response_2723470451/recording.har b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-aggregated-connections-returns-OK-response_2723470451/recording.har new file mode 100644 index 000000000000..0d9d884f1a38 --- /dev/null +++ b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-aggregated-connections-returns-OK-response_2723470451/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Cloud Network Monitoring/Get aggregated connections returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "e6fa1daa1a1481fceb36e24e11462296", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 534, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/network/connections/aggregate" + }, + "response": { + "bodySize": 11, + "content": { + "mimeType": "application/vnd.api+json", + "size": 11, + "text": "{\"data\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-03-31T18:18:50.572Z", + "time": 191 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-all-aggregated-connections-returns-Bad-Request-response_1807646528/frozen.json b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-all-aggregated-connections-returns-Bad-Request-response_1807646528/frozen.json new file mode 100644 index 000000000000..87d2656f0d47 --- /dev/null +++ b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-all-aggregated-connections-returns-Bad-Request-response_1807646528/frozen.json @@ -0,0 +1 @@ +"2025-03-31T18:18:50.770Z" diff --git a/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-all-aggregated-connections-returns-Bad-Request-response_1807646528/recording.har b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-all-aggregated-connections-returns-Bad-Request-response_1807646528/recording.har new file mode 100644 index 000000000000..1238b3d53422 --- /dev/null +++ b/cassettes/v2/Cloud-Network-Monitoring_160794674/Get-all-aggregated-connections-returns-Bad-Request-response_1807646528/recording.har @@ -0,0 +1,62 @@ +{ + "log": { + "_recordingName": "Cloud Network Monitoring/Get all aggregated connections returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7d2e124612863aeb3175ac7aac0c7e6c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 545, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "limit", + "value": "6000" + } + ], + "url": "https://api.datadoghq.com/api/v2/network/connections/aggregate?limit=6000" + }, + "response": { + "bodySize": 53, + "content": { + "mimeType": "application/vnd.api+json", + "size": 53, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid limit\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-03-31T18:18:50.792Z", + "time": 44 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/cloud-network-monitoring/GetAggregatedConnections.ts b/examples/v2/cloud-network-monitoring/GetAggregatedConnections.ts new file mode 100644 index 000000000000..eeb175918d9c --- /dev/null +++ b/examples/v2/cloud-network-monitoring/GetAggregatedConnections.ts @@ -0,0 +1,18 @@ +/** + * Get aggregated connections returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getAggregatedConnections"] = true; +const apiInstance = new v2.CloudNetworkMonitoringApi(configuration); + +apiInstance + .getAggregatedConnections() + .then((data: v2.SingleAggregatedConnectionResponseArray) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 6124de84070c..98001bcf7887 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -4970,6 +4970,29 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "ListTagsResponse", }, + "v2.GetAggregatedConnections": { + "from": { + "type": "number", + "format": "int64", + }, + "to": { + "type": "number", + "format": "int64", + }, + "groupBy": { + "type": "string", + "format": "", + }, + "tags": { + "type": "string", + "format": "", + }, + "limit": { + "type": "number", + "format": "int32", + }, + "operationResponseType": "SingleAggregatedConnectionResponseArray", + }, "v2.ListOrgConfigs": { "operationResponseType": "OrgConfigListResponse", }, diff --git a/features/v2/cloud_network_monitoring.feature b/features/v2/cloud_network_monitoring.feature new file mode 100644 index 000000000000..2ae8e7cf2d07 --- /dev/null +++ b/features/v2/cloud_network_monitoring.feature @@ -0,0 +1,29 @@ +@endpoint(cloud-network-monitoring) @endpoint(cloud-network-monitoring-v2) +Feature: Cloud Network Monitoring + The Cloud Network Monitoring API allows you to fetch aggregated + connections and their attributes. See the [Cloud Network Monitoring page]( + https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/) + for more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CloudNetworkMonitoring" API + And operation "GetAggregatedConnections" enabled + And new "GetAggregatedConnections" request + + @generated @skip @team:Datadog/networks + Scenario: Get aggregated connections returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/networks + Scenario: Get aggregated connections returns "OK" response + When the request is sent + Then the response status is 200 OK + + @skip-python @skip-ruby @team:Datadog/networks + Scenario: Get all aggregated connections returns "Bad Request" response + Given request contains "limit" parameter with value 6000 + When the request is sent + Then the response status is 400 Bad Request diff --git a/features/v2/undo.json b/features/v2/undo.json index 13df29980191..f8e2c4ef1bdf 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1744,6 +1744,12 @@ "type": "idempotent" } }, + "GetAggregatedConnections": { + "tag": "Cloud Network Monitoring", + "undo": { + "type": "safe" + } + }, "ListOrgConfigs": { "tag": "Organizations", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 06fdea6fec4c..24496da4c326 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -263,6 +263,7 @@ export function createConfiguration( "v2.listAWSNamespaces": false, "v2.updateAWSAccount": false, "v2.listAWSLogsServices": false, + "v2.getAggregatedConnections": false, "v2.cancelHistoricalJob": false, "v2.convertJobResultToSignal": false, "v2.deleteHistoricalJob": false, diff --git a/packages/datadog-api-client-v2/apis/CloudNetworkMonitoringApi.ts b/packages/datadog-api-client-v2/apis/CloudNetworkMonitoringApi.ts new file mode 100644 index 000000000000..6b3cad35e25c --- /dev/null +++ b/packages/datadog-api-client-v2/apis/CloudNetworkMonitoringApi.ts @@ -0,0 +1,228 @@ +import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { SingleAggregatedConnectionResponseArray } from "../models/SingleAggregatedConnectionResponseArray"; + +export class CloudNetworkMonitoringApiRequestFactory extends BaseAPIRequestFactory { + public async getAggregatedConnections( + from?: number, + to?: number, + groupBy?: string, + tags?: string, + limit?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getAggregatedConnections'"); + if (!_config.unstableOperations["v2.getAggregatedConnections"]) { + throw new Error( + "Unstable operation 'getAggregatedConnections' is disabled" + ); + } + + // Path Params + const localVarPath = "/api/v2/network/connections/aggregate"; + + // Make Request Context + const requestContext = _config + .getServer("v2.CloudNetworkMonitoringApi.getAggregatedConnections") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (from !== undefined) { + requestContext.setQueryParam( + "from", + ObjectSerializer.serialize(from, "number", "int64"), + "" + ); + } + if (to !== undefined) { + requestContext.setQueryParam( + "to", + ObjectSerializer.serialize(to, "number", "int64"), + "" + ); + } + if (groupBy !== undefined) { + requestContext.setQueryParam( + "group_by", + ObjectSerializer.serialize(groupBy, "string", ""), + "" + ); + } + if (tags !== undefined) { + requestContext.setQueryParam( + "tags", + ObjectSerializer.serialize(tags, "string", ""), + "" + ); + } + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + ObjectSerializer.serialize(limit, "number", "int32"), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class CloudNetworkMonitoringApiResponseProcessor { + /** + * 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 getAggregatedConnections + * @throws ApiException if the response code was not in [200, 299] + */ + public async getAggregatedConnections( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: SingleAggregatedConnectionResponseArray = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SingleAggregatedConnectionResponseArray" + ) as SingleAggregatedConnectionResponseArray; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: SingleAggregatedConnectionResponseArray = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "SingleAggregatedConnectionResponseArray", + "" + ) as SingleAggregatedConnectionResponseArray; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface CloudNetworkMonitoringApiGetAggregatedConnectionsRequest { + /** + * Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the "to" timestamp. If neither "from" nor "to" are provided, the query window is [now - 15m, now]. + * @type number + */ + from?: number; + /** + * Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither "from" nor "to" are provided, the query window is [now - 15m, now]. + * @type number + */ + to?: number; + /** + * Comma-separated list of fields to group connections by. + * @type string + */ + groupBy?: string; + /** + * Comma-separated list of tags to filter connections by. + * @type string + */ + tags?: string; + /** + * The number of connections to be returned. The maximum value is 5000. + * @type number + */ + limit?: number; +} + +export class CloudNetworkMonitoringApi { + private requestFactory: CloudNetworkMonitoringApiRequestFactory; + private responseProcessor: CloudNetworkMonitoringApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CloudNetworkMonitoringApiRequestFactory, + responseProcessor?: CloudNetworkMonitoringApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || + new CloudNetworkMonitoringApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new CloudNetworkMonitoringApiResponseProcessor(); + } + + /** + * Get aggregated connections + * @param param The request object + */ + public getAggregatedConnections( + param: CloudNetworkMonitoringApiGetAggregatedConnectionsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getAggregatedConnections( + param.from, + param.to, + param.groupBy, + param.tags, + param.limit, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getAggregatedConnections( + responseContext + ); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 1077f5e1185b..7597bd309028 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -147,6 +147,11 @@ export { CloudCostManagementApi, } from "./apis/CloudCostManagementApi"; +export { + CloudNetworkMonitoringApiGetAggregatedConnectionsRequest, + CloudNetworkMonitoringApi, +} from "./apis/CloudNetworkMonitoringApi"; + export { CloudflareIntegrationApiCreateCloudflareAccountRequest, CloudflareIntegrationApiDeleteCloudflareAccountRequest, @@ -2537,6 +2542,10 @@ export { ServiceDefinitionV2SlackType } from "./models/ServiceDefinitionV2SlackT export { ServiceDefinitionV2Version } from "./models/ServiceDefinitionV2Version"; export { ServiceNowTicket } from "./models/ServiceNowTicket"; export { ServiceNowTicketResult } from "./models/ServiceNowTicketResult"; +export { SingleAggregatedConnectionResponseArray } from "./models/SingleAggregatedConnectionResponseArray"; +export { SingleAggregatedConnectionResponseData } from "./models/SingleAggregatedConnectionResponseData"; +export { SingleAggregatedConnectionResponseDataAttributes } from "./models/SingleAggregatedConnectionResponseDataAttributes"; +export { SingleAggregatedConnectionResponseDataType } from "./models/SingleAggregatedConnectionResponseDataType"; export { SlackIntegrationMetadata } from "./models/SlackIntegrationMetadata"; export { SlackIntegrationMetadataChannelItem } from "./models/SlackIntegrationMetadataChannelItem"; export { SlackTriggerWrapper } from "./models/SlackTriggerWrapper"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 5b261bdb027b..64e78cac52a2 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -1453,6 +1453,9 @@ import { ServiceDefinitionV2Slack } from "./ServiceDefinitionV2Slack"; import { ServiceDefinitionsListResponse } from "./ServiceDefinitionsListResponse"; import { ServiceNowTicket } from "./ServiceNowTicket"; import { ServiceNowTicketResult } from "./ServiceNowTicketResult"; +import { SingleAggregatedConnectionResponseArray } from "./SingleAggregatedConnectionResponseArray"; +import { SingleAggregatedConnectionResponseData } from "./SingleAggregatedConnectionResponseData"; +import { SingleAggregatedConnectionResponseDataAttributes } from "./SingleAggregatedConnectionResponseDataAttributes"; import { SlackIntegrationMetadata } from "./SlackIntegrationMetadata"; import { SlackIntegrationMetadataChannelItem } from "./SlackIntegrationMetadataChannelItem"; import { SlackTriggerWrapper } from "./SlackTriggerWrapper"; @@ -2445,6 +2448,7 @@ const enumsMap: { [key: string]: any[] } = { ServiceDefinitionV2OpsgenieRegion: ["US", "EU"], ServiceDefinitionV2SlackType: ["slack"], ServiceDefinitionV2Version: ["v2"], + SingleAggregatedConnectionResponseDataType: ["aggregated_connection"], SortDirection: ["desc", "asc"], SpansAggregateBucketType: ["bucket"], SpansAggregateRequestType: ["aggregate_request"], @@ -4267,6 +4271,12 @@ const typeMap: { [index: string]: any } = { ServiceDefinitionsListResponse: ServiceDefinitionsListResponse, ServiceNowTicket: ServiceNowTicket, ServiceNowTicketResult: ServiceNowTicketResult, + SingleAggregatedConnectionResponseArray: + SingleAggregatedConnectionResponseArray, + SingleAggregatedConnectionResponseData: + SingleAggregatedConnectionResponseData, + SingleAggregatedConnectionResponseDataAttributes: + SingleAggregatedConnectionResponseDataAttributes, SlackIntegrationMetadata: SlackIntegrationMetadata, SlackIntegrationMetadataChannelItem: SlackIntegrationMetadataChannelItem, SlackTriggerWrapper: SlackTriggerWrapper, diff --git a/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseArray.ts b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseArray.ts new file mode 100644 index 000000000000..f1652f7c6654 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseArray.ts @@ -0,0 +1,53 @@ +/** + * 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. + */ +import { SingleAggregatedConnectionResponseData } from "./SingleAggregatedConnectionResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `SingleAggregatedConnectionResponseArray` object. + */ +export class SingleAggregatedConnectionResponseArray { + /** + * The `SingleAggregatedConnectionResponseArray` `data`. + */ + "data"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SingleAggregatedConnectionResponseArray.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseData.ts b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseData.ts new file mode 100644 index 000000000000..d11216639a0f --- /dev/null +++ b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseData.ts @@ -0,0 +1,71 @@ +/** + * 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. + */ +import { SingleAggregatedConnectionResponseDataAttributes } from "./SingleAggregatedConnectionResponseDataAttributes"; +import { SingleAggregatedConnectionResponseDataType } from "./SingleAggregatedConnectionResponseDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `SingleAggregatedConnectionResponseData` object. + */ +export class SingleAggregatedConnectionResponseData { + /** + * The definition of `SingleAggregatedConnectionResponseDataAttributes` object. + */ + "attributes"?: SingleAggregatedConnectionResponseDataAttributes; + /** + * The `SingleAggregatedConnectionResponseData` `id`. + */ + "id"?: string; + /** + * Aggregated connection resource type. Allowed enum values: `aggregated_connection`. + * default: `aggregated_connection` + */ + "type"?: SingleAggregatedConnectionResponseDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "SingleAggregatedConnectionResponseDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "SingleAggregatedConnectionResponseDataType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SingleAggregatedConnectionResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseDataAttributes.ts new file mode 100644 index 000000000000..1da4986210b7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseDataAttributes.ts @@ -0,0 +1,151 @@ +/** + * 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. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `SingleAggregatedConnectionResponseDataAttributes` object. + */ +export class SingleAggregatedConnectionResponseDataAttributes { + /** + * The total number of bytes sent by the client over the given period. + */ + "bytesSentByClient"?: number; + /** + * The total number of bytes sent by the server over the given period. + */ + "bytesSentByServer"?: number; + /** + * The `attributes` `group_bys`. + */ + "groupBys"?: { [key: string]: Array }; + /** + * The total number of packets sent by the client over the given period. + */ + "packetsSentByClient"?: number; + /** + * The total number of packets sent by the server over the given period. + */ + "packetsSentByServer"?: number; + /** + * Measured as TCP smoothed roundtrip time in microseconds (the time between a TCP frame being sent and acknowledged). + */ + "rttMicroSeconds"?: number; + /** + * The number of TCP connections in a closed state. Measured in connections per second from the client. + */ + "tcpClosedConnections"?: number; + /** + * The number of TCP connections in an established state. Measured in connections per second from the client. + */ + "tcpEstablishedConnections"?: number; + /** + * The number of TCP connections that were refused by the server. Typically this indicates an attempt to connect to an IP/port that is not receiving connections, or a firewall/security misconfiguration. + */ + "tcpRefusals"?: number; + /** + * The number of TCP connections that were reset by the server. + */ + "tcpResets"?: number; + /** + * TCP Retransmits represent detected failures that are retransmitted to ensure delivery. Measured in count of retransmits from the client. + */ + "tcpRetransmits"?: number; + /** + * The number of TCP connections that timed out from the perspective of the operating system. This can indicate general connectivity and latency issues. + */ + "tcpTimeouts"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + bytesSentByClient: { + baseName: "bytes_sent_by_client", + type: "number", + format: "int64", + }, + bytesSentByServer: { + baseName: "bytes_sent_by_server", + type: "number", + format: "int64", + }, + groupBys: { + baseName: "group_bys", + type: "{ [key: string]: Array; }", + }, + packetsSentByClient: { + baseName: "packets_sent_by_client", + type: "number", + format: "int64", + }, + packetsSentByServer: { + baseName: "packets_sent_by_server", + type: "number", + format: "int64", + }, + rttMicroSeconds: { + baseName: "rtt_micro_seconds", + type: "number", + format: "int64", + }, + tcpClosedConnections: { + baseName: "tcp_closed_connections", + type: "number", + format: "int64", + }, + tcpEstablishedConnections: { + baseName: "tcp_established_connections", + type: "number", + format: "int64", + }, + tcpRefusals: { + baseName: "tcp_refusals", + type: "number", + format: "int64", + }, + tcpResets: { + baseName: "tcp_resets", + type: "number", + format: "int64", + }, + tcpRetransmits: { + baseName: "tcp_retransmits", + type: "number", + format: "int64", + }, + tcpTimeouts: { + baseName: "tcp_timeouts", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SingleAggregatedConnectionResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseDataType.ts b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseDataType.ts new file mode 100644 index 000000000000..774a3c726535 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SingleAggregatedConnectionResponseDataType.ts @@ -0,0 +1,17 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Aggregated connection resource type. Allowed enum values: `aggregated_connection`. + * default: `aggregated_connection` + */ + +export type SingleAggregatedConnectionResponseDataType = + | typeof AGGREGATED_CONNECTION + | UnparsedObject; +export const AGGREGATED_CONNECTION = "aggregated_connection";