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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
639 changes: 638 additions & 1 deletion .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

119 changes: 119 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8859,6 +8859,55 @@ datadog\_api\_client.v2.model.flaky\_tests\_search\_sort module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_attributes module
-------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_attributes\_tags\_items module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_attributes_tags_items
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_info module
-------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_info
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_info\_attributes module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_info_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_info\_details module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_info_details
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_info\_resource\_type module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_info_resource_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_info\_response module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agent_info_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agent\_version\_attributes module
----------------------------------------------------------------------

Expand All @@ -8880,6 +8929,48 @@ datadog\_api\_client.v2.model.fleet\_agent\_versions\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agents\_response module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agents_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agents\_response\_data module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agents_response_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agents\_response\_data\_attributes module
------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agents_response_data_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_agents\_response\_meta module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_agents_response_meta
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_configuration\_file module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_configuration_file
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_configuration\_layer module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_configuration_layer
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_deployment module
------------------------------------------------------

Expand Down Expand Up @@ -9020,6 +9111,34 @@ datadog\_api\_client.v2.model.fleet\_deployments\_response\_meta module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_detected\_integration module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_detected_integration
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_integration\_details module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_integration_details
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_integrations\_by\_status module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_integrations_by_status
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_otel\_collector module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.fleet_otel_collector
:members:
:show-inheritance:

datadog\_api\_client.v2.model.fleet\_schedule module
----------------------------------------------------

Expand Down
16 changes: 16 additions & 0 deletions examples/v2/fleet-automation/GetFleetAgentInfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Get detailed information about an agent returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

configuration = Configuration()
configuration.unstable_operations["get_fleet_agent_info"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.get_fleet_agent_info(
agent_key="agent_key",
)

print(response)
14 changes: 14 additions & 0 deletions examples/v2/fleet-automation/ListFleetAgents.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
List all Datadog Agents returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.fleet_automation_api import FleetAutomationApi

configuration = Configuration()
configuration.unstable_operations["list_fleet_agents"] = True
with ApiClient(configuration) as api_client:
api_instance = FleetAutomationApi(api_client)
response = api_instance.list_fleet_agents()

print(response)
2 changes: 2 additions & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ def __init__(
"v2.create_fleet_deployment_upgrade": False,
"v2.create_fleet_schedule": False,
"v2.delete_fleet_schedule": False,
"v2.get_fleet_agent_info": False,
"v2.get_fleet_deployment": False,
"v2.get_fleet_schedule": False,
"v2.list_fleet_agents": False,
"v2.list_fleet_agent_versions": False,
"v2.list_fleet_deployments": False,
"v2.list_fleet_schedules": False,
Expand Down
155 changes: 154 additions & 1 deletion src/datadog_api_client/v2/api/fleet_automation_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
unset,
)
from datadog_api_client.v2.model.fleet_agent_versions_response import FleetAgentVersionsResponse
from datadog_api_client.v2.model.fleet_agents_response import FleetAgentsResponse
from datadog_api_client.v2.model.fleet_agent_info_response import FleetAgentInfoResponse
from datadog_api_client.v2.model.fleet_deployments_response import FleetDeploymentsResponse
from datadog_api_client.v2.model.fleet_deployment_response import FleetDeploymentResponse
from datadog_api_client.v2.model.fleet_deployment_configure_create_request import FleetDeploymentConfigureCreateRequest
Expand Down Expand Up @@ -153,6 +155,29 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._get_fleet_agent_info_endpoint = _Endpoint(
settings={
"response_type": (FleetAgentInfoResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/unstable/fleet/agents/{agent_key}",
"operation_id": "get_fleet_agent_info",
"http_method": "GET",
"version": "v2",
},
params_map={
"agent_key": {
"required": True,
"openapi_types": (str,),
"attribute": "agent_key",
"location": "path",
},
},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._get_fleet_deployment_endpoint = _Endpoint(
settings={
"response_type": (FleetDeploymentResponse,),
Expand Down Expand Up @@ -212,11 +237,65 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._list_fleet_agents_endpoint = _Endpoint(
settings={
"response_type": (FleetAgentsResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/unstable/fleet/agents",
"operation_id": "list_fleet_agents",
"http_method": "GET",
"version": "v2",
},
params_map={
"page_number": {
"validation": {
"inclusive_minimum": 1,
},
"openapi_types": (int,),
"attribute": "page_number",
"location": "query",
},
"page_size": {
"validation": {
"inclusive_maximum": 100,
"inclusive_minimum": 1,
},
"openapi_types": (int,),
"attribute": "page_size",
"location": "query",
},
"sort_attribute": {
"openapi_types": (str,),
"attribute": "sort_attribute",
"location": "query",
},
"sort_descending": {
"openapi_types": (bool,),
"attribute": "sort_descending",
"location": "query",
},
"tags": {
"openapi_types": (str,),
"attribute": "tags",
"location": "query",
},
"filter": {
"openapi_types": (str,),
"attribute": "filter",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._list_fleet_agent_versions_endpoint = _Endpoint(
settings={
"response_type": (FleetAgentVersionsResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/unstable/fleet/agents",
"endpoint_path": "/api/unstable/fleet/agent_versions",
"operation_id": "list_fleet_agent_versions",
"http_method": "GET",
"version": "v2",
Expand Down Expand Up @@ -456,6 +535,29 @@ def delete_fleet_schedule(

return self._delete_fleet_schedule_endpoint.call_with_http_info(**kwargs)

def get_fleet_agent_info(
self,
agent_key: str,
) -> FleetAgentInfoResponse:
"""Get detailed information about an agent.

Retrieve detailed information about a specific Datadog Agent.
This endpoint returns comprehensive information about an agent including:

* Agent details and metadata
* Configured integrations organized by status (working, warning, error, missing)
* Detected integrations
* Configuration files and layers

:param agent_key: The unique identifier (agent key) for the Datadog Agent.
:type agent_key: str
:rtype: FleetAgentInfoResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["agent_key"] = agent_key

return self._get_fleet_agent_info_endpoint.call_with_http_info(**kwargs)

def get_fleet_deployment(
self,
deployment_id: str,
Expand Down Expand Up @@ -532,6 +634,57 @@ def get_fleet_schedule(

return self._get_fleet_schedule_endpoint.call_with_http_info(**kwargs)

def list_fleet_agents(
self,
*,
page_number: Union[int, UnsetType] = unset,
page_size: Union[int, UnsetType] = unset,
sort_attribute: Union[str, UnsetType] = unset,
sort_descending: Union[bool, UnsetType] = unset,
tags: Union[str, UnsetType] = unset,
filter: Union[str, UnsetType] = unset,
) -> FleetAgentsResponse:
"""List all Datadog Agents.

Retrieve a paginated list of all Datadog Agents.
This endpoint returns a paginated list of all Datadog Agents with support for pagination, sorting, and filtering.
Use the ``page_number`` and ``page_size`` query parameters to paginate through results.

:param page_number: Page number for pagination (must be greater than 0).
:type page_number: int, optional
:param page_size: Number of results per page (must be greater than 0 and less than or equal to 100).
:type page_size: int, optional
:param sort_attribute: Attribute to sort by.
:type sort_attribute: str, optional
:param sort_descending: Sort order (true for descending, false for ascending).
:type sort_descending: bool, optional
:param tags: Comma-separated list of tags to filter agents.
:type tags: str, optional
:param filter: Filter string for narrowing down agent results.
:type filter: str, optional
:rtype: FleetAgentsResponse
"""
kwargs: Dict[str, Any] = {}
if page_number is not unset:
kwargs["page_number"] = page_number

if page_size is not unset:
kwargs["page_size"] = page_size

if sort_attribute is not unset:
kwargs["sort_attribute"] = sort_attribute

if sort_descending is not unset:
kwargs["sort_descending"] = sort_descending

if tags is not unset:
kwargs["tags"] = tags

if filter is not unset:
kwargs["filter"] = filter

return self._list_fleet_agents_endpoint.call_with_http_info(**kwargs)

def list_fleet_agent_versions(
self,
) -> FleetAgentVersionsResponse:
Expand Down
Loading