From 38777958390cffdd4e20f788c28309f7cbcfb3ed Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 4 Dec 2025 10:41:04 +0000 Subject: [PATCH] Regenerate client from commit 7cb3ec3 of spec repo --- .generator/schemas/v2/openapi.yaml | 651 +++++++++++++++++- docs/datadog_api_client.v2.model.rst | 119 ++++ .../v2/fleet-automation/GetFleetAgentInfo.py | 16 + .../v2/fleet-automation/ListFleetAgents.py | 14 + src/datadog_api_client/configuration.py | 2 + .../v2/api/fleet_automation_api.py | 155 ++++- .../v2/model/fleet_agent_attributes.py | 214 ++++++ .../fleet_agent_attributes_tags_items.py | 43 ++ .../v2/model/fleet_agent_info.py | 54 ++ .../v2/model/fleet_agent_info_attributes.py | 76 ++ .../v2/model/fleet_agent_info_details.py | 270 ++++++++ .../model/fleet_agent_info_resource_type.py | 35 + .../v2/model/fleet_agent_info_response.py | 40 ++ .../v2/model/fleet_agents_response.py | 53 ++ .../v2/model/fleet_agents_response_data.py | 52 ++ .../fleet_agents_response_data_attributes.py | 42 ++ .../v2/model/fleet_agents_response_meta.py | 36 + .../v2/model/fleet_configuration_file.py | 56 ++ .../v2/model/fleet_configuration_layer.py | 80 +++ .../v2/model/fleet_detected_integration.py | 43 ++ .../v2/model/fleet_integration_details.py | 112 +++ .../v2/model/fleet_integrations_by_status.py | 90 +++ .../v2/model/fleet_otel_collector.py | 17 + src/datadog_api_client/v2/models/__init__.py | 34 + tests/v2/features/fleet_automation.feature | 45 ++ tests/v2/features/undo.json | 12 + 26 files changed, 2359 insertions(+), 2 deletions(-) create mode 100644 examples/v2/fleet-automation/GetFleetAgentInfo.py create mode 100644 examples/v2/fleet-automation/ListFleetAgents.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_attributes.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_attributes_tags_items.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_info.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_info_attributes.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_info_details.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_info_resource_type.py create mode 100644 src/datadog_api_client/v2/model/fleet_agent_info_response.py create mode 100644 src/datadog_api_client/v2/model/fleet_agents_response.py create mode 100644 src/datadog_api_client/v2/model/fleet_agents_response_data.py create mode 100644 src/datadog_api_client/v2/model/fleet_agents_response_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/fleet_agents_response_meta.py create mode 100644 src/datadog_api_client/v2/model/fleet_configuration_file.py create mode 100644 src/datadog_api_client/v2/model/fleet_configuration_layer.py create mode 100644 src/datadog_api_client/v2/model/fleet_detected_integration.py create mode 100644 src/datadog_api_client/v2/model/fleet_integration_details.py create mode 100644 src/datadog_api_client/v2/model/fleet_integrations_by_status.py create mode 100644 src/datadog_api_client/v2/model/fleet_otel_collector.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bdfd07431..16572dbd87 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -21857,6 +21857,278 @@ components: - PIPELINES_FAILED_DESCENDING - PIPELINES_DURATION_LOST_ASCENDING - PIPELINES_DURATION_LOST_DESCENDING + FleetAgentAttributes: + description: Attributes of a Datadog Agent in the list view. + properties: + agent_version: + description: The Datadog Agent version. + example: 7.50.0 + type: string + api_key_name: + description: The API key name (if available and not redacted). + example: Production API Key + type: string + api_key_uuid: + description: The API key UUID. + example: a1b2c3d4-e5f6-4321-a123-123456789abc + type: string + cloud_provider: + description: The cloud provider where the agent is running. + example: aws + type: string + cluster_name: + description: Kubernetes cluster name (if applicable). + type: string + datadog_agent_key: + description: The unique agent key identifier. + example: my-agent-hostname + type: string + enabled_products: + description: Datadog products enabled on the agent. + items: + type: string + type: array + envs: + description: Environments the agent is reporting from. + items: + type: string + type: array + first_seen_at: + description: Timestamp when the agent was first seen. + format: int64 + type: integer + hostname: + description: The hostname of the agent. + example: my-hostname + type: string + ip_addresses: + description: IP addresses of the agent. + items: + type: string + type: array + is_single_step_instrumentation_enabled: + description: Whether single-step instrumentation is enabled. + type: boolean + last_restart_at: + description: Timestamp of the last agent restart. + format: int64 + type: integer + os: + description: The operating system. + example: linux + type: string + otel_collector_version: + description: OpenTelemetry collector version (if applicable). + type: string + otel_collector_versions: + description: List of OpenTelemetry collector versions (if applicable). + items: + type: string + type: array + pod_name: + description: Kubernetes pod name (if applicable). + type: string + remote_agent_management: + description: Remote agent management status. + example: enabled + type: string + remote_config_status: + description: Remote configuration status. + example: connected + type: string + services: + description: Services running on the agent. + items: + type: string + type: array + tags: + description: Tags associated with the agent. + items: + $ref: '#/components/schemas/FleetAgentAttributesTagsItems' + type: array + team: + description: Team associated with the agent. + type: string + type: object + FleetAgentAttributesTagsItems: + properties: + key: + type: string + value: + type: string + type: object + FleetAgentInfo: + description: Represents detailed information about a specific Datadog Agent. + properties: + attributes: + $ref: '#/components/schemas/FleetAgentInfoAttributes' + id: + description: The unique agent key identifier. + example: my-agent-hostname + type: string + type: + $ref: '#/components/schemas/FleetAgentInfoResourceType' + required: + - id + - type + - attributes + type: object + FleetAgentInfoAttributes: + description: Attributes for agent information. + properties: + agent_infos: + $ref: '#/components/schemas/FleetAgentInfoDetails' + configuration_files: + $ref: '#/components/schemas/FleetConfigurationLayer' + detected_integrations: + description: List of detected integrations. + items: + $ref: '#/components/schemas/FleetDetectedIntegration' + type: array + integrations: + $ref: '#/components/schemas/FleetIntegrationsByStatus' + type: object + FleetAgentInfoDetails: + description: Detailed information about a Datadog Agent. + properties: + agent_version: + description: The Datadog Agent version. + example: 7.50.0 + type: string + api_key_name: + description: The API key name (if available and not redacted). + example: Production API Key + type: string + api_key_uuid: + description: The API key UUID. + example: a1b2c3d4-e5f6-4321-a123-123456789abc + type: string + cloud_provider: + description: The cloud provider where the agent is running. + example: aws + type: string + cluster_name: + description: Kubernetes cluster name (if applicable). + type: string + datadog_agent_key: + description: The unique agent key identifier. + example: my-agent-hostname + type: string + enabled_products: + description: Datadog products enabled on the agent. + items: + type: string + type: array + env: + description: Environments the agent is reporting from. + items: + type: string + type: array + first_seen_at: + description: Timestamp when the agent was first seen. + format: int64 + type: integer + hostname: + description: The hostname of the agent. + example: my-hostname + type: string + hostname_aliases: + description: Alternative hostname list for the agent. + items: + type: string + type: array + install_method_installer_version: + description: The version of the installer used. + example: 1.2.3 + type: string + install_method_tool: + description: The tool used to install the agent. + example: chef + type: string + ip_addresses: + description: IP addresses of the agent. + items: + type: string + type: array + is_single_step_instrumentation_enabled: + description: Whether single-step instrumentation is enabled. + type: boolean + last_restart_at: + description: Timestamp of the last agent restart. + format: int64 + type: integer + os: + description: The operating system. + example: linux + type: string + os_version: + description: The operating system version. + example: Ubuntu 20.04 + type: string + otel_collector_version: + description: OpenTelemetry collector version (if applicable). + type: string + otel_collector_versions: + description: List of OpenTelemetry collector versions (if applicable). + items: + type: string + type: array + otel_collectors: + description: OpenTelemetry collectors associated with the agent (if applicable). + items: + $ref: '#/components/schemas/FleetOtelCollector' + type: array + pod_name: + description: Kubernetes pod name (if applicable). + type: string + python_version: + description: The Python version used by the agent. + example: 3.9.5 + type: string + region: + description: Regions where the agent is running. + items: + type: string + type: array + remote_agent_management: + description: Remote agent management status. + example: enabled + type: string + remote_config_status: + description: Remote configuration status. + example: connected + type: string + services: + description: Services running on the agent. + items: + type: string + type: array + tags: + description: Tags associated with the agent. + items: + type: string + type: array + team: + description: Team associated with the agent. + type: string + type: object + FleetAgentInfoResourceType: + default: datadog_agent_key + description: The type of Agent info resource. + enum: + - datadog_agent_key + example: datadog_agent_key + type: string + x-enum-varnames: + - DATADOG_AGENT_KEY + FleetAgentInfoResponse: + description: Response containing detailed information about a specific agent. + properties: + data: + $ref: '#/components/schemas/FleetAgentInfo' + required: + - data + type: object FleetAgentVersion: description: Represents an available Datadog Agent version. properties: @@ -21899,6 +22171,89 @@ components: required: - data type: object + FleetAgentsResponse: + description: Response containing a paginated list of Datadog Agents. + properties: + data: + $ref: '#/components/schemas/FleetAgentsResponseData' + meta: + $ref: '#/components/schemas/FleetAgentsResponseMeta' + required: + - data + type: object + FleetAgentsResponseData: + description: The response data containing status and agents array. + properties: + attributes: + $ref: '#/components/schemas/FleetAgentsResponseDataAttributes' + id: + description: Status identifier. + example: done + type: string + type: + description: Resource type. + example: status + type: string + required: + - id + - type + - attributes + type: object + FleetAgentsResponseDataAttributes: + properties: + agents: + description: Array of agents matching the query criteria. + items: + $ref: '#/components/schemas/FleetAgentAttributes' + type: array + type: object + FleetAgentsResponseMeta: + description: Metadata for the list of agents response. + properties: + total_filtered_count: + description: Total number of agents matching the filter criteria across + all pages. + example: 150 + format: int64 + type: integer + type: object + FleetConfigurationFile: + description: A configuration file for an integration. + properties: + file_content: + description: The raw content of the configuration file. + type: string + file_path: + description: Path to the configuration file. + example: /conf.d/postgres.d/postgres.yaml + type: string + filename: + description: Name of the configuration file. + example: postgres.yaml + type: string + type: object + FleetConfigurationLayer: + description: Configuration information organized by layers. + properties: + compiled_configuration: + description: The final compiled configuration. + type: string + env_configuration: + description: Configuration from environment variables. + type: string + file_configuration: + description: Configuration from files. + type: string + parsed_configuration: + description: Parsed configuration output. + type: string + remote_configuration: + description: Remote configuration settings. + type: string + runtime_configuration: + description: Runtime configuration. + type: string + type: object FleetDeployment: description: A deployment that defines automated configuration changes for a fleet of hosts. @@ -22222,6 +22577,93 @@ components: page: $ref: '#/components/schemas/FleetDeploymentsPage' type: object + FleetDetectedIntegration: + description: An integration detected on the agent but not necessarily configured. + properties: + escaped_name: + description: Escaped integration name. + example: postgresql + type: string + prefix: + description: Integration prefix identifier. + example: postgres + type: string + type: object + FleetIntegrationDetails: + description: Detailed information about a single integration. + properties: + data_type: + description: Type of data collected (metrics, logs). + example: metrics + type: string + error_messages: + description: Error messages if the integration has issues. + items: + type: string + type: array + init_config: + description: Initialization configuration (YAML format). + type: string + instance_config: + description: Instance-specific configuration (YAML format). + type: string + is_custom_check: + description: Whether this is a custom integration. + type: boolean + log_config: + description: Log collection configuration (YAML format). + type: string + name: + description: Name of the integration instance. + type: string + source_index: + description: Index in the configuration file. + format: int64 + type: integer + source_path: + description: Path to the configuration file. + type: string + type: + description: Integration type. + example: postgres + type: string + type: object + FleetIntegrationsByStatus: + description: Integrations organized by their status. + properties: + configuration_files: + description: Configuration files for integrations. + items: + $ref: '#/components/schemas/FleetConfigurationFile' + type: array + datadog_agent_key: + description: The unique agent key identifier. + type: string + error_integrations: + description: Integrations with errors. + items: + $ref: '#/components/schemas/FleetIntegrationDetails' + type: array + missing_integrations: + description: Detected but not configured integrations. + items: + $ref: '#/components/schemas/FleetDetectedIntegration' + type: array + warning_integrations: + description: Integrations with warnings. + items: + $ref: '#/components/schemas/FleetIntegrationDetails' + type: array + working_integrations: + description: Integrations that are working correctly. + items: + $ref: '#/components/schemas/FleetIntegrationDetails' + type: array + type: object + FleetOtelCollector: + additionalProperties: {} + description: OpenTelemetry collector information. + type: object FleetSchedule: description: A schedule that automatically creates deployments based on a recurrence rule. @@ -57486,7 +57928,7 @@ info: version: '1.0' openapi: 3.0.0 paths: - /api/unstable/fleet/agents: + /api/unstable/fleet/agent_versions: get: description: 'Retrieve a list of all available Datadog Agent versions. @@ -57529,6 +57971,142 @@ paths: x-unstable: 'This endpoint is in Preview and may introduce breaking changes. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/agents: + get: + description: '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.' + operationId: ListFleetAgents + parameters: + - description: Page number for pagination (must be greater than 0). + in: query + name: page_number + required: false + schema: + format: int64 + minimum: 1 + type: integer + - description: Number of results per page (must be greater than 0 and less than + or equal to 100). + in: query + name: page_size + required: false + schema: + default: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Attribute to sort by. + in: query + name: sort_attribute + required: false + schema: + type: string + - description: Sort order (true for descending, false for ascending). + in: query + name: sort_descending + required: false + schema: + type: boolean + - description: Comma-separated list of tags to filter agents. + in: query + name: tags + required: false + schema: + type: string + - description: Filter string for narrowing down agent results. + example: hostname:my-hostname OR env:dev + in: query + name: filter + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetAgentsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List all Datadog Agents + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/agents/{agent_key}: + get: + description: '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' + operationId: GetFleetAgentInfo + parameters: + - description: The unique identifier (agent key) for the Datadog Agent. + in: path + name: agent_key + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetAgentInfoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get detailed information about an agent + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/unstable/fleet/deployments: get: description: 'Retrieve a list of all deployments for fleet automation. @@ -57622,6 +58200,77 @@ paths: type: file filter_query: env:prod type: deployment + comprehensive_configuration: + summary: Comprehensive example with multiple configuration file types + value: + data: + attributes: + config_operations: + - file_op: merge-patch + file_path: /datadog.yaml + patch: + apm_config: + apm_dd_url: https://trace.agent.datadoghq.com + enabled: true + log_level: info + logs_enabled: true + process_config: + enabled: true + - file_op: merge-patch + file_path: /security-agent.yaml + patch: + runtime_security_config: + enabled: true + fim_enabled: true + - file_op: merge-patch + file_path: /system-probe.yaml + patch: + network_config: + enabled: true + service_monitoring_config: + enabled: true + - file_op: merge-patch + file_path: /application_monitoring.yaml + patch: + enabled: true + server: + host: 0.0.0.0 + port: 8126 + - file_op: merge-patch + file_path: /conf.d/logs.d/custom-app.yaml + patch: + logs: + - path: /var/log/custom-app/*.log + service: custom-app + source: custom + type: file + - file_op: merge-patch + file_path: /conf.d/docker.d/docker-logs.yaml + patch: + logs: + - service: docker + source: docker + type: docker + - file_op: merge-patch + file_path: /conf.d/snmp.d/network-devices.yaml + patch: + init_config: + loader: core + instances: + - community_string: public + ip_address: 192.168.1.1 + - file_op: merge-patch + file_path: /conf.d/postgres.d/conf.yaml + patch: + instances: + - dbname: postgres + host: localhost + port: 5432 + username: datadog + - file_op: delete + file_path: /conf.d/deprecated-integration.yaml + filter_query: env:prod AND datacenter:us-east-1 + type: deployment delete_config_file: summary: Delete a configuration file value: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index c03060587c..3d2f2430d4 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -9174,6 +9174,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 ---------------------------------------------------------------------- @@ -9195,6 +9244,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 ------------------------------------------------------ @@ -9335,6 +9426,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 ---------------------------------------------------- diff --git a/examples/v2/fleet-automation/GetFleetAgentInfo.py b/examples/v2/fleet-automation/GetFleetAgentInfo.py new file mode 100644 index 0000000000..abe70c9d49 --- /dev/null +++ b/examples/v2/fleet-automation/GetFleetAgentInfo.py @@ -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) diff --git a/examples/v2/fleet-automation/ListFleetAgents.py b/examples/v2/fleet-automation/ListFleetAgents.py new file mode 100644 index 0000000000..1f4c3ca078 --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetAgents.py @@ -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) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index a9089960ff..758e7fcd6f 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -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, diff --git a/src/datadog_api_client/v2/api/fleet_automation_api.py b/src/datadog_api_client/v2/api/fleet_automation_api.py index 379c77346f..7659af7f03 100644 --- a/src/datadog_api_client/v2/api/fleet_automation_api.py +++ b/src/datadog_api_client/v2/api/fleet_automation_api.py @@ -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 @@ -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,), @@ -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", @@ -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, @@ -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: diff --git a/src/datadog_api_client/v2/model/fleet_agent_attributes.py b/src/datadog_api_client/v2/model/fleet_agent_attributes.py new file mode 100644 index 0000000000..e5aca73abb --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_attributes.py @@ -0,0 +1,214 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agent_attributes_tags_items import FleetAgentAttributesTagsItems + + +class FleetAgentAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agent_attributes_tags_items import FleetAgentAttributesTagsItems + + return { + "agent_version": (str,), + "api_key_name": (str,), + "api_key_uuid": (str,), + "cloud_provider": (str,), + "cluster_name": (str,), + "datadog_agent_key": (str,), + "enabled_products": ([str],), + "envs": ([str],), + "first_seen_at": (int,), + "hostname": (str,), + "ip_addresses": ([str],), + "is_single_step_instrumentation_enabled": (bool,), + "last_restart_at": (int,), + "os": (str,), + "otel_collector_version": (str,), + "otel_collector_versions": ([str],), + "pod_name": (str,), + "remote_agent_management": (str,), + "remote_config_status": (str,), + "services": ([str],), + "tags": ([FleetAgentAttributesTagsItems],), + "team": (str,), + } + + attribute_map = { + "agent_version": "agent_version", + "api_key_name": "api_key_name", + "api_key_uuid": "api_key_uuid", + "cloud_provider": "cloud_provider", + "cluster_name": "cluster_name", + "datadog_agent_key": "datadog_agent_key", + "enabled_products": "enabled_products", + "envs": "envs", + "first_seen_at": "first_seen_at", + "hostname": "hostname", + "ip_addresses": "ip_addresses", + "is_single_step_instrumentation_enabled": "is_single_step_instrumentation_enabled", + "last_restart_at": "last_restart_at", + "os": "os", + "otel_collector_version": "otel_collector_version", + "otel_collector_versions": "otel_collector_versions", + "pod_name": "pod_name", + "remote_agent_management": "remote_agent_management", + "remote_config_status": "remote_config_status", + "services": "services", + "tags": "tags", + "team": "team", + } + + def __init__( + self_, + agent_version: Union[str, UnsetType] = unset, + api_key_name: Union[str, UnsetType] = unset, + api_key_uuid: Union[str, UnsetType] = unset, + cloud_provider: Union[str, UnsetType] = unset, + cluster_name: Union[str, UnsetType] = unset, + datadog_agent_key: Union[str, UnsetType] = unset, + enabled_products: Union[List[str], UnsetType] = unset, + envs: Union[List[str], UnsetType] = unset, + first_seen_at: Union[int, UnsetType] = unset, + hostname: Union[str, UnsetType] = unset, + ip_addresses: Union[List[str], UnsetType] = unset, + is_single_step_instrumentation_enabled: Union[bool, UnsetType] = unset, + last_restart_at: Union[int, UnsetType] = unset, + os: Union[str, UnsetType] = unset, + otel_collector_version: Union[str, UnsetType] = unset, + otel_collector_versions: Union[List[str], UnsetType] = unset, + pod_name: Union[str, UnsetType] = unset, + remote_agent_management: Union[str, UnsetType] = unset, + remote_config_status: Union[str, UnsetType] = unset, + services: Union[List[str], UnsetType] = unset, + tags: Union[List[FleetAgentAttributesTagsItems], UnsetType] = unset, + team: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a Datadog Agent in the list view. + + :param agent_version: The Datadog Agent version. + :type agent_version: str, optional + + :param api_key_name: The API key name (if available and not redacted). + :type api_key_name: str, optional + + :param api_key_uuid: The API key UUID. + :type api_key_uuid: str, optional + + :param cloud_provider: The cloud provider where the agent is running. + :type cloud_provider: str, optional + + :param cluster_name: Kubernetes cluster name (if applicable). + :type cluster_name: str, optional + + :param datadog_agent_key: The unique agent key identifier. + :type datadog_agent_key: str, optional + + :param enabled_products: Datadog products enabled on the agent. + :type enabled_products: [str], optional + + :param envs: Environments the agent is reporting from. + :type envs: [str], optional + + :param first_seen_at: Timestamp when the agent was first seen. + :type first_seen_at: int, optional + + :param hostname: The hostname of the agent. + :type hostname: str, optional + + :param ip_addresses: IP addresses of the agent. + :type ip_addresses: [str], optional + + :param is_single_step_instrumentation_enabled: Whether single-step instrumentation is enabled. + :type is_single_step_instrumentation_enabled: bool, optional + + :param last_restart_at: Timestamp of the last agent restart. + :type last_restart_at: int, optional + + :param os: The operating system. + :type os: str, optional + + :param otel_collector_version: OpenTelemetry collector version (if applicable). + :type otel_collector_version: str, optional + + :param otel_collector_versions: List of OpenTelemetry collector versions (if applicable). + :type otel_collector_versions: [str], optional + + :param pod_name: Kubernetes pod name (if applicable). + :type pod_name: str, optional + + :param remote_agent_management: Remote agent management status. + :type remote_agent_management: str, optional + + :param remote_config_status: Remote configuration status. + :type remote_config_status: str, optional + + :param services: Services running on the agent. + :type services: [str], optional + + :param tags: Tags associated with the agent. + :type tags: [FleetAgentAttributesTagsItems], optional + + :param team: Team associated with the agent. + :type team: str, optional + """ + if agent_version is not unset: + kwargs["agent_version"] = agent_version + if api_key_name is not unset: + kwargs["api_key_name"] = api_key_name + if api_key_uuid is not unset: + kwargs["api_key_uuid"] = api_key_uuid + if cloud_provider is not unset: + kwargs["cloud_provider"] = cloud_provider + if cluster_name is not unset: + kwargs["cluster_name"] = cluster_name + if datadog_agent_key is not unset: + kwargs["datadog_agent_key"] = datadog_agent_key + if enabled_products is not unset: + kwargs["enabled_products"] = enabled_products + if envs is not unset: + kwargs["envs"] = envs + if first_seen_at is not unset: + kwargs["first_seen_at"] = first_seen_at + if hostname is not unset: + kwargs["hostname"] = hostname + if ip_addresses is not unset: + kwargs["ip_addresses"] = ip_addresses + if is_single_step_instrumentation_enabled is not unset: + kwargs["is_single_step_instrumentation_enabled"] = is_single_step_instrumentation_enabled + if last_restart_at is not unset: + kwargs["last_restart_at"] = last_restart_at + if os is not unset: + kwargs["os"] = os + if otel_collector_version is not unset: + kwargs["otel_collector_version"] = otel_collector_version + if otel_collector_versions is not unset: + kwargs["otel_collector_versions"] = otel_collector_versions + if pod_name is not unset: + kwargs["pod_name"] = pod_name + if remote_agent_management is not unset: + kwargs["remote_agent_management"] = remote_agent_management + if remote_config_status is not unset: + kwargs["remote_config_status"] = remote_config_status + if services is not unset: + kwargs["services"] = services + if tags is not unset: + kwargs["tags"] = tags + if team is not unset: + kwargs["team"] = team + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_agent_attributes_tags_items.py b/src/datadog_api_client/v2/model/fleet_agent_attributes_tags_items.py new file mode 100644 index 0000000000..4d0bb0e3aa --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_attributes_tags_items.py @@ -0,0 +1,43 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class FleetAgentAttributesTagsItems(ModelNormal): + @cached_property + def openapi_types(_): + return { + "key": (str,), + "value": (str,), + } + + attribute_map = { + "key": "key", + "value": "value", + } + + def __init__(self_, key: Union[str, UnsetType] = unset, value: Union[str, UnsetType] = unset, **kwargs): + """ + + + :param key: + :type key: str, optional + + :param value: + :type value: str, optional + """ + if key is not unset: + kwargs["key"] = key + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_agent_info.py b/src/datadog_api_client/v2/model/fleet_agent_info.py new file mode 100644 index 0000000000..33d80b50ea --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_info.py @@ -0,0 +1,54 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agent_info_attributes import FleetAgentInfoAttributes + from datadog_api_client.v2.model.fleet_agent_info_resource_type import FleetAgentInfoResourceType + + +class FleetAgentInfo(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agent_info_attributes import FleetAgentInfoAttributes + from datadog_api_client.v2.model.fleet_agent_info_resource_type import FleetAgentInfoResourceType + + return { + "attributes": (FleetAgentInfoAttributes,), + "id": (str,), + "type": (FleetAgentInfoResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: FleetAgentInfoAttributes, id: str, type: FleetAgentInfoResourceType, **kwargs): + """ + Represents detailed information about a specific Datadog Agent. + + :param attributes: Attributes for agent information. + :type attributes: FleetAgentInfoAttributes + + :param id: The unique agent key identifier. + :type id: str + + :param type: The type of Agent info resource. + :type type: FleetAgentInfoResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/fleet_agent_info_attributes.py b/src/datadog_api_client/v2/model/fleet_agent_info_attributes.py new file mode 100644 index 0000000000..a685e5ae61 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_info_attributes.py @@ -0,0 +1,76 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agent_info_details import FleetAgentInfoDetails + from datadog_api_client.v2.model.fleet_configuration_layer import FleetConfigurationLayer + from datadog_api_client.v2.model.fleet_detected_integration import FleetDetectedIntegration + from datadog_api_client.v2.model.fleet_integrations_by_status import FleetIntegrationsByStatus + + +class FleetAgentInfoAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agent_info_details import FleetAgentInfoDetails + from datadog_api_client.v2.model.fleet_configuration_layer import FleetConfigurationLayer + from datadog_api_client.v2.model.fleet_detected_integration import FleetDetectedIntegration + from datadog_api_client.v2.model.fleet_integrations_by_status import FleetIntegrationsByStatus + + return { + "agent_infos": (FleetAgentInfoDetails,), + "configuration_files": (FleetConfigurationLayer,), + "detected_integrations": ([FleetDetectedIntegration],), + "integrations": (FleetIntegrationsByStatus,), + } + + attribute_map = { + "agent_infos": "agent_infos", + "configuration_files": "configuration_files", + "detected_integrations": "detected_integrations", + "integrations": "integrations", + } + + def __init__( + self_, + agent_infos: Union[FleetAgentInfoDetails, UnsetType] = unset, + configuration_files: Union[FleetConfigurationLayer, UnsetType] = unset, + detected_integrations: Union[List[FleetDetectedIntegration], UnsetType] = unset, + integrations: Union[FleetIntegrationsByStatus, UnsetType] = unset, + **kwargs, + ): + """ + Attributes for agent information. + + :param agent_infos: Detailed information about a Datadog Agent. + :type agent_infos: FleetAgentInfoDetails, optional + + :param configuration_files: Configuration information organized by layers. + :type configuration_files: FleetConfigurationLayer, optional + + :param detected_integrations: List of detected integrations. + :type detected_integrations: [FleetDetectedIntegration], optional + + :param integrations: Integrations organized by their status. + :type integrations: FleetIntegrationsByStatus, optional + """ + if agent_infos is not unset: + kwargs["agent_infos"] = agent_infos + if configuration_files is not unset: + kwargs["configuration_files"] = configuration_files + if detected_integrations is not unset: + kwargs["detected_integrations"] = detected_integrations + if integrations is not unset: + kwargs["integrations"] = integrations + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_agent_info_details.py b/src/datadog_api_client/v2/model/fleet_agent_info_details.py new file mode 100644 index 0000000000..d9491ca82e --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_info_details.py @@ -0,0 +1,270 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_otel_collector import FleetOtelCollector + + +class FleetAgentInfoDetails(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_otel_collector import FleetOtelCollector + + return { + "agent_version": (str,), + "api_key_name": (str,), + "api_key_uuid": (str,), + "cloud_provider": (str,), + "cluster_name": (str,), + "datadog_agent_key": (str,), + "enabled_products": ([str],), + "env": ([str],), + "first_seen_at": (int,), + "hostname": (str,), + "hostname_aliases": ([str],), + "install_method_installer_version": (str,), + "install_method_tool": (str,), + "ip_addresses": ([str],), + "is_single_step_instrumentation_enabled": (bool,), + "last_restart_at": (int,), + "os": (str,), + "os_version": (str,), + "otel_collector_version": (str,), + "otel_collector_versions": ([str],), + "otel_collectors": ([FleetOtelCollector],), + "pod_name": (str,), + "python_version": (str,), + "region": ([str],), + "remote_agent_management": (str,), + "remote_config_status": (str,), + "services": ([str],), + "tags": ([str],), + "team": (str,), + } + + attribute_map = { + "agent_version": "agent_version", + "api_key_name": "api_key_name", + "api_key_uuid": "api_key_uuid", + "cloud_provider": "cloud_provider", + "cluster_name": "cluster_name", + "datadog_agent_key": "datadog_agent_key", + "enabled_products": "enabled_products", + "env": "env", + "first_seen_at": "first_seen_at", + "hostname": "hostname", + "hostname_aliases": "hostname_aliases", + "install_method_installer_version": "install_method_installer_version", + "install_method_tool": "install_method_tool", + "ip_addresses": "ip_addresses", + "is_single_step_instrumentation_enabled": "is_single_step_instrumentation_enabled", + "last_restart_at": "last_restart_at", + "os": "os", + "os_version": "os_version", + "otel_collector_version": "otel_collector_version", + "otel_collector_versions": "otel_collector_versions", + "otel_collectors": "otel_collectors", + "pod_name": "pod_name", + "python_version": "python_version", + "region": "region", + "remote_agent_management": "remote_agent_management", + "remote_config_status": "remote_config_status", + "services": "services", + "tags": "tags", + "team": "team", + } + + def __init__( + self_, + agent_version: Union[str, UnsetType] = unset, + api_key_name: Union[str, UnsetType] = unset, + api_key_uuid: Union[str, UnsetType] = unset, + cloud_provider: Union[str, UnsetType] = unset, + cluster_name: Union[str, UnsetType] = unset, + datadog_agent_key: Union[str, UnsetType] = unset, + enabled_products: Union[List[str], UnsetType] = unset, + env: Union[List[str], UnsetType] = unset, + first_seen_at: Union[int, UnsetType] = unset, + hostname: Union[str, UnsetType] = unset, + hostname_aliases: Union[List[str], UnsetType] = unset, + install_method_installer_version: Union[str, UnsetType] = unset, + install_method_tool: Union[str, UnsetType] = unset, + ip_addresses: Union[List[str], UnsetType] = unset, + is_single_step_instrumentation_enabled: Union[bool, UnsetType] = unset, + last_restart_at: Union[int, UnsetType] = unset, + os: Union[str, UnsetType] = unset, + os_version: Union[str, UnsetType] = unset, + otel_collector_version: Union[str, UnsetType] = unset, + otel_collector_versions: Union[List[str], UnsetType] = unset, + otel_collectors: Union[List[FleetOtelCollector], UnsetType] = unset, + pod_name: Union[str, UnsetType] = unset, + python_version: Union[str, UnsetType] = unset, + region: Union[List[str], UnsetType] = unset, + remote_agent_management: Union[str, UnsetType] = unset, + remote_config_status: Union[str, UnsetType] = unset, + services: Union[List[str], UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + team: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Detailed information about a Datadog Agent. + + :param agent_version: The Datadog Agent version. + :type agent_version: str, optional + + :param api_key_name: The API key name (if available and not redacted). + :type api_key_name: str, optional + + :param api_key_uuid: The API key UUID. + :type api_key_uuid: str, optional + + :param cloud_provider: The cloud provider where the agent is running. + :type cloud_provider: str, optional + + :param cluster_name: Kubernetes cluster name (if applicable). + :type cluster_name: str, optional + + :param datadog_agent_key: The unique agent key identifier. + :type datadog_agent_key: str, optional + + :param enabled_products: Datadog products enabled on the agent. + :type enabled_products: [str], optional + + :param env: Environments the agent is reporting from. + :type env: [str], optional + + :param first_seen_at: Timestamp when the agent was first seen. + :type first_seen_at: int, optional + + :param hostname: The hostname of the agent. + :type hostname: str, optional + + :param hostname_aliases: Alternative hostname list for the agent. + :type hostname_aliases: [str], optional + + :param install_method_installer_version: The version of the installer used. + :type install_method_installer_version: str, optional + + :param install_method_tool: The tool used to install the agent. + :type install_method_tool: str, optional + + :param ip_addresses: IP addresses of the agent. + :type ip_addresses: [str], optional + + :param is_single_step_instrumentation_enabled: Whether single-step instrumentation is enabled. + :type is_single_step_instrumentation_enabled: bool, optional + + :param last_restart_at: Timestamp of the last agent restart. + :type last_restart_at: int, optional + + :param os: The operating system. + :type os: str, optional + + :param os_version: The operating system version. + :type os_version: str, optional + + :param otel_collector_version: OpenTelemetry collector version (if applicable). + :type otel_collector_version: str, optional + + :param otel_collector_versions: List of OpenTelemetry collector versions (if applicable). + :type otel_collector_versions: [str], optional + + :param otel_collectors: OpenTelemetry collectors associated with the agent (if applicable). + :type otel_collectors: [FleetOtelCollector], optional + + :param pod_name: Kubernetes pod name (if applicable). + :type pod_name: str, optional + + :param python_version: The Python version used by the agent. + :type python_version: str, optional + + :param region: Regions where the agent is running. + :type region: [str], optional + + :param remote_agent_management: Remote agent management status. + :type remote_agent_management: str, optional + + :param remote_config_status: Remote configuration status. + :type remote_config_status: str, optional + + :param services: Services running on the agent. + :type services: [str], optional + + :param tags: Tags associated with the agent. + :type tags: [str], optional + + :param team: Team associated with the agent. + :type team: str, optional + """ + if agent_version is not unset: + kwargs["agent_version"] = agent_version + if api_key_name is not unset: + kwargs["api_key_name"] = api_key_name + if api_key_uuid is not unset: + kwargs["api_key_uuid"] = api_key_uuid + if cloud_provider is not unset: + kwargs["cloud_provider"] = cloud_provider + if cluster_name is not unset: + kwargs["cluster_name"] = cluster_name + if datadog_agent_key is not unset: + kwargs["datadog_agent_key"] = datadog_agent_key + if enabled_products is not unset: + kwargs["enabled_products"] = enabled_products + if env is not unset: + kwargs["env"] = env + if first_seen_at is not unset: + kwargs["first_seen_at"] = first_seen_at + if hostname is not unset: + kwargs["hostname"] = hostname + if hostname_aliases is not unset: + kwargs["hostname_aliases"] = hostname_aliases + if install_method_installer_version is not unset: + kwargs["install_method_installer_version"] = install_method_installer_version + if install_method_tool is not unset: + kwargs["install_method_tool"] = install_method_tool + if ip_addresses is not unset: + kwargs["ip_addresses"] = ip_addresses + if is_single_step_instrumentation_enabled is not unset: + kwargs["is_single_step_instrumentation_enabled"] = is_single_step_instrumentation_enabled + if last_restart_at is not unset: + kwargs["last_restart_at"] = last_restart_at + if os is not unset: + kwargs["os"] = os + if os_version is not unset: + kwargs["os_version"] = os_version + if otel_collector_version is not unset: + kwargs["otel_collector_version"] = otel_collector_version + if otel_collector_versions is not unset: + kwargs["otel_collector_versions"] = otel_collector_versions + if otel_collectors is not unset: + kwargs["otel_collectors"] = otel_collectors + if pod_name is not unset: + kwargs["pod_name"] = pod_name + if python_version is not unset: + kwargs["python_version"] = python_version + if region is not unset: + kwargs["region"] = region + if remote_agent_management is not unset: + kwargs["remote_agent_management"] = remote_agent_management + if remote_config_status is not unset: + kwargs["remote_config_status"] = remote_config_status + if services is not unset: + kwargs["services"] = services + if tags is not unset: + kwargs["tags"] = tags + if team is not unset: + kwargs["team"] = team + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_agent_info_resource_type.py b/src/datadog_api_client/v2/model/fleet_agent_info_resource_type.py new file mode 100644 index 0000000000..b84a0a50b2 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_info_resource_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class FleetAgentInfoResourceType(ModelSimple): + """ + The type of Agent info resource. + + :param value: If omitted defaults to "datadog_agent_key". Must be one of ["datadog_agent_key"]. + :type value: str + """ + + allowed_values = { + "datadog_agent_key", + } + DATADOG_AGENT_KEY: ClassVar["FleetAgentInfoResourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +FleetAgentInfoResourceType.DATADOG_AGENT_KEY = FleetAgentInfoResourceType("datadog_agent_key") diff --git a/src/datadog_api_client/v2/model/fleet_agent_info_response.py b/src/datadog_api_client/v2/model/fleet_agent_info_response.py new file mode 100644 index 0000000000..42ee4ee058 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agent_info_response.py @@ -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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agent_info import FleetAgentInfo + + +class FleetAgentInfoResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agent_info import FleetAgentInfo + + return { + "data": (FleetAgentInfo,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: FleetAgentInfo, **kwargs): + """ + Response containing detailed information about a specific agent. + + :param data: Represents detailed information about a specific Datadog Agent. + :type data: FleetAgentInfo + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/fleet_agents_response.py b/src/datadog_api_client/v2/model/fleet_agents_response.py new file mode 100644 index 0000000000..c1c4b73c85 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agents_response.py @@ -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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agents_response_data import FleetAgentsResponseData + from datadog_api_client.v2.model.fleet_agents_response_meta import FleetAgentsResponseMeta + + +class FleetAgentsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agents_response_data import FleetAgentsResponseData + from datadog_api_client.v2.model.fleet_agents_response_meta import FleetAgentsResponseMeta + + return { + "data": (FleetAgentsResponseData,), + "meta": (FleetAgentsResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__( + self_, data: FleetAgentsResponseData, meta: Union[FleetAgentsResponseMeta, UnsetType] = unset, **kwargs + ): + """ + Response containing a paginated list of Datadog Agents. + + :param data: The response data containing status and agents array. + :type data: FleetAgentsResponseData + + :param meta: Metadata for the list of agents response. + :type meta: FleetAgentsResponseMeta, optional + """ + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/fleet_agents_response_data.py b/src/datadog_api_client/v2/model/fleet_agents_response_data.py new file mode 100644 index 0000000000..d09b3081a4 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agents_response_data.py @@ -0,0 +1,52 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agents_response_data_attributes import FleetAgentsResponseDataAttributes + + +class FleetAgentsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agents_response_data_attributes import FleetAgentsResponseDataAttributes + + return { + "attributes": (FleetAgentsResponseDataAttributes,), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: FleetAgentsResponseDataAttributes, id: str, type: str, **kwargs): + """ + The response data containing status and agents array. + + :param attributes: + :type attributes: FleetAgentsResponseDataAttributes + + :param id: Status identifier. + :type id: str + + :param type: Resource type. + :type type: str + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/fleet_agents_response_data_attributes.py b/src/datadog_api_client/v2/model/fleet_agents_response_data_attributes.py new file mode 100644 index 0000000000..3a66bca439 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agents_response_data_attributes.py @@ -0,0 +1,42 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_agent_attributes import FleetAgentAttributes + + +class FleetAgentsResponseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_agent_attributes import FleetAgentAttributes + + return { + "agents": ([FleetAgentAttributes],), + } + + attribute_map = { + "agents": "agents", + } + + def __init__(self_, agents: Union[List[FleetAgentAttributes], UnsetType] = unset, **kwargs): + """ + + + :param agents: Array of agents matching the query criteria. + :type agents: [FleetAgentAttributes], optional + """ + if agents is not unset: + kwargs["agents"] = agents + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_agents_response_meta.py b/src/datadog_api_client/v2/model/fleet_agents_response_meta.py new file mode 100644 index 0000000000..d75812ae8e --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_agents_response_meta.py @@ -0,0 +1,36 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class FleetAgentsResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "total_filtered_count": (int,), + } + + attribute_map = { + "total_filtered_count": "total_filtered_count", + } + + def __init__(self_, total_filtered_count: Union[int, UnsetType] = unset, **kwargs): + """ + Metadata for the list of agents response. + + :param total_filtered_count: Total number of agents matching the filter criteria across all pages. + :type total_filtered_count: int, optional + """ + if total_filtered_count is not unset: + kwargs["total_filtered_count"] = total_filtered_count + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_configuration_file.py b/src/datadog_api_client/v2/model/fleet_configuration_file.py new file mode 100644 index 0000000000..218e23333e --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_configuration_file.py @@ -0,0 +1,56 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class FleetConfigurationFile(ModelNormal): + @cached_property + def openapi_types(_): + return { + "file_content": (str,), + "file_path": (str,), + "filename": (str,), + } + + attribute_map = { + "file_content": "file_content", + "file_path": "file_path", + "filename": "filename", + } + + def __init__( + self_, + file_content: Union[str, UnsetType] = unset, + file_path: Union[str, UnsetType] = unset, + filename: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A configuration file for an integration. + + :param file_content: The raw content of the configuration file. + :type file_content: str, optional + + :param file_path: Path to the configuration file. + :type file_path: str, optional + + :param filename: Name of the configuration file. + :type filename: str, optional + """ + if file_content is not unset: + kwargs["file_content"] = file_content + if file_path is not unset: + kwargs["file_path"] = file_path + if filename is not unset: + kwargs["filename"] = filename + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_configuration_layer.py b/src/datadog_api_client/v2/model/fleet_configuration_layer.py new file mode 100644 index 0000000000..86c1fb58ef --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_configuration_layer.py @@ -0,0 +1,80 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class FleetConfigurationLayer(ModelNormal): + @cached_property + def openapi_types(_): + return { + "compiled_configuration": (str,), + "env_configuration": (str,), + "file_configuration": (str,), + "parsed_configuration": (str,), + "remote_configuration": (str,), + "runtime_configuration": (str,), + } + + attribute_map = { + "compiled_configuration": "compiled_configuration", + "env_configuration": "env_configuration", + "file_configuration": "file_configuration", + "parsed_configuration": "parsed_configuration", + "remote_configuration": "remote_configuration", + "runtime_configuration": "runtime_configuration", + } + + def __init__( + self_, + compiled_configuration: Union[str, UnsetType] = unset, + env_configuration: Union[str, UnsetType] = unset, + file_configuration: Union[str, UnsetType] = unset, + parsed_configuration: Union[str, UnsetType] = unset, + remote_configuration: Union[str, UnsetType] = unset, + runtime_configuration: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Configuration information organized by layers. + + :param compiled_configuration: The final compiled configuration. + :type compiled_configuration: str, optional + + :param env_configuration: Configuration from environment variables. + :type env_configuration: str, optional + + :param file_configuration: Configuration from files. + :type file_configuration: str, optional + + :param parsed_configuration: Parsed configuration output. + :type parsed_configuration: str, optional + + :param remote_configuration: Remote configuration settings. + :type remote_configuration: str, optional + + :param runtime_configuration: Runtime configuration. + :type runtime_configuration: str, optional + """ + if compiled_configuration is not unset: + kwargs["compiled_configuration"] = compiled_configuration + if env_configuration is not unset: + kwargs["env_configuration"] = env_configuration + if file_configuration is not unset: + kwargs["file_configuration"] = file_configuration + if parsed_configuration is not unset: + kwargs["parsed_configuration"] = parsed_configuration + if remote_configuration is not unset: + kwargs["remote_configuration"] = remote_configuration + if runtime_configuration is not unset: + kwargs["runtime_configuration"] = runtime_configuration + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_detected_integration.py b/src/datadog_api_client/v2/model/fleet_detected_integration.py new file mode 100644 index 0000000000..d863492c32 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_detected_integration.py @@ -0,0 +1,43 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class FleetDetectedIntegration(ModelNormal): + @cached_property + def openapi_types(_): + return { + "escaped_name": (str,), + "prefix": (str,), + } + + attribute_map = { + "escaped_name": "escaped_name", + "prefix": "prefix", + } + + def __init__(self_, escaped_name: Union[str, UnsetType] = unset, prefix: Union[str, UnsetType] = unset, **kwargs): + """ + An integration detected on the agent but not necessarily configured. + + :param escaped_name: Escaped integration name. + :type escaped_name: str, optional + + :param prefix: Integration prefix identifier. + :type prefix: str, optional + """ + if escaped_name is not unset: + kwargs["escaped_name"] = escaped_name + if prefix is not unset: + kwargs["prefix"] = prefix + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_integration_details.py b/src/datadog_api_client/v2/model/fleet_integration_details.py new file mode 100644 index 0000000000..45af4411aa --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_integration_details.py @@ -0,0 +1,112 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class FleetIntegrationDetails(ModelNormal): + @cached_property + def openapi_types(_): + return { + "data_type": (str,), + "error_messages": ([str],), + "init_config": (str,), + "instance_config": (str,), + "is_custom_check": (bool,), + "log_config": (str,), + "name": (str,), + "source_index": (int,), + "source_path": (str,), + "type": (str,), + } + + attribute_map = { + "data_type": "data_type", + "error_messages": "error_messages", + "init_config": "init_config", + "instance_config": "instance_config", + "is_custom_check": "is_custom_check", + "log_config": "log_config", + "name": "name", + "source_index": "source_index", + "source_path": "source_path", + "type": "type", + } + + def __init__( + self_, + data_type: Union[str, UnsetType] = unset, + error_messages: Union[List[str], UnsetType] = unset, + init_config: Union[str, UnsetType] = unset, + instance_config: Union[str, UnsetType] = unset, + is_custom_check: Union[bool, UnsetType] = unset, + log_config: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + source_index: Union[int, UnsetType] = unset, + source_path: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Detailed information about a single integration. + + :param data_type: Type of data collected (metrics, logs). + :type data_type: str, optional + + :param error_messages: Error messages if the integration has issues. + :type error_messages: [str], optional + + :param init_config: Initialization configuration (YAML format). + :type init_config: str, optional + + :param instance_config: Instance-specific configuration (YAML format). + :type instance_config: str, optional + + :param is_custom_check: Whether this is a custom integration. + :type is_custom_check: bool, optional + + :param log_config: Log collection configuration (YAML format). + :type log_config: str, optional + + :param name: Name of the integration instance. + :type name: str, optional + + :param source_index: Index in the configuration file. + :type source_index: int, optional + + :param source_path: Path to the configuration file. + :type source_path: str, optional + + :param type: Integration type. + :type type: str, optional + """ + if data_type is not unset: + kwargs["data_type"] = data_type + if error_messages is not unset: + kwargs["error_messages"] = error_messages + if init_config is not unset: + kwargs["init_config"] = init_config + if instance_config is not unset: + kwargs["instance_config"] = instance_config + if is_custom_check is not unset: + kwargs["is_custom_check"] = is_custom_check + if log_config is not unset: + kwargs["log_config"] = log_config + if name is not unset: + kwargs["name"] = name + if source_index is not unset: + kwargs["source_index"] = source_index + if source_path is not unset: + kwargs["source_path"] = source_path + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_integrations_by_status.py b/src/datadog_api_client/v2/model/fleet_integrations_by_status.py new file mode 100644 index 0000000000..4efdff9d89 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_integrations_by_status.py @@ -0,0 +1,90 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.fleet_configuration_file import FleetConfigurationFile + from datadog_api_client.v2.model.fleet_integration_details import FleetIntegrationDetails + from datadog_api_client.v2.model.fleet_detected_integration import FleetDetectedIntegration + + +class FleetIntegrationsByStatus(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.fleet_configuration_file import FleetConfigurationFile + from datadog_api_client.v2.model.fleet_integration_details import FleetIntegrationDetails + from datadog_api_client.v2.model.fleet_detected_integration import FleetDetectedIntegration + + return { + "configuration_files": ([FleetConfigurationFile],), + "datadog_agent_key": (str,), + "error_integrations": ([FleetIntegrationDetails],), + "missing_integrations": ([FleetDetectedIntegration],), + "warning_integrations": ([FleetIntegrationDetails],), + "working_integrations": ([FleetIntegrationDetails],), + } + + attribute_map = { + "configuration_files": "configuration_files", + "datadog_agent_key": "datadog_agent_key", + "error_integrations": "error_integrations", + "missing_integrations": "missing_integrations", + "warning_integrations": "warning_integrations", + "working_integrations": "working_integrations", + } + + def __init__( + self_, + configuration_files: Union[List[FleetConfigurationFile], UnsetType] = unset, + datadog_agent_key: Union[str, UnsetType] = unset, + error_integrations: Union[List[FleetIntegrationDetails], UnsetType] = unset, + missing_integrations: Union[List[FleetDetectedIntegration], UnsetType] = unset, + warning_integrations: Union[List[FleetIntegrationDetails], UnsetType] = unset, + working_integrations: Union[List[FleetIntegrationDetails], UnsetType] = unset, + **kwargs, + ): + """ + Integrations organized by their status. + + :param configuration_files: Configuration files for integrations. + :type configuration_files: [FleetConfigurationFile], optional + + :param datadog_agent_key: The unique agent key identifier. + :type datadog_agent_key: str, optional + + :param error_integrations: Integrations with errors. + :type error_integrations: [FleetIntegrationDetails], optional + + :param missing_integrations: Detected but not configured integrations. + :type missing_integrations: [FleetDetectedIntegration], optional + + :param warning_integrations: Integrations with warnings. + :type warning_integrations: [FleetIntegrationDetails], optional + + :param working_integrations: Integrations that are working correctly. + :type working_integrations: [FleetIntegrationDetails], optional + """ + if configuration_files is not unset: + kwargs["configuration_files"] = configuration_files + if datadog_agent_key is not unset: + kwargs["datadog_agent_key"] = datadog_agent_key + if error_integrations is not unset: + kwargs["error_integrations"] = error_integrations + if missing_integrations is not unset: + kwargs["missing_integrations"] = missing_integrations + if warning_integrations is not unset: + kwargs["warning_integrations"] = warning_integrations + if working_integrations is not unset: + kwargs["working_integrations"] = working_integrations + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/fleet_otel_collector.py b/src/datadog_api_client/v2/model/fleet_otel_collector.py new file mode 100644 index 0000000000..99cbd47bc8 --- /dev/null +++ b/src/datadog_api_client/v2/model/fleet_otel_collector.py @@ -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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, +) + + +class FleetOtelCollector(ModelNormal): + def __init__(self_, **kwargs): + """ + OpenTelemetry collector information. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index a5292461fd..756c1128b0 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1788,10 +1788,23 @@ from datadog_api_client.v2.model.flaky_tests_search_response import FlakyTestsSearchResponse from datadog_api_client.v2.model.flaky_tests_search_response_meta import FlakyTestsSearchResponseMeta from datadog_api_client.v2.model.flaky_tests_search_sort import FlakyTestsSearchSort +from datadog_api_client.v2.model.fleet_agent_attributes import FleetAgentAttributes +from datadog_api_client.v2.model.fleet_agent_attributes_tags_items import FleetAgentAttributesTagsItems +from datadog_api_client.v2.model.fleet_agent_info import FleetAgentInfo +from datadog_api_client.v2.model.fleet_agent_info_attributes import FleetAgentInfoAttributes +from datadog_api_client.v2.model.fleet_agent_info_details import FleetAgentInfoDetails +from datadog_api_client.v2.model.fleet_agent_info_resource_type import FleetAgentInfoResourceType +from datadog_api_client.v2.model.fleet_agent_info_response import FleetAgentInfoResponse from datadog_api_client.v2.model.fleet_agent_version import FleetAgentVersion from datadog_api_client.v2.model.fleet_agent_version_attributes import FleetAgentVersionAttributes from datadog_api_client.v2.model.fleet_agent_version_resource_type import FleetAgentVersionResourceType 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_agents_response_data import FleetAgentsResponseData +from datadog_api_client.v2.model.fleet_agents_response_data_attributes import FleetAgentsResponseDataAttributes +from datadog_api_client.v2.model.fleet_agents_response_meta import FleetAgentsResponseMeta +from datadog_api_client.v2.model.fleet_configuration_file import FleetConfigurationFile +from datadog_api_client.v2.model.fleet_configuration_layer import FleetConfigurationLayer from datadog_api_client.v2.model.fleet_deployment import FleetDeployment from datadog_api_client.v2.model.fleet_deployment_attributes import FleetDeploymentAttributes from datadog_api_client.v2.model.fleet_deployment_configure_attributes import FleetDeploymentConfigureAttributes @@ -1816,6 +1829,10 @@ from datadog_api_client.v2.model.fleet_deployments_page import FleetDeploymentsPage from datadog_api_client.v2.model.fleet_deployments_response import FleetDeploymentsResponse from datadog_api_client.v2.model.fleet_deployments_response_meta import FleetDeploymentsResponseMeta +from datadog_api_client.v2.model.fleet_detected_integration import FleetDetectedIntegration +from datadog_api_client.v2.model.fleet_integration_details import FleetIntegrationDetails +from datadog_api_client.v2.model.fleet_integrations_by_status import FleetIntegrationsByStatus +from datadog_api_client.v2.model.fleet_otel_collector import FleetOtelCollector from datadog_api_client.v2.model.fleet_schedule import FleetSchedule from datadog_api_client.v2.model.fleet_schedule_attributes import FleetScheduleAttributes from datadog_api_client.v2.model.fleet_schedule_create import FleetScheduleCreate @@ -6361,10 +6378,23 @@ "FlakyTestsSearchResponse", "FlakyTestsSearchResponseMeta", "FlakyTestsSearchSort", + "FleetAgentAttributes", + "FleetAgentAttributesTagsItems", + "FleetAgentInfo", + "FleetAgentInfoAttributes", + "FleetAgentInfoDetails", + "FleetAgentInfoResourceType", + "FleetAgentInfoResponse", "FleetAgentVersion", "FleetAgentVersionAttributes", "FleetAgentVersionResourceType", "FleetAgentVersionsResponse", + "FleetAgentsResponse", + "FleetAgentsResponseData", + "FleetAgentsResponseDataAttributes", + "FleetAgentsResponseMeta", + "FleetConfigurationFile", + "FleetConfigurationLayer", "FleetDeployment", "FleetDeploymentAttributes", "FleetDeploymentConfigureAttributes", @@ -6385,6 +6415,10 @@ "FleetDeploymentsPage", "FleetDeploymentsResponse", "FleetDeploymentsResponseMeta", + "FleetDetectedIntegration", + "FleetIntegrationDetails", + "FleetIntegrationsByStatus", + "FleetOtelCollector", "FleetSchedule", "FleetScheduleAttributes", "FleetScheduleCreate", diff --git a/tests/v2/features/fleet_automation.feature b/tests/v2/features/fleet_automation.feature index 0024399c74..b21fe22c60 100644 --- a/tests/v2/features/fleet_automation.feature +++ b/tests/v2/features/fleet_automation.feature @@ -152,6 +152,51 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation + Scenario: Get detailed information about an agent returns "Bad Request" response + Given operation "GetFleetAgentInfo" enabled + And new "GetFleetAgentInfo" request + And request contains "agent_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Get detailed information about an agent returns "Not Found" response + Given operation "GetFleetAgentInfo" enabled + And new "GetFleetAgentInfo" request + And request contains "agent_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: Get detailed information about an agent returns "OK" response + Given operation "GetFleetAgentInfo" enabled + And new "GetFleetAgentInfo" request + And request contains "agent_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all Datadog Agents returns "Bad Request" response + Given operation "ListFleetAgents" enabled + And new "ListFleetAgents" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all Datadog Agents returns "Not Found" response + Given operation "ListFleetAgents" enabled + And new "ListFleetAgents" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all Datadog Agents returns "OK" response + Given operation "ListFleetAgents" enabled + And new "ListFleetAgents" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation Scenario: List all available Agent versions returns "Bad Request" response Given operation "ListFleetAgentVersions" enabled diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 2231f8c961..98885927ff 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -5,6 +5,18 @@ "type": "safe" } }, + "ListFleetAgents": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, + "GetFleetAgentInfo": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, "ListFleetDeployments": { "tag": "Fleet Automation", "undo": {