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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-03 09:26:20.623140",
"spec_repo_commit": "f1a43647"
"regenerated": "2025-04-03 16:27:53.688587",
"spec_repo_commit": "4468962d"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-03 09:26:20.638579",
"spec_repo_commit": "f1a43647"
"regenerated": "2025-04-03 16:27:53.704116",
"spec_repo_commit": "4468962d"
}
}
}
31 changes: 15 additions & 16 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30212,7 +30212,7 @@ components:
type: string
type: object
SingleAggregatedConnectionResponseArray:
description: The definition of `SingleAggregatedConnectionResponseArray` object.
description: List of aggregated connections.
example:
data:
- attributes:
Expand All @@ -30236,25 +30236,25 @@ components:
type: aggregated_connection
properties:
data:
description: The `SingleAggregatedConnectionResponseArray` `data`.
description: Array of aggregated connection objects.
items:
$ref: '#/components/schemas/SingleAggregatedConnectionResponseData'
type: array
type: object
SingleAggregatedConnectionResponseData:
description: The definition of `SingleAggregatedConnectionResponseData` object.
description: Object describing an aggregated connection.
properties:
attributes:
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataAttributes'
id:
description: The `SingleAggregatedConnectionResponseData` `id`.
description: A unique identifier for the aggregated connection based on
the group by values.
type: string
type:
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataType'
type: object
SingleAggregatedConnectionResponseDataAttributes:
description: The definition of `SingleAggregatedConnectionResponseDataAttributes`
object.
description: Attributes for an aggregated connection.
properties:
bytes_sent_by_client:
description: The total number of bytes sent by the client over the given
Expand All @@ -30268,10 +30268,11 @@ components:
type: integer
group_bys:
additionalProperties:
description: The values for each group by.
items:
type: string
type: array
description: The `attributes` `group_bys`.
description: The key, value pairs for each group by.
type: object
packets_sent_by_client:
description: The total number of packets sent by the client over the given
Expand Down Expand Up @@ -30322,9 +30323,7 @@ components:
type: object
SingleAggregatedConnectionResponseDataType:
default: aggregated_connection
description: 'Aggregated connection resource type. Allowed enum values: `aggregated_connection`.

default: `aggregated_connection`'
description: Aggregated connection resource type.
enum:
- aggregated_connection
type: string
Expand Down Expand Up @@ -44426,22 +44425,22 @@ paths:
- Network Device Monitoring
/api/v2/network/connections/aggregate:
get:
description: Get aggregated connections
description: Get all 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].
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].
time. If neither `from` nor `to` are provided, the query window is `[now
- 15m, now]`.
in: query
name: to
schema:
Expand Down Expand Up @@ -44478,7 +44477,7 @@ paths:
$ref: '#/components/responses/BadRequestResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get aggregated connections
summary: Get all aggregated connections
tags:
- Cloud Network Monitoring
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get aggregated connections returns "OK" response
# Get all aggregated connections returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get aggregated connections returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_aggregated_connections".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudNetworkMonitoringAPI.new
p api_instance.get_aggregated_connections()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Suggested change
p api_instance.get_aggregated_connections()
p api_instance.get_aggregated_connections
Do not use parentheses with methods that take no arguments (...read more)

The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand.

This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success.

To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing 'test'.upcase(), you should write 'test'.upcase. Similarly, instead of Kernel.exit!(), write Kernel.exit!. However, note that there is an exception for super - super by itself is different from super(), so in this case, parentheses may be necessary.

View in Datadog  Leave us feedback  Documentation

10 changes: 5 additions & 5 deletions features/v2/cloud_network_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ Feature: Cloud Network Monitoring
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
Expand All @@ -27,3 +22,8 @@ Feature: Cloud Network Monitoring
Given request contains "limit" parameter with value 6000
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/networks
Scenario: Get all aggregated connections returns "OK" response
When the request is sent
Then the response status is 200 OK
10 changes: 5 additions & 5 deletions lib/datadog_api_client/v2/api/cloud_network_monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ def initialize(api_client = DatadogAPIClient::APIClient.default)
@api_client = api_client
end

# Get aggregated connections.
# Get all aggregated connections.
#
# @see #get_aggregated_connections_with_http_info
def get_aggregated_connections(opts = {})
data, _status_code, _headers = get_aggregated_connections_with_http_info(opts)
data
end

# Get aggregated connections.
# Get all aggregated connections.
#
# Get aggregated connections
# Get all aggregated connections.
#
# @param opts [Hash] the optional parameters
# @option opts [Integer] :from 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].
# @option opts [Integer] :to 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].
# @option opts [Integer] :from 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]`.
# @option opts [Integer] :to 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]`.
# @option opts [String] :group_by Comma-separated list of fields to group connections by.
# @option opts [String] :tags Comma-separated list of tags to filter connections by.
# @option opts [Integer] :limit The number of connections to be returned. The maximum value is 5000.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
require 'time'

module DatadogAPIClient::V2
# The definition of `SingleAggregatedConnectionResponseArray` object.
# List of aggregated connections.
class SingleAggregatedConnectionResponseArray
include BaseGenericModel

# The `SingleAggregatedConnectionResponseArray` `data`.
# Array of aggregated connection objects.
attr_accessor :data

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@
require 'time'

module DatadogAPIClient::V2
# The definition of `SingleAggregatedConnectionResponseData` object.
# Object describing an aggregated connection.
class SingleAggregatedConnectionResponseData
include BaseGenericModel

# The definition of `SingleAggregatedConnectionResponseDataAttributes` object.
# Attributes for an aggregated connection.
attr_accessor :attributes

# The `SingleAggregatedConnectionResponseData` `id`.
# A unique identifier for the aggregated connection based on the group by values.
attr_accessor :id

# Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
# default: `aggregated_connection`
# Aggregated connection resource type.
attr_accessor :type

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require 'time'

module DatadogAPIClient::V2
# The definition of `SingleAggregatedConnectionResponseDataAttributes` object.
# Attributes for an aggregated connection.
class SingleAggregatedConnectionResponseDataAttributes
include BaseGenericModel

Expand All @@ -27,7 +27,7 @@ class SingleAggregatedConnectionResponseDataAttributes
# The total number of bytes sent by the server over the given period.
attr_accessor :bytes_sent_by_server

# The `attributes` `group_bys`.
# The key, value pairs for each group by.
attr_accessor :group_bys

# The total number of packets sent by the client over the given period.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
require 'time'

module DatadogAPIClient::V2
# Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
# default: `aggregated_connection`
# Aggregated connection resource type.
class SingleAggregatedConnectionResponseDataType
include BaseEnumModel

Expand Down
Loading