diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bdfd0743160..16572dbd871b 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/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har index 6a424e43cb45..092c7fff449b 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Create-deployment-rule-returns-OK-response_36464608/recording.har @@ -26,7 +26,7 @@ "value": "application/json" } ], - "headersSize": 571, + "headersSize": 570, "httpVersion": "HTTP/1.1", "method": "POST", "postData": { @@ -79,7 +79,7 @@ "value": "application/json" } ], - "headersSize": 614, + "headersSize": 613, "httpVersion": "HTTP/1.1", "method": "POST", "postData": { @@ -164,7 +164,7 @@ "value": "*/*" } ], - "headersSize": 544, + "headersSize": 543, "httpVersion": "HTTP/1.1", "method": "DELETE", "queryString": [], diff --git a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har index 3d13a2e3fb25..7267b98f1af8 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Delete-deployment-rule-returns-No-Content-response_3926285415/recording.har @@ -141,7 +141,7 @@ }, "cookies": [], "headers": [], - "headersSize": 623, + "headersSize": 622, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 204, @@ -184,7 +184,7 @@ "value": "application/vnd.api+json" } ], - "headersSize": 683, + "headersSize": 682, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 404, @@ -221,7 +221,7 @@ }, "cookies": [], "headers": [], - "headersSize": 623, + "headersSize": 622, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 204, diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har index d6baa74b588a..f1a825ff5e65 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-gate-returns-OK-response_1812155259/recording.har @@ -51,7 +51,7 @@ "value": "application/vnd.api+json" } ], - "headersSize": 683, + "headersSize": 682, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, @@ -94,7 +94,7 @@ "value": "application/vnd.api+json" } ], - "headersSize": 681, + "headersSize": 680, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, @@ -131,7 +131,7 @@ }, "cookies": [], "headers": [], - "headersSize": 623, + "headersSize": 622, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 204, diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har index 6db6ed815fab..9af9f68cfc0c 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-Bad-Request-response_2127960932/recording.har @@ -51,7 +51,7 @@ "value": "application/vnd.api+json" } ], - "headersSize": 683, + "headersSize": 682, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, @@ -79,7 +79,7 @@ "value": "application/json" } ], - "headersSize": 614, + "headersSize": 613, "httpVersion": "HTTP/1.1", "method": "POST", "postData": { @@ -104,7 +104,7 @@ "value": "application/vnd.api+json" } ], - "headersSize": 682, + "headersSize": 681, "httpVersion": "HTTP/1.1", "redirectURL": "", "status": 200, diff --git a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har index dc151c7136a4..f38fe6931b5a 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Get-deployment-rule-returns-OK-response_3558316506/recording.har @@ -91,7 +91,7 @@ "url": "https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules" }, "response": { - "bodySize": 577, + "bodySize": 575, "content": { "mimeType": "application/vnd.api+json", "size": 577, @@ -134,7 +134,7 @@ "url": "https://api.datadoghq.com/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules/c1009845-b7a4-4701-846b-df160891ab3d" }, "response": { - "bodySize": 577, + "bodySize": 575, "content": { "mimeType": "application/vnd.api+json", "size": 577, diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har index 0263d7f5c3fb..1fdd277781a8 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-gate-returns-OK-response_3515146080/recording.har @@ -79,7 +79,7 @@ "value": "application/json" } ], - "headersSize": 607, + "headersSize": 606, "httpVersion": "HTTP/1.1", "method": "PUT", "postData": { @@ -127,7 +127,7 @@ "value": "*/*" } ], - "headersSize": 544, + "headersSize": 543, "httpVersion": "HTTP/1.1", "method": "DELETE", "queryString": [], diff --git a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har index 917f8bcd91a3..a6fdc7ea9c44 100644 --- a/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har +++ b/cassettes/v2/Deployment-Gates_4242274226/Update-deployment-rule-returns-Bad-Request-response_1486779637/recording.har @@ -79,7 +79,7 @@ "value": "application/json" } ], - "headersSize": 614, + "headersSize": 612, "httpVersion": "HTTP/1.1", "method": "POST", "postData": { @@ -217,7 +217,7 @@ "value": "*/*" } ], - "headersSize": 544, + "headersSize": 543, "httpVersion": "HTTP/1.1", "method": "DELETE", "queryString": [], diff --git a/examples/v2/fleet-automation/GetFleetAgentInfo.ts b/examples/v2/fleet-automation/GetFleetAgentInfo.ts new file mode 100644 index 000000000000..43af0d940f67 --- /dev/null +++ b/examples/v2/fleet-automation/GetFleetAgentInfo.ts @@ -0,0 +1,22 @@ +/** + * Get detailed information about an agent returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getFleetAgentInfo"] = true; +const apiInstance = new v2.FleetAutomationApi(configuration); + +const params: v2.FleetAutomationApiGetFleetAgentInfoRequest = { + agentKey: "agent_key", +}; + +apiInstance + .getFleetAgentInfo(params) + .then((data: v2.FleetAgentInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/fleet-automation/ListFleetAgents.ts b/examples/v2/fleet-automation/ListFleetAgents.ts new file mode 100644 index 000000000000..410877a1043e --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetAgents.ts @@ -0,0 +1,18 @@ +/** + * List all Datadog Agents returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listFleetAgents"] = true; +const apiInstance = new v2.FleetAutomationApi(configuration); + +apiInstance + .listFleetAgents() + .then((data: v2.FleetAgentsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index a6e6678bd11f..4c6bd97d560f 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -2343,6 +2343,40 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { "v2.ListFleetAgentVersions": { "operationResponseType": "FleetAgentVersionsResponse", }, + "v2.ListFleetAgents": { + "pageNumber": { + "type": "number", + "format": "int64", + }, + "pageSize": { + "type": "number", + "format": "int64", + }, + "sortAttribute": { + "type": "string", + "format": "", + }, + "sortDescending": { + "type": "boolean", + "format": "", + }, + "tags": { + "type": "string", + "format": "", + }, + "filter": { + "type": "string", + "format": "", + }, + "operationResponseType": "FleetAgentsResponse", + }, + "v2.GetFleetAgentInfo": { + "agentKey": { + "type": "string", + "format": "", + }, + "operationResponseType": "FleetAgentInfoResponse", + }, "v2.ListFleetDeployments": { "pageSize": { "type": "number", diff --git a/features/v2/fleet_automation.feature b/features/v2/fleet_automation.feature index 0024399c7455..b21fe22c60f7 100644 --- a/features/v2/fleet_automation.feature +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 2231f8c96132..98885927ff92 100644 --- a/features/v2/undo.json +++ b/features/v2/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": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 1d939db0ebb5..fd98a2a80b76 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -227,8 +227,10 @@ export function createConfiguration( "v2.createFleetDeploymentUpgrade": false, "v2.createFleetSchedule": false, "v2.deleteFleetSchedule": false, + "v2.getFleetAgentInfo": false, "v2.getFleetDeployment": false, "v2.getFleetSchedule": false, + "v2.listFleetAgents": false, "v2.listFleetAgentVersions": false, "v2.listFleetDeployments": false, "v2.listFleetSchedules": false, diff --git a/packages/datadog-api-client-v2/apis/FleetAutomationApi.ts b/packages/datadog-api-client-v2/apis/FleetAutomationApi.ts index 9f257765fabd..3a5bf2a66b42 100644 --- a/packages/datadog-api-client-v2/apis/FleetAutomationApi.ts +++ b/packages/datadog-api-client-v2/apis/FleetAutomationApi.ts @@ -17,6 +17,8 @@ import { ObjectSerializer } from "../models/ObjectSerializer"; import { ApiException } from "../../datadog-api-client-common/exception"; import { APIErrorResponse } from "../models/APIErrorResponse"; +import { FleetAgentInfoResponse } from "../models/FleetAgentInfoResponse"; +import { FleetAgentsResponse } from "../models/FleetAgentsResponse"; import { FleetAgentVersionsResponse } from "../models/FleetAgentVersionsResponse"; import { FleetDeploymentConfigureCreateRequest } from "../models/FleetDeploymentConfigureCreateRequest"; import { FleetDeploymentPackageUpgradeCreateRequest } from "../models/FleetDeploymentPackageUpgradeCreateRequest"; @@ -255,6 +257,44 @@ export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async getFleetAgentInfo( + agentKey: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getFleetAgentInfo'"); + if (!_config.unstableOperations["v2.getFleetAgentInfo"]) { + throw new Error("Unstable operation 'getFleetAgentInfo' is disabled"); + } + + // verify required parameter 'agentKey' is not null or undefined + if (agentKey === null || agentKey === undefined) { + throw new RequiredError("agentKey", "getFleetAgentInfo"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/agents/{agent_key}".replace( + "{agent_key}", + encodeURIComponent(String(agentKey)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FleetAutomationApi.getFleetAgentInfo") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async getFleetDeployment( deploymentId: string, limit?: number, @@ -350,6 +390,85 @@ export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async listFleetAgents( + pageNumber?: number, + pageSize?: number, + sortAttribute?: string, + sortDescending?: boolean, + tags?: string, + filter?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listFleetAgents'"); + if (!_config.unstableOperations["v2.listFleetAgents"]) { + throw new Error("Unstable operation 'listFleetAgents' is disabled"); + } + + // Path Params + const localVarPath = "/api/unstable/fleet/agents"; + + // Make Request Context + const requestContext = _config + .getServer("v2.FleetAutomationApi.listFleetAgents") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page_number", + ObjectSerializer.serialize(pageNumber, "number", "int64"), + "" + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page_size", + ObjectSerializer.serialize(pageSize, "number", "int64"), + "" + ); + } + if (sortAttribute !== undefined) { + requestContext.setQueryParam( + "sort_attribute", + ObjectSerializer.serialize(sortAttribute, "string", ""), + "" + ); + } + if (sortDescending !== undefined) { + requestContext.setQueryParam( + "sort_descending", + ObjectSerializer.serialize(sortDescending, "boolean", ""), + "" + ); + } + if (tags !== undefined) { + requestContext.setQueryParam( + "tags", + ObjectSerializer.serialize(tags, "string", ""), + "" + ); + } + if (filter !== undefined) { + requestContext.setQueryParam( + "filter", + ObjectSerializer.serialize(filter, "string", ""), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async listFleetAgentVersions( _options?: Configuration ): Promise { @@ -363,7 +482,7 @@ export class FleetAutomationApiRequestFactory extends BaseAPIRequestFactory { } // Path Params - const localVarPath = "/api/unstable/fleet/agents"; + const localVarPath = "/api/unstable/fleet/agent_versions"; // Make Request Context const requestContext = _config @@ -848,6 +967,70 @@ export class FleetAutomationApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getFleetAgentInfo + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFleetAgentInfo( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: FleetAgentInfoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FleetAgentInfoResponse" + ) as FleetAgentInfoResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetAgentInfoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FleetAgentInfoResponse", + "" + ) as FleetAgentInfoResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -976,6 +1159,70 @@ export class FleetAutomationApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listFleetAgents + * @throws ApiException if the response code was not in [200, 299] + */ + public async listFleetAgents( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: FleetAgentsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FleetAgentsResponse" + ) as FleetAgentsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FleetAgentsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FleetAgentsResponse", + "" + ) as FleetAgentsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -1335,6 +1582,14 @@ export interface FleetAutomationApiDeleteFleetScheduleRequest { id: string; } +export interface FleetAutomationApiGetFleetAgentInfoRequest { + /** + * The unique identifier (agent key) for the Datadog Agent. + * @type string + */ + agentKey: string; +} + export interface FleetAutomationApiGetFleetDeploymentRequest { /** * The unique identifier of the deployment to retrieve. @@ -1361,6 +1616,39 @@ export interface FleetAutomationApiGetFleetScheduleRequest { id: string; } +export interface FleetAutomationApiListFleetAgentsRequest { + /** + * Page number for pagination (must be greater than 0). + * @type number + */ + pageNumber?: number; + /** + * Number of results per page (must be greater than 0 and less than or equal to 100). + * @type number + */ + pageSize?: number; + /** + * Attribute to sort by. + * @type string + */ + sortAttribute?: string; + /** + * Sort order (true for descending, false for ascending). + * @type boolean + */ + sortDescending?: boolean; + /** + * Comma-separated list of tags to filter agents. + * @type string + */ + tags?: string; + /** + * Filter string for narrowing down agent results. + * @type string + */ + filter?: string; +} + export interface FleetAutomationApiListFleetDeploymentsRequest { /** * Number of deployments to return per page. Maximum value is 100. @@ -1560,6 +1848,32 @@ export class FleetAutomationApi { }); } + /** + * 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 param The request object + */ + public getFleetAgentInfo( + param: FleetAutomationApiGetFleetAgentInfoRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getFleetAgentInfo( + param.agentKey, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getFleetAgentInfo(responseContext); + }); + }); + } + /** * Retrieve detailed information about a specific deployment using its unique identifier. * This endpoint returns comprehensive information about a deployment, including: @@ -1630,6 +1944,34 @@ export class FleetAutomationApi { }); } + /** + * 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 param The request object + */ + public listFleetAgents( + param: FleetAutomationApiListFleetAgentsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listFleetAgents( + param.pageNumber, + param.pageSize, + param.sortAttribute, + param.sortDescending, + param.tags, + param.filter, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listFleetAgents(responseContext); + }); + }); + } + /** * Retrieve a list of all available Datadog Agent versions. * diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 9ac816eb7320..54e8eb47bed9 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -357,8 +357,10 @@ export { FleetAutomationApiCreateFleetDeploymentUpgradeRequest, FleetAutomationApiCreateFleetScheduleRequest, FleetAutomationApiDeleteFleetScheduleRequest, + FleetAutomationApiGetFleetAgentInfoRequest, FleetAutomationApiGetFleetDeploymentRequest, FleetAutomationApiGetFleetScheduleRequest, + FleetAutomationApiListFleetAgentsRequest, FleetAutomationApiListFleetDeploymentsRequest, FleetAutomationApiTriggerFleetScheduleRequest, FleetAutomationApiUpdateFleetScheduleRequest, @@ -2262,10 +2264,23 @@ export { FlakyTestsSearchResponseMeta } from "./models/FlakyTestsSearchResponseM export { FlakyTestsSearchSort } from "./models/FlakyTestsSearchSort"; export { FlakyTestStats } from "./models/FlakyTestStats"; export { FlakyTestType } from "./models/FlakyTestType"; +export { FleetAgentAttributes } from "./models/FleetAgentAttributes"; +export { FleetAgentAttributesTagsItems } from "./models/FleetAgentAttributesTagsItems"; +export { FleetAgentInfo } from "./models/FleetAgentInfo"; +export { FleetAgentInfoAttributes } from "./models/FleetAgentInfoAttributes"; +export { FleetAgentInfoDetails } from "./models/FleetAgentInfoDetails"; +export { FleetAgentInfoResourceType } from "./models/FleetAgentInfoResourceType"; +export { FleetAgentInfoResponse } from "./models/FleetAgentInfoResponse"; +export { FleetAgentsResponse } from "./models/FleetAgentsResponse"; +export { FleetAgentsResponseData } from "./models/FleetAgentsResponseData"; +export { FleetAgentsResponseDataAttributes } from "./models/FleetAgentsResponseDataAttributes"; +export { FleetAgentsResponseMeta } from "./models/FleetAgentsResponseMeta"; export { FleetAgentVersion } from "./models/FleetAgentVersion"; export { FleetAgentVersionAttributes } from "./models/FleetAgentVersionAttributes"; export { FleetAgentVersionResourceType } from "./models/FleetAgentVersionResourceType"; export { FleetAgentVersionsResponse } from "./models/FleetAgentVersionsResponse"; +export { FleetConfigurationFile } from "./models/FleetConfigurationFile"; +export { FleetConfigurationLayer } from "./models/FleetConfigurationLayer"; export { FleetDeployment } from "./models/FleetDeployment"; export { FleetDeploymentAttributes } from "./models/FleetDeploymentAttributes"; export { FleetDeploymentConfigureAttributes } from "./models/FleetDeploymentConfigureAttributes"; @@ -2286,6 +2301,9 @@ export { FleetDeploymentResponseMeta } from "./models/FleetDeploymentResponseMet export { FleetDeploymentsPage } from "./models/FleetDeploymentsPage"; export { FleetDeploymentsResponse } from "./models/FleetDeploymentsResponse"; export { FleetDeploymentsResponseMeta } from "./models/FleetDeploymentsResponseMeta"; +export { FleetDetectedIntegration } from "./models/FleetDetectedIntegration"; +export { FleetIntegrationDetails } from "./models/FleetIntegrationDetails"; +export { FleetIntegrationsByStatus } from "./models/FleetIntegrationsByStatus"; export { FleetSchedule } from "./models/FleetSchedule"; export { FleetScheduleAttributes } from "./models/FleetScheduleAttributes"; export { FleetScheduleCreate } from "./models/FleetScheduleCreate"; diff --git a/packages/datadog-api-client-v2/models/FleetAgentAttributes.ts b/packages/datadog-api-client-v2/models/FleetAgentAttributes.ts new file mode 100644 index 000000000000..77b31503838b --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentAttributes.ts @@ -0,0 +1,223 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FleetAgentAttributesTagsItems } from "./FleetAgentAttributesTagsItems"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Datadog Agent in the list view. + */ +export class FleetAgentAttributes { + /** + * The Datadog Agent version. + */ + "agentVersion"?: string; + /** + * The API key name (if available and not redacted). + */ + "apiKeyName"?: string; + /** + * The API key UUID. + */ + "apiKeyUuid"?: string; + /** + * The cloud provider where the agent is running. + */ + "cloudProvider"?: string; + /** + * Kubernetes cluster name (if applicable). + */ + "clusterName"?: string; + /** + * The unique agent key identifier. + */ + "datadogAgentKey"?: string; + /** + * Datadog products enabled on the agent. + */ + "enabledProducts"?: Array; + /** + * Environments the agent is reporting from. + */ + "envs"?: Array; + /** + * Timestamp when the agent was first seen. + */ + "firstSeenAt"?: number; + /** + * The hostname of the agent. + */ + "hostname"?: string; + /** + * IP addresses of the agent. + */ + "ipAddresses"?: Array; + /** + * Whether single-step instrumentation is enabled. + */ + "isSingleStepInstrumentationEnabled"?: boolean; + /** + * Timestamp of the last agent restart. + */ + "lastRestartAt"?: number; + /** + * The operating system. + */ + "os"?: string; + /** + * OpenTelemetry collector version (if applicable). + */ + "otelCollectorVersion"?: string; + /** + * List of OpenTelemetry collector versions (if applicable). + */ + "otelCollectorVersions"?: Array; + /** + * Kubernetes pod name (if applicable). + */ + "podName"?: string; + /** + * Remote agent management status. + */ + "remoteAgentManagement"?: string; + /** + * Remote configuration status. + */ + "remoteConfigStatus"?: string; + /** + * Services running on the agent. + */ + "services"?: Array; + /** + * Tags associated with the agent. + */ + "tags"?: Array; + /** + * Team associated with the agent. + */ + "team"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + agentVersion: { + baseName: "agent_version", + type: "string", + }, + apiKeyName: { + baseName: "api_key_name", + type: "string", + }, + apiKeyUuid: { + baseName: "api_key_uuid", + type: "string", + }, + cloudProvider: { + baseName: "cloud_provider", + type: "string", + }, + clusterName: { + baseName: "cluster_name", + type: "string", + }, + datadogAgentKey: { + baseName: "datadog_agent_key", + type: "string", + }, + enabledProducts: { + baseName: "enabled_products", + type: "Array", + }, + envs: { + baseName: "envs", + type: "Array", + }, + firstSeenAt: { + baseName: "first_seen_at", + type: "number", + format: "int64", + }, + hostname: { + baseName: "hostname", + type: "string", + }, + ipAddresses: { + baseName: "ip_addresses", + type: "Array", + }, + isSingleStepInstrumentationEnabled: { + baseName: "is_single_step_instrumentation_enabled", + type: "boolean", + }, + lastRestartAt: { + baseName: "last_restart_at", + type: "number", + format: "int64", + }, + os: { + baseName: "os", + type: "string", + }, + otelCollectorVersion: { + baseName: "otel_collector_version", + type: "string", + }, + otelCollectorVersions: { + baseName: "otel_collector_versions", + type: "Array", + }, + podName: { + baseName: "pod_name", + type: "string", + }, + remoteAgentManagement: { + baseName: "remote_agent_management", + type: "string", + }, + remoteConfigStatus: { + baseName: "remote_config_status", + type: "string", + }, + services: { + baseName: "services", + type: "Array", + }, + tags: { + baseName: "tags", + type: "Array", + }, + team: { + baseName: "team", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentAttributesTagsItems.ts b/packages/datadog-api-client-v2/models/FleetAgentAttributesTagsItems.ts new file mode 100644 index 000000000000..e6930b3d9fdb --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentAttributesTagsItems.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class FleetAgentAttributesTagsItems { + "key"?: string; + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + key: { + baseName: "key", + type: "string", + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentAttributesTagsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentInfo.ts b/packages/datadog-api-client-v2/models/FleetAgentInfo.ts new file mode 100644 index 000000000000..d51964e66807 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentInfo.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FleetAgentInfoAttributes } from "./FleetAgentInfoAttributes"; +import { FleetAgentInfoResourceType } from "./FleetAgentInfoResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Represents detailed information about a specific Datadog Agent. + */ +export class FleetAgentInfo { + /** + * Attributes for agent information. + */ + "attributes": FleetAgentInfoAttributes; + /** + * The unique agent key identifier. + */ + "id": string; + /** + * The type of Agent info resource. + */ + "type": FleetAgentInfoResourceType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetAgentInfoAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "FleetAgentInfoResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentInfo.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentInfoAttributes.ts b/packages/datadog-api-client-v2/models/FleetAgentInfoAttributes.ts new file mode 100644 index 000000000000..289106c635ad --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentInfoAttributes.ts @@ -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 2020-Present Datadog, Inc. + */ +import { FleetAgentInfoDetails } from "./FleetAgentInfoDetails"; +import { FleetConfigurationLayer } from "./FleetConfigurationLayer"; +import { FleetDetectedIntegration } from "./FleetDetectedIntegration"; +import { FleetIntegrationsByStatus } from "./FleetIntegrationsByStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for agent information. + */ +export class FleetAgentInfoAttributes { + /** + * Detailed information about a Datadog Agent. + */ + "agentInfos"?: FleetAgentInfoDetails; + /** + * Configuration information organized by layers. + */ + "configurationFiles"?: FleetConfigurationLayer; + /** + * List of detected integrations. + */ + "detectedIntegrations"?: Array; + /** + * Integrations organized by their status. + */ + "integrations"?: FleetIntegrationsByStatus; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + agentInfos: { + baseName: "agent_infos", + type: "FleetAgentInfoDetails", + }, + configurationFiles: { + baseName: "configuration_files", + type: "FleetConfigurationLayer", + }, + detectedIntegrations: { + baseName: "detected_integrations", + type: "Array", + }, + integrations: { + baseName: "integrations", + type: "FleetIntegrationsByStatus", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentInfoAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentInfoDetails.ts b/packages/datadog-api-client-v2/models/FleetAgentInfoDetails.ts new file mode 100644 index 000000000000..2ce7c3bed15f --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentInfoDetails.ts @@ -0,0 +1,278 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Detailed information about a Datadog Agent. + */ +export class FleetAgentInfoDetails { + /** + * The Datadog Agent version. + */ + "agentVersion"?: string; + /** + * The API key name (if available and not redacted). + */ + "apiKeyName"?: string; + /** + * The API key UUID. + */ + "apiKeyUuid"?: string; + /** + * The cloud provider where the agent is running. + */ + "cloudProvider"?: string; + /** + * Kubernetes cluster name (if applicable). + */ + "clusterName"?: string; + /** + * The unique agent key identifier. + */ + "datadogAgentKey"?: string; + /** + * Datadog products enabled on the agent. + */ + "enabledProducts"?: Array; + /** + * Environments the agent is reporting from. + */ + "env"?: Array; + /** + * Timestamp when the agent was first seen. + */ + "firstSeenAt"?: number; + /** + * The hostname of the agent. + */ + "hostname"?: string; + /** + * Alternative hostname list for the agent. + */ + "hostnameAliases"?: Array; + /** + * The version of the installer used. + */ + "installMethodInstallerVersion"?: string; + /** + * The tool used to install the agent. + */ + "installMethodTool"?: string; + /** + * IP addresses of the agent. + */ + "ipAddresses"?: Array; + /** + * Whether single-step instrumentation is enabled. + */ + "isSingleStepInstrumentationEnabled"?: boolean; + /** + * Timestamp of the last agent restart. + */ + "lastRestartAt"?: number; + /** + * The operating system. + */ + "os"?: string; + /** + * The operating system version. + */ + "osVersion"?: string; + /** + * OpenTelemetry collector version (if applicable). + */ + "otelCollectorVersion"?: string; + /** + * List of OpenTelemetry collector versions (if applicable). + */ + "otelCollectorVersions"?: Array; + /** + * OpenTelemetry collectors associated with the agent (if applicable). + */ + "otelCollectors"?: Array<{ [key: string]: any }>; + /** + * Kubernetes pod name (if applicable). + */ + "podName"?: string; + /** + * The Python version used by the agent. + */ + "pythonVersion"?: string; + /** + * Regions where the agent is running. + */ + "region"?: Array; + /** + * Remote agent management status. + */ + "remoteAgentManagement"?: string; + /** + * Remote configuration status. + */ + "remoteConfigStatus"?: string; + /** + * Services running on the agent. + */ + "services"?: Array; + /** + * Tags associated with the agent. + */ + "tags"?: Array; + /** + * Team associated with the agent. + */ + "team"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + agentVersion: { + baseName: "agent_version", + type: "string", + }, + apiKeyName: { + baseName: "api_key_name", + type: "string", + }, + apiKeyUuid: { + baseName: "api_key_uuid", + type: "string", + }, + cloudProvider: { + baseName: "cloud_provider", + type: "string", + }, + clusterName: { + baseName: "cluster_name", + type: "string", + }, + datadogAgentKey: { + baseName: "datadog_agent_key", + type: "string", + }, + enabledProducts: { + baseName: "enabled_products", + type: "Array", + }, + env: { + baseName: "env", + type: "Array", + }, + firstSeenAt: { + baseName: "first_seen_at", + type: "number", + format: "int64", + }, + hostname: { + baseName: "hostname", + type: "string", + }, + hostnameAliases: { + baseName: "hostname_aliases", + type: "Array", + }, + installMethodInstallerVersion: { + baseName: "install_method_installer_version", + type: "string", + }, + installMethodTool: { + baseName: "install_method_tool", + type: "string", + }, + ipAddresses: { + baseName: "ip_addresses", + type: "Array", + }, + isSingleStepInstrumentationEnabled: { + baseName: "is_single_step_instrumentation_enabled", + type: "boolean", + }, + lastRestartAt: { + baseName: "last_restart_at", + type: "number", + format: "int64", + }, + os: { + baseName: "os", + type: "string", + }, + osVersion: { + baseName: "os_version", + type: "string", + }, + otelCollectorVersion: { + baseName: "otel_collector_version", + type: "string", + }, + otelCollectorVersions: { + baseName: "otel_collector_versions", + type: "Array", + }, + otelCollectors: { + baseName: "otel_collectors", + type: "Array<{ [key: string]: any; }>", + }, + podName: { + baseName: "pod_name", + type: "string", + }, + pythonVersion: { + baseName: "python_version", + type: "string", + }, + region: { + baseName: "region", + type: "Array", + }, + remoteAgentManagement: { + baseName: "remote_agent_management", + type: "string", + }, + remoteConfigStatus: { + baseName: "remote_config_status", + type: "string", + }, + services: { + baseName: "services", + type: "Array", + }, + tags: { + baseName: "tags", + type: "Array", + }, + team: { + baseName: "team", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentInfoDetails.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentInfoResourceType.ts b/packages/datadog-api-client-v2/models/FleetAgentInfoResourceType.ts new file mode 100644 index 000000000000..5b01766fa167 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentInfoResourceType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of Agent info resource. + */ + +export type FleetAgentInfoResourceType = + | typeof DATADOG_AGENT_KEY + | UnparsedObject; +export const DATADOG_AGENT_KEY = "datadog_agent_key"; diff --git a/packages/datadog-api-client-v2/models/FleetAgentInfoResponse.ts b/packages/datadog-api-client-v2/models/FleetAgentInfoResponse.ts new file mode 100644 index 000000000000..efdcbfeaf740 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentInfoResponse.ts @@ -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 2020-Present Datadog, Inc. + */ +import { FleetAgentInfo } from "./FleetAgentInfo"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing detailed information about a specific agent. + */ +export class FleetAgentInfoResponse { + /** + * Represents detailed information about a specific Datadog Agent. + */ + "data": FleetAgentInfo; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "FleetAgentInfo", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentInfoResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentsResponse.ts b/packages/datadog-api-client-v2/models/FleetAgentsResponse.ts new file mode 100644 index 000000000000..228df436cdf1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentsResponse.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FleetAgentsResponseData } from "./FleetAgentsResponseData"; +import { FleetAgentsResponseMeta } from "./FleetAgentsResponseMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing a paginated list of Datadog Agents. + */ +export class FleetAgentsResponse { + /** + * The response data containing status and agents array. + */ + "data": FleetAgentsResponseData; + /** + * Metadata for the list of agents response. + */ + "meta"?: FleetAgentsResponseMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "FleetAgentsResponseData", + required: true, + }, + meta: { + baseName: "meta", + type: "FleetAgentsResponseMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentsResponseData.ts b/packages/datadog-api-client-v2/models/FleetAgentsResponseData.ts new file mode 100644 index 000000000000..7ecbcca24559 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentsResponseData.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FleetAgentsResponseDataAttributes } from "./FleetAgentsResponseDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response data containing status and agents array. + */ +export class FleetAgentsResponseData { + "attributes": FleetAgentsResponseDataAttributes; + /** + * Status identifier. + */ + "id": string; + /** + * Resource type. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "FleetAgentsResponseDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentsResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentsResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/FleetAgentsResponseDataAttributes.ts new file mode 100644 index 000000000000..1195025a655e --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentsResponseDataAttributes.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FleetAgentAttributes } from "./FleetAgentAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class FleetAgentsResponseDataAttributes { + /** + * Array of agents matching the query criteria. + */ + "agents"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + agents: { + baseName: "agents", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentsResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetAgentsResponseMeta.ts b/packages/datadog-api-client-v2/models/FleetAgentsResponseMeta.ts new file mode 100644 index 000000000000..3cb27aadad32 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetAgentsResponseMeta.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metadata for the list of agents response. + */ +export class FleetAgentsResponseMeta { + /** + * Total number of agents matching the filter criteria across all pages. + */ + "totalFilteredCount"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + totalFilteredCount: { + baseName: "total_filtered_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetAgentsResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetConfigurationFile.ts b/packages/datadog-api-client-v2/models/FleetConfigurationFile.ts new file mode 100644 index 000000000000..f2ae89e1aa76 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetConfigurationFile.ts @@ -0,0 +1,68 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A configuration file for an integration. + */ +export class FleetConfigurationFile { + /** + * The raw content of the configuration file. + */ + "fileContent"?: string; + /** + * Path to the configuration file. + */ + "filePath"?: string; + /** + * Name of the configuration file. + */ + "filename"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + fileContent: { + baseName: "file_content", + type: "string", + }, + filePath: { + baseName: "file_path", + type: "string", + }, + filename: { + baseName: "filename", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetConfigurationFile.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetConfigurationLayer.ts b/packages/datadog-api-client-v2/models/FleetConfigurationLayer.ts new file mode 100644 index 000000000000..961ba16d2a9e --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetConfigurationLayer.ts @@ -0,0 +1,92 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Configuration information organized by layers. + */ +export class FleetConfigurationLayer { + /** + * The final compiled configuration. + */ + "compiledConfiguration"?: string; + /** + * Configuration from environment variables. + */ + "envConfiguration"?: string; + /** + * Configuration from files. + */ + "fileConfiguration"?: string; + /** + * Parsed configuration output. + */ + "parsedConfiguration"?: string; + /** + * Remote configuration settings. + */ + "remoteConfiguration"?: string; + /** + * Runtime configuration. + */ + "runtimeConfiguration"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + compiledConfiguration: { + baseName: "compiled_configuration", + type: "string", + }, + envConfiguration: { + baseName: "env_configuration", + type: "string", + }, + fileConfiguration: { + baseName: "file_configuration", + type: "string", + }, + parsedConfiguration: { + baseName: "parsed_configuration", + type: "string", + }, + remoteConfiguration: { + baseName: "remote_configuration", + type: "string", + }, + runtimeConfiguration: { + baseName: "runtime_configuration", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetConfigurationLayer.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetDetectedIntegration.ts b/packages/datadog-api-client-v2/models/FleetDetectedIntegration.ts new file mode 100644 index 000000000000..0c0073767b39 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetDetectedIntegration.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * An integration detected on the agent but not necessarily configured. + */ +export class FleetDetectedIntegration { + /** + * Escaped integration name. + */ + "escapedName"?: string; + /** + * Integration prefix identifier. + */ + "prefix"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + escapedName: { + baseName: "escaped_name", + type: "string", + }, + prefix: { + baseName: "prefix", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetDetectedIntegration.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetIntegrationDetails.ts b/packages/datadog-api-client-v2/models/FleetIntegrationDetails.ts new file mode 100644 index 000000000000..99f306a388ce --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetIntegrationDetails.ts @@ -0,0 +1,125 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Detailed information about a single integration. + */ +export class FleetIntegrationDetails { + /** + * Type of data collected (metrics, logs). + */ + "dataType"?: string; + /** + * Error messages if the integration has issues. + */ + "errorMessages"?: Array; + /** + * Initialization configuration (YAML format). + */ + "initConfig"?: string; + /** + * Instance-specific configuration (YAML format). + */ + "instanceConfig"?: string; + /** + * Whether this is a custom integration. + */ + "isCustomCheck"?: boolean; + /** + * Log collection configuration (YAML format). + */ + "logConfig"?: string; + /** + * Name of the integration instance. + */ + "name"?: string; + /** + * Index in the configuration file. + */ + "sourceIndex"?: number; + /** + * Path to the configuration file. + */ + "sourcePath"?: string; + /** + * Integration type. + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + dataType: { + baseName: "data_type", + type: "string", + }, + errorMessages: { + baseName: "error_messages", + type: "Array", + }, + initConfig: { + baseName: "init_config", + type: "string", + }, + instanceConfig: { + baseName: "instance_config", + type: "string", + }, + isCustomCheck: { + baseName: "is_custom_check", + type: "boolean", + }, + logConfig: { + baseName: "log_config", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + sourceIndex: { + baseName: "source_index", + type: "number", + format: "int64", + }, + sourcePath: { + baseName: "source_path", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetIntegrationDetails.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FleetIntegrationsByStatus.ts b/packages/datadog-api-client-v2/models/FleetIntegrationsByStatus.ts new file mode 100644 index 000000000000..5a01b34a7cbf --- /dev/null +++ b/packages/datadog-api-client-v2/models/FleetIntegrationsByStatus.ts @@ -0,0 +1,95 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FleetConfigurationFile } from "./FleetConfigurationFile"; +import { FleetDetectedIntegration } from "./FleetDetectedIntegration"; +import { FleetIntegrationDetails } from "./FleetIntegrationDetails"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Integrations organized by their status. + */ +export class FleetIntegrationsByStatus { + /** + * Configuration files for integrations. + */ + "configurationFiles"?: Array; + /** + * The unique agent key identifier. + */ + "datadogAgentKey"?: string; + /** + * Integrations with errors. + */ + "errorIntegrations"?: Array; + /** + * Detected but not configured integrations. + */ + "missingIntegrations"?: Array; + /** + * Integrations with warnings. + */ + "warningIntegrations"?: Array; + /** + * Integrations that are working correctly. + */ + "workingIntegrations"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + configurationFiles: { + baseName: "configuration_files", + type: "Array", + }, + datadogAgentKey: { + baseName: "datadog_agent_key", + type: "string", + }, + errorIntegrations: { + baseName: "error_integrations", + type: "Array", + }, + missingIntegrations: { + baseName: "missing_integrations", + type: "Array", + }, + warningIntegrations: { + baseName: "warning_integrations", + type: "Array", + }, + workingIntegrations: { + baseName: "working_integrations", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FleetIntegrationsByStatus.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 03231babdc0a..cb29129c864a 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -991,9 +991,21 @@ import { FlakyTestsSearchRequestAttributes } from "./FlakyTestsSearchRequestAttr import { FlakyTestsSearchRequestData } from "./FlakyTestsSearchRequestData"; import { FlakyTestsSearchResponse } from "./FlakyTestsSearchResponse"; import { FlakyTestsSearchResponseMeta } from "./FlakyTestsSearchResponseMeta"; +import { FleetAgentAttributes } from "./FleetAgentAttributes"; +import { FleetAgentAttributesTagsItems } from "./FleetAgentAttributesTagsItems"; +import { FleetAgentInfo } from "./FleetAgentInfo"; +import { FleetAgentInfoAttributes } from "./FleetAgentInfoAttributes"; +import { FleetAgentInfoDetails } from "./FleetAgentInfoDetails"; +import { FleetAgentInfoResponse } from "./FleetAgentInfoResponse"; import { FleetAgentVersion } from "./FleetAgentVersion"; import { FleetAgentVersionAttributes } from "./FleetAgentVersionAttributes"; import { FleetAgentVersionsResponse } from "./FleetAgentVersionsResponse"; +import { FleetAgentsResponse } from "./FleetAgentsResponse"; +import { FleetAgentsResponseData } from "./FleetAgentsResponseData"; +import { FleetAgentsResponseDataAttributes } from "./FleetAgentsResponseDataAttributes"; +import { FleetAgentsResponseMeta } from "./FleetAgentsResponseMeta"; +import { FleetConfigurationFile } from "./FleetConfigurationFile"; +import { FleetConfigurationLayer } from "./FleetConfigurationLayer"; import { FleetDeployment } from "./FleetDeployment"; import { FleetDeploymentAttributes } from "./FleetDeploymentAttributes"; import { FleetDeploymentConfigureAttributes } from "./FleetDeploymentConfigureAttributes"; @@ -1012,6 +1024,9 @@ import { FleetDeploymentResponseMeta } from "./FleetDeploymentResponseMeta"; import { FleetDeploymentsPage } from "./FleetDeploymentsPage"; import { FleetDeploymentsResponse } from "./FleetDeploymentsResponse"; import { FleetDeploymentsResponseMeta } from "./FleetDeploymentsResponseMeta"; +import { FleetDetectedIntegration } from "./FleetDetectedIntegration"; +import { FleetIntegrationDetails } from "./FleetIntegrationDetails"; +import { FleetIntegrationsByStatus } from "./FleetIntegrationsByStatus"; import { FleetSchedule } from "./FleetSchedule"; import { FleetScheduleAttributes } from "./FleetScheduleAttributes"; import { FleetScheduleCreate } from "./FleetScheduleCreate"; @@ -3249,6 +3264,7 @@ const enumsMap: { [key: string]: any[] } = { "pipelines_duration_lost", "-pipelines_duration_lost", ], + FleetAgentInfoResourceType: ["datadog_agent_key"], FleetAgentVersionResourceType: ["agent_version"], FleetDeploymentFileOp: ["merge-patch", "delete"], FleetDeploymentResourceType: ["deployment"], @@ -5557,9 +5573,21 @@ const typeMap: { [index: string]: any } = { FlakyTestsSearchRequestData: FlakyTestsSearchRequestData, FlakyTestsSearchResponse: FlakyTestsSearchResponse, FlakyTestsSearchResponseMeta: FlakyTestsSearchResponseMeta, + FleetAgentAttributes: FleetAgentAttributes, + FleetAgentAttributesTagsItems: FleetAgentAttributesTagsItems, + FleetAgentInfo: FleetAgentInfo, + FleetAgentInfoAttributes: FleetAgentInfoAttributes, + FleetAgentInfoDetails: FleetAgentInfoDetails, + FleetAgentInfoResponse: FleetAgentInfoResponse, FleetAgentVersion: FleetAgentVersion, FleetAgentVersionAttributes: FleetAgentVersionAttributes, FleetAgentVersionsResponse: FleetAgentVersionsResponse, + FleetAgentsResponse: FleetAgentsResponse, + FleetAgentsResponseData: FleetAgentsResponseData, + FleetAgentsResponseDataAttributes: FleetAgentsResponseDataAttributes, + FleetAgentsResponseMeta: FleetAgentsResponseMeta, + FleetConfigurationFile: FleetConfigurationFile, + FleetConfigurationLayer: FleetConfigurationLayer, FleetDeployment: FleetDeployment, FleetDeploymentAttributes: FleetDeploymentAttributes, FleetDeploymentConfigureAttributes: FleetDeploymentConfigureAttributes, @@ -5580,6 +5608,9 @@ const typeMap: { [index: string]: any } = { FleetDeploymentsPage: FleetDeploymentsPage, FleetDeploymentsResponse: FleetDeploymentsResponse, FleetDeploymentsResponseMeta: FleetDeploymentsResponseMeta, + FleetDetectedIntegration: FleetDetectedIntegration, + FleetIntegrationDetails: FleetIntegrationDetails, + FleetIntegrationsByStatus: FleetIntegrationsByStatus, FleetSchedule: FleetSchedule, FleetScheduleAttributes: FleetScheduleAttributes, FleetScheduleCreate: FleetScheduleCreate,