@@ -427,6 +427,82 @@ def delete_fleet_schedule_with_http_info(id, opts = {})
427427 return data , status_code , headers
428428 end
429429
430+ # Get detailed information about an agent.
431+ #
432+ # @see #get_fleet_agent_info_with_http_info
433+ def get_fleet_agent_info ( agent_key , opts = { } )
434+ data , _status_code , _headers = get_fleet_agent_info_with_http_info ( agent_key , opts )
435+ data
436+ end
437+
438+ # Get detailed information about an agent.
439+ #
440+ # Retrieve detailed information about a specific Datadog Agent.
441+ # This endpoint returns comprehensive information about an agent including:
442+ # - Agent details and metadata
443+ # - Configured integrations organized by status (working, warning, error, missing)
444+ # - Detected integrations
445+ # - Configuration files and layers
446+ #
447+ # @param agent_key [String] The unique identifier (agent key) for the Datadog Agent.
448+ # @param opts [Hash] the optional parameters
449+ # @return [Array<(FleetAgentInfoResponse, Integer, Hash)>] FleetAgentInfoResponse data, response status code and response headers
450+ def get_fleet_agent_info_with_http_info ( agent_key , opts = { } )
451+ unstable_enabled = @api_client . config . unstable_operations [ "v2.get_fleet_agent_info" . to_sym ]
452+ if unstable_enabled
453+ @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "v2.get_fleet_agent_info" )
454+ else
455+ raise DatadogAPIClient ::APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "v2.get_fleet_agent_info" ) )
456+ end
457+
458+ if @api_client . config . debugging
459+ @api_client . config . logger . debug 'Calling API: FleetAutomationAPI.get_fleet_agent_info ...'
460+ end
461+ # verify the required parameter 'agent_key' is set
462+ if @api_client . config . client_side_validation && agent_key . nil?
463+ fail ArgumentError , "Missing the required parameter 'agent_key' when calling FleetAutomationAPI.get_fleet_agent_info"
464+ end
465+ # resource path
466+ local_var_path = '/api/unstable/fleet/agents/{agent_key}' . sub ( '{agent_key}' , CGI . escape ( agent_key . to_s ) . gsub ( '%2F' , '/' ) )
467+
468+ # query parameters
469+ query_params = opts [ :query_params ] || { }
470+
471+ # header parameters
472+ header_params = opts [ :header_params ] || { }
473+ # HTTP header 'Accept' (if needed)
474+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
475+
476+ # form parameters
477+ form_params = opts [ :form_params ] || { }
478+
479+ # http body (model)
480+ post_body = opts [ :debug_body ]
481+
482+ # return_type
483+ return_type = opts [ :debug_return_type ] || 'FleetAgentInfoResponse'
484+
485+ # auth_names
486+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
487+
488+ new_options = opts . merge (
489+ :operation => :get_fleet_agent_info ,
490+ :header_params => header_params ,
491+ :query_params => query_params ,
492+ :form_params => form_params ,
493+ :body => post_body ,
494+ :auth_names => auth_names ,
495+ :return_type => return_type ,
496+ :api_version => "V2"
497+ )
498+
499+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
500+ if @api_client . config . debugging
501+ @api_client . config . logger . debug "API called: FleetAutomationAPI#get_fleet_agent_info\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
502+ end
503+ return data , status_code , headers
504+ end
505+
430506 # Get a configuration deployment by ID.
431507 #
432508 # @see #get_fleet_deployment_with_http_info
@@ -602,6 +678,95 @@ def get_fleet_schedule_with_http_info(id, opts = {})
602678 return data , status_code , headers
603679 end
604680
681+ # List all Datadog Agents.
682+ #
683+ # @see #list_fleet_agents_with_http_info
684+ def list_fleet_agents ( opts = { } )
685+ data , _status_code , _headers = list_fleet_agents_with_http_info ( opts )
686+ data
687+ end
688+
689+ # List all Datadog Agents.
690+ #
691+ # Retrieve a paginated list of all Datadog Agents.
692+ # This endpoint returns a paginated list of all Datadog Agents with support for pagination, sorting, and filtering.
693+ # Use the `page_number` and `page_size` query parameters to paginate through results.
694+ #
695+ # @param opts [Hash] the optional parameters
696+ # @option opts [Integer] :page_number Page number for pagination (must be greater than 0).
697+ # @option opts [Integer] :page_size Number of results per page (must be greater than 0 and less than or equal to 100).
698+ # @option opts [String] :sort_attribute Attribute to sort by.
699+ # @option opts [Boolean] :sort_descending Sort order (true for descending, false for ascending).
700+ # @option opts [String] :tags Comma-separated list of tags to filter agents.
701+ # @option opts [String] :filter Filter string for narrowing down agent results.
702+ # @return [Array<(FleetAgentsResponse, Integer, Hash)>] FleetAgentsResponse data, response status code and response headers
703+ def list_fleet_agents_with_http_info ( opts = { } )
704+ unstable_enabled = @api_client . config . unstable_operations [ "v2.list_fleet_agents" . to_sym ]
705+ if unstable_enabled
706+ @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "v2.list_fleet_agents" )
707+ else
708+ raise DatadogAPIClient ::APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "v2.list_fleet_agents" ) )
709+ end
710+
711+ if @api_client . config . debugging
712+ @api_client . config . logger . debug 'Calling API: FleetAutomationAPI.list_fleet_agents ...'
713+ end
714+ if @api_client . config . client_side_validation && !opts [ :'page_number' ] . nil? && opts [ :'page_number' ] < 1
715+ fail ArgumentError , 'invalid value for "opts[:"page_number"]" when calling FleetAutomationAPI.list_fleet_agents, must be greater than or equal to 1.'
716+ end
717+ if @api_client . config . client_side_validation && !opts [ :'page_size' ] . nil? && opts [ :'page_size' ] > 100
718+ fail ArgumentError , 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_agents, must be smaller than or equal to 100.'
719+ end
720+ if @api_client . config . client_side_validation && !opts [ :'page_size' ] . nil? && opts [ :'page_size' ] < 1
721+ fail ArgumentError , 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_agents, must be greater than or equal to 1.'
722+ end
723+ # resource path
724+ local_var_path = '/api/unstable/fleet/agents'
725+
726+ # query parameters
727+ query_params = opts [ :query_params ] || { }
728+ query_params [ :'page_number' ] = opts [ :'page_number' ] if !opts [ :'page_number' ] . nil?
729+ query_params [ :'page_size' ] = opts [ :'page_size' ] if !opts [ :'page_size' ] . nil?
730+ query_params [ :'sort_attribute' ] = opts [ :'sort_attribute' ] if !opts [ :'sort_attribute' ] . nil?
731+ query_params [ :'sort_descending' ] = opts [ :'sort_descending' ] if !opts [ :'sort_descending' ] . nil?
732+ query_params [ :'tags' ] = opts [ :'tags' ] if !opts [ :'tags' ] . nil?
733+ query_params [ :'filter' ] = opts [ :'filter' ] if !opts [ :'filter' ] . nil?
734+
735+ # header parameters
736+ header_params = opts [ :header_params ] || { }
737+ # HTTP header 'Accept' (if needed)
738+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
739+
740+ # form parameters
741+ form_params = opts [ :form_params ] || { }
742+
743+ # http body (model)
744+ post_body = opts [ :debug_body ]
745+
746+ # return_type
747+ return_type = opts [ :debug_return_type ] || 'FleetAgentsResponse'
748+
749+ # auth_names
750+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth ]
751+
752+ new_options = opts . merge (
753+ :operation => :list_fleet_agents ,
754+ :header_params => header_params ,
755+ :query_params => query_params ,
756+ :form_params => form_params ,
757+ :body => post_body ,
758+ :auth_names => auth_names ,
759+ :return_type => return_type ,
760+ :api_version => "V2"
761+ )
762+
763+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Get , local_var_path , new_options )
764+ if @api_client . config . debugging
765+ @api_client . config . logger . debug "API called: FleetAutomationAPI#list_fleet_agents\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
766+ end
767+ return data , status_code , headers
768+ end
769+
605770 # List all available Agent versions.
606771 #
607772 # @see #list_fleet_agent_versions_with_http_info
@@ -632,7 +797,7 @@ def list_fleet_agent_versions_with_http_info(opts = {})
632797 @api_client . config . logger . debug 'Calling API: FleetAutomationAPI.list_fleet_agent_versions ...'
633798 end
634799 # resource path
635- local_var_path = '/api/unstable/fleet/agents '
800+ local_var_path = '/api/unstable/fleet/agent_versions '
636801
637802 # query parameters
638803 query_params = opts [ :query_params ] || { }
0 commit comments