|
12 | 12 | unset, |
13 | 13 | ) |
14 | 14 | from datadog_api_client.v2.model.fleet_agent_versions_response import FleetAgentVersionsResponse |
| 15 | +from datadog_api_client.v2.model.fleet_agents_response import FleetAgentsResponse |
| 16 | +from datadog_api_client.v2.model.fleet_agent_info_response import FleetAgentInfoResponse |
15 | 17 | from datadog_api_client.v2.model.fleet_deployments_response import FleetDeploymentsResponse |
16 | 18 | from datadog_api_client.v2.model.fleet_deployment_response import FleetDeploymentResponse |
17 | 19 | from datadog_api_client.v2.model.fleet_deployment_configure_create_request import FleetDeploymentConfigureCreateRequest |
@@ -153,6 +155,29 @@ def __init__(self, api_client=None): |
153 | 155 | api_client=api_client, |
154 | 156 | ) |
155 | 157 |
|
| 158 | + self._get_fleet_agent_info_endpoint = _Endpoint( |
| 159 | + settings={ |
| 160 | + "response_type": (FleetAgentInfoResponse,), |
| 161 | + "auth": ["apiKeyAuth", "appKeyAuth"], |
| 162 | + "endpoint_path": "/api/unstable/fleet/agents/{agent_key}", |
| 163 | + "operation_id": "get_fleet_agent_info", |
| 164 | + "http_method": "GET", |
| 165 | + "version": "v2", |
| 166 | + }, |
| 167 | + params_map={ |
| 168 | + "agent_key": { |
| 169 | + "required": True, |
| 170 | + "openapi_types": (str,), |
| 171 | + "attribute": "agent_key", |
| 172 | + "location": "path", |
| 173 | + }, |
| 174 | + }, |
| 175 | + headers_map={ |
| 176 | + "accept": ["application/json"], |
| 177 | + }, |
| 178 | + api_client=api_client, |
| 179 | + ) |
| 180 | + |
156 | 181 | self._get_fleet_deployment_endpoint = _Endpoint( |
157 | 182 | settings={ |
158 | 183 | "response_type": (FleetDeploymentResponse,), |
@@ -212,11 +237,65 @@ def __init__(self, api_client=None): |
212 | 237 | api_client=api_client, |
213 | 238 | ) |
214 | 239 |
|
| 240 | + self._list_fleet_agents_endpoint = _Endpoint( |
| 241 | + settings={ |
| 242 | + "response_type": (FleetAgentsResponse,), |
| 243 | + "auth": ["apiKeyAuth", "appKeyAuth"], |
| 244 | + "endpoint_path": "/api/unstable/fleet/agents", |
| 245 | + "operation_id": "list_fleet_agents", |
| 246 | + "http_method": "GET", |
| 247 | + "version": "v2", |
| 248 | + }, |
| 249 | + params_map={ |
| 250 | + "page_number": { |
| 251 | + "validation": { |
| 252 | + "inclusive_minimum": 1, |
| 253 | + }, |
| 254 | + "openapi_types": (int,), |
| 255 | + "attribute": "page_number", |
| 256 | + "location": "query", |
| 257 | + }, |
| 258 | + "page_size": { |
| 259 | + "validation": { |
| 260 | + "inclusive_maximum": 100, |
| 261 | + "inclusive_minimum": 1, |
| 262 | + }, |
| 263 | + "openapi_types": (int,), |
| 264 | + "attribute": "page_size", |
| 265 | + "location": "query", |
| 266 | + }, |
| 267 | + "sort_attribute": { |
| 268 | + "openapi_types": (str,), |
| 269 | + "attribute": "sort_attribute", |
| 270 | + "location": "query", |
| 271 | + }, |
| 272 | + "sort_descending": { |
| 273 | + "openapi_types": (bool,), |
| 274 | + "attribute": "sort_descending", |
| 275 | + "location": "query", |
| 276 | + }, |
| 277 | + "tags": { |
| 278 | + "openapi_types": (str,), |
| 279 | + "attribute": "tags", |
| 280 | + "location": "query", |
| 281 | + }, |
| 282 | + "filter": { |
| 283 | + "openapi_types": (str,), |
| 284 | + "attribute": "filter", |
| 285 | + "location": "query", |
| 286 | + }, |
| 287 | + }, |
| 288 | + headers_map={ |
| 289 | + "accept": ["application/json"], |
| 290 | + }, |
| 291 | + api_client=api_client, |
| 292 | + ) |
| 293 | + |
215 | 294 | self._list_fleet_agent_versions_endpoint = _Endpoint( |
216 | 295 | settings={ |
217 | 296 | "response_type": (FleetAgentVersionsResponse,), |
218 | 297 | "auth": ["apiKeyAuth", "appKeyAuth"], |
219 | | - "endpoint_path": "/api/unstable/fleet/agents", |
| 298 | + "endpoint_path": "/api/unstable/fleet/agent_versions", |
220 | 299 | "operation_id": "list_fleet_agent_versions", |
221 | 300 | "http_method": "GET", |
222 | 301 | "version": "v2", |
@@ -456,6 +535,29 @@ def delete_fleet_schedule( |
456 | 535 |
|
457 | 536 | return self._delete_fleet_schedule_endpoint.call_with_http_info(**kwargs) |
458 | 537 |
|
| 538 | + def get_fleet_agent_info( |
| 539 | + self, |
| 540 | + agent_key: str, |
| 541 | + ) -> FleetAgentInfoResponse: |
| 542 | + """Get detailed information about an agent. |
| 543 | +
|
| 544 | + Retrieve detailed information about a specific Datadog Agent. |
| 545 | + This endpoint returns comprehensive information about an agent including: |
| 546 | +
|
| 547 | + * Agent details and metadata |
| 548 | + * Configured integrations organized by status (working, warning, error, missing) |
| 549 | + * Detected integrations |
| 550 | + * Configuration files and layers |
| 551 | +
|
| 552 | + :param agent_key: The unique identifier (agent key) for the Datadog Agent. |
| 553 | + :type agent_key: str |
| 554 | + :rtype: FleetAgentInfoResponse |
| 555 | + """ |
| 556 | + kwargs: Dict[str, Any] = {} |
| 557 | + kwargs["agent_key"] = agent_key |
| 558 | + |
| 559 | + return self._get_fleet_agent_info_endpoint.call_with_http_info(**kwargs) |
| 560 | + |
459 | 561 | def get_fleet_deployment( |
460 | 562 | self, |
461 | 563 | deployment_id: str, |
@@ -532,6 +634,57 @@ def get_fleet_schedule( |
532 | 634 |
|
533 | 635 | return self._get_fleet_schedule_endpoint.call_with_http_info(**kwargs) |
534 | 636 |
|
| 637 | + def list_fleet_agents( |
| 638 | + self, |
| 639 | + *, |
| 640 | + page_number: Union[int, UnsetType] = unset, |
| 641 | + page_size: Union[int, UnsetType] = unset, |
| 642 | + sort_attribute: Union[str, UnsetType] = unset, |
| 643 | + sort_descending: Union[bool, UnsetType] = unset, |
| 644 | + tags: Union[str, UnsetType] = unset, |
| 645 | + filter: Union[str, UnsetType] = unset, |
| 646 | + ) -> FleetAgentsResponse: |
| 647 | + """List all Datadog Agents. |
| 648 | +
|
| 649 | + Retrieve a paginated list of all Datadog Agents. |
| 650 | + This endpoint returns a paginated list of all Datadog Agents with support for pagination, sorting, and filtering. |
| 651 | + Use the ``page_number`` and ``page_size`` query parameters to paginate through results. |
| 652 | +
|
| 653 | + :param page_number: Page number for pagination (must be greater than 0). |
| 654 | + :type page_number: int, optional |
| 655 | + :param page_size: Number of results per page (must be greater than 0 and less than or equal to 100). |
| 656 | + :type page_size: int, optional |
| 657 | + :param sort_attribute: Attribute to sort by. |
| 658 | + :type sort_attribute: str, optional |
| 659 | + :param sort_descending: Sort order (true for descending, false for ascending). |
| 660 | + :type sort_descending: bool, optional |
| 661 | + :param tags: Comma-separated list of tags to filter agents. |
| 662 | + :type tags: str, optional |
| 663 | + :param filter: Filter string for narrowing down agent results. |
| 664 | + :type filter: str, optional |
| 665 | + :rtype: FleetAgentsResponse |
| 666 | + """ |
| 667 | + kwargs: Dict[str, Any] = {} |
| 668 | + if page_number is not unset: |
| 669 | + kwargs["page_number"] = page_number |
| 670 | + |
| 671 | + if page_size is not unset: |
| 672 | + kwargs["page_size"] = page_size |
| 673 | + |
| 674 | + if sort_attribute is not unset: |
| 675 | + kwargs["sort_attribute"] = sort_attribute |
| 676 | + |
| 677 | + if sort_descending is not unset: |
| 678 | + kwargs["sort_descending"] = sort_descending |
| 679 | + |
| 680 | + if tags is not unset: |
| 681 | + kwargs["tags"] = tags |
| 682 | + |
| 683 | + if filter is not unset: |
| 684 | + kwargs["filter"] = filter |
| 685 | + |
| 686 | + return self._list_fleet_agents_endpoint.call_with_http_info(**kwargs) |
| 687 | + |
535 | 688 | def list_fleet_agent_versions( |
536 | 689 | self, |
537 | 690 | ) -> FleetAgentVersionsResponse: |
|
0 commit comments