Class: DatadogAPIClient::V2::FleetAutomationAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::FleetAutomationAPI
- Defined in:
- lib/datadog_api_client/v2/api/fleet_automation_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_fleet_deployment_v2(deployment_id, opts = {}) ⇒ Object
Cancel a deployment.
-
#cancel_fleet_deployment_v2_with_http_info(deployment_id, opts = {}) ⇒ Array<(FleetDeploymentV2CancelResponse, Integer, Hash)>
Cancel a deployment.
-
#create_fleet_deployment_configure_v2(body, opts = {}) ⇒ Object
Create a configuration deployment.
-
#create_fleet_deployment_configure_v2_with_http_info(body, opts = {}) ⇒ Array<(FleetDeploymentConfigureV2DryRunResponse, Integer, Hash)>
Create a configuration deployment.
-
#create_fleet_deployment_upgrade_v2(body, opts = {}) ⇒ Object
Upgrade hosts.
-
#create_fleet_deployment_upgrade_v2_with_http_info(body, opts = {}) ⇒ Array<(FleetDeploymentV2CreateResponse, Integer, Hash)>
Upgrade hosts.
-
#create_fleet_schedule(body, opts = {}) ⇒ Object
Create a schedule.
-
#create_fleet_schedule_with_http_info(body, opts = {}) ⇒ Array<(FleetScheduleResponse, Integer, Hash)>
Create a schedule.
-
#delete_fleet_schedule(id, opts = {}) ⇒ Object
Delete a schedule.
-
#delete_fleet_schedule_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a schedule.
-
#get_fleet_agent_detail_v2(agent_key, opts = {}) ⇒ Object
Get detailed information about an agent.
-
#get_fleet_agent_detail_v2_with_http_info(agent_key, opts = {}) ⇒ Array<(FleetAgentDetailV2Response, Integer, Hash)>
Get detailed information about an agent.
-
#get_fleet_deployment_v2(deployment_id, opts = {}) ⇒ Object
Get a deployment by ID.
-
#get_fleet_deployment_v2_with_http_info(deployment_id, opts = {}) ⇒ Array<(FleetDeploymentV2DetailResponse, Integer, Hash)>
Get a deployment by ID.
-
#get_fleet_schedule_v2(id, opts = {}) ⇒ Object
Get a schedule by ID.
-
#get_fleet_schedule_v2_with_http_info(id, opts = {}) ⇒ Array<(FleetScheduleV2Response, Integer, Hash)>
Get a schedule by ID.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ FleetAutomationAPI
constructor
A new instance of FleetAutomationAPI.
-
#list_fleet_agent_tracers(agent_key, opts = {}) ⇒ Object
List tracers for a specific agent.
-
#list_fleet_agent_tracers_with_http_info(agent_key, opts = {}) ⇒ Array<(FleetTracersResponse, Integer, Hash)>
List tracers for a specific agent.
-
#list_fleet_agent_versions_v2(opts = {}) ⇒ Object
List available Datadog Agent versions.
-
#list_fleet_agent_versions_v2_with_http_info(opts = {}) ⇒ Array<(FleetAgentVersionsV2Response, Integer, Hash)>
List available Datadog Agent versions.
-
#list_fleet_agents_v2(opts = {}) ⇒ Object
List all Datadog Agents.
-
#list_fleet_agents_v2_with_http_info(opts = {}) ⇒ Array<(FleetAgentsV2Response, Integer, Hash)>
List all Datadog Agents.
-
#list_fleet_deployments_v2(opts = {}) ⇒ Object
List all deployments.
-
#list_fleet_deployments_v2_with_http_info(opts = {}) ⇒ Array<(FleetDeploymentsV2Response, Integer, Hash)>
List all deployments.
-
#list_fleet_schedules_v2(opts = {}) ⇒ Object
List all schedules.
-
#list_fleet_schedules_v2_with_http_info(opts = {}) ⇒ Array<(FleetSchedulesV2Response, Integer, Hash)>
List all schedules.
-
#list_fleet_tracers(opts = {}) ⇒ Object
List all fleet tracers.
-
#list_fleet_tracers_with_http_info(opts = {}) ⇒ Array<(FleetTracersResponse, Integer, Hash)>
List all fleet tracers.
-
#trigger_fleet_schedule(id, opts = {}) ⇒ Object
Trigger a schedule deployment.
-
#trigger_fleet_schedule_with_http_info(id, opts = {}) ⇒ Array<(FleetDeploymentResponse, Integer, Hash)>
Trigger a schedule deployment.
-
#update_fleet_schedule(id, body, opts = {}) ⇒ Object
Update a schedule.
-
#update_fleet_schedule_with_http_info(id, body, opts = {}) ⇒ Array<(FleetScheduleResponse, Integer, Hash)>
Update a schedule.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ FleetAutomationAPI
Returns a new instance of FleetAutomationAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#cancel_fleet_deployment_v2(deployment_id, opts = {}) ⇒ Object
Cancel a deployment.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 29 def cancel_fleet_deployment_v2(deployment_id, opts = {}) data, _status_code, _headers = cancel_fleet_deployment_v2_with_http_info(deployment_id, opts) data end |
#cancel_fleet_deployment_v2_with_http_info(deployment_id, opts = {}) ⇒ Array<(FleetDeploymentV2CancelResponse, Integer, Hash)>
Cancel a deployment.
Cancel an active deployment and stop all pending operations. When you cancel a deployment:
- All pending operations on hosts that haven't started yet are stopped.
- Operations currently in progress on hosts may complete or be interrupted, depending on their current status.
- Configuration changes or package upgrades already applied to hosts are not rolled back.
After cancellation, you can view the final state of the deployment using the GET endpoint to see which hosts were successfully updated before the cancellation.
Only deployments with a pending or running status can be canceled. Returns a 400 if the deployment is not in a cancelable status. Returns a 404 if no deployment matches the specified ID or if you do not have access to it.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 50 def cancel_fleet_deployment_v2_with_http_info(deployment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.cancel_fleet_deployment_v2 ...' end # verify the required parameter 'deployment_id' is set if @api_client.config.client_side_validation && deployment_id.nil? fail ArgumentError, "Missing the required parameter 'deployment_id' when calling FleetAutomationAPI.cancel_fleet_deployment_v2" end # resource path local_var_path = '/api/v2/fleet/deployments/{deployment_id}/cancel'.sub('{deployment_id}', CGI.escape(deployment_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetDeploymentV2CancelResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :cancel_fleet_deployment_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#cancel_fleet_deployment_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_fleet_deployment_configure_v2(body, opts = {}) ⇒ Object
Create a configuration deployment.
103 104 105 106 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 103 def create_fleet_deployment_configure_v2(body, opts = {}) data, _status_code, _headers = create_fleet_deployment_configure_v2_with_http_info(body, opts) data end |
#create_fleet_deployment_configure_v2_with_http_info(body, opts = {}) ⇒ Array<(FleetDeploymentConfigureV2DryRunResponse, Integer, Hash)>
Create a configuration deployment.
Create a new deployment to apply configuration changes to a fleet of hosts matching the specified filter query.
This endpoint supports two types of configuration operations:
merge-patch: Merges the provided patch data with the existing configuration file, creating the file if it doesn't exist.delete: Removes the specified configuration file from the target hosts.
You can optionally use target_packages to apply the configuration change only to specific package versions.
The deployment is created and started automatically. You can specify multiple configuration operations to execute in order on each target host. Use the filter query to target specific hosts using the Datadog query syntax.
Set dry_run to true to validate the configuration and resolve target hosts and packages without deploying anything. A dry run returns a 200 with the validation result instead of creating and starting a deployment.
Returns a 400 if filter_query or config_operations is missing, a target package is missing a name or version or cannot be resolved, the configuration fails validation, or the filter query does not match any host eligible for the deployment.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 131 def create_fleet_deployment_configure_v2_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.create_fleet_deployment_configure_v2 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FleetAutomationAPI.create_fleet_deployment_configure_v2" end # resource path local_var_path = '/api/v2/fleet/deployments/configure' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'FleetDeploymentConfigureV2DryRunResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :create_fleet_deployment_configure_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#create_fleet_deployment_configure_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_fleet_deployment_upgrade_v2(body, opts = {}) ⇒ Object
Upgrade hosts.
186 187 188 189 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 186 def create_fleet_deployment_upgrade_v2(body, opts = {}) data, _status_code, _headers = create_fleet_deployment_upgrade_v2_with_http_info(body, opts) data end |
#create_fleet_deployment_upgrade_v2_with_http_info(body, opts = {}) ⇒ Array<(FleetDeploymentV2CreateResponse, Integer, Hash)>
Upgrade hosts.
Create and immediately start a new package upgrade on hosts matching the specified filter query.
This endpoint allows you to upgrade the Datadog Agent to a specific version on hosts matching the specified filter query.
The deployment is created and started automatically. The system:
- Identifies all hosts matching the filter query.
- Validates that the specified version is available.
- Begins rolling out the package upgrade to the target hosts.
Returns a 400 if filter_query or target_packages is missing, a target package is missing a name or version, or the filter query does not match any host eligible for the upgrade. Returns a 409 if a conflicting upgrade is already running on one or more target hosts.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 209 def create_fleet_deployment_upgrade_v2_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.create_fleet_deployment_upgrade_v2 ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FleetAutomationAPI.create_fleet_deployment_upgrade_v2" end # resource path local_var_path = '/api/v2/fleet/deployments/upgrade' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'FleetDeploymentV2CreateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :create_fleet_deployment_upgrade_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#create_fleet_deployment_upgrade_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_fleet_schedule(body, opts = {}) ⇒ Object
Create a schedule.
264 265 266 267 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 264 def create_fleet_schedule(body, opts = {}) data, _status_code, _headers = create_fleet_schedule_with_http_info(body, opts) data end |
#create_fleet_schedule_with_http_info(body, opts = {}) ⇒ Array<(FleetScheduleResponse, Integer, Hash)>
Create a schedule.
Create a new schedule for automated package upgrades.
Schedules define when and how often to automatically deploy package upgrades to a fleet of hosts. Each schedule includes:
- A filter query to select target hosts
- A recurrence rule defining maintenance windows
- A version strategy (e.g., always latest, or N versions behind latest)
When the schedule triggers during a maintenance window, it automatically creates a deployment that upgrades the Datadog Agent to the specified version on all matching hosts.
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 285 def create_fleet_schedule_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_fleet_schedule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_fleet_schedule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_fleet_schedule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.create_fleet_schedule ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FleetAutomationAPI.create_fleet_schedule" end # resource path local_var_path = '/api/unstable/fleet/schedules' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'FleetScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :create_fleet_schedule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#create_fleet_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_fleet_schedule(id, opts = {}) ⇒ Object
Delete a schedule.
346 347 348 349 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 346 def delete_fleet_schedule(id, opts = {}) delete_fleet_schedule_with_http_info(id, opts) nil end |
#delete_fleet_schedule_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a schedule.
Delete a schedule permanently.
When you delete a schedule:
- The schedule is permanently removed and will no longer create deployments
- Any deployments already created by this schedule are not affected
- This action cannot be undone
If you want to temporarily stop a schedule from creating deployments, consider updating its status to "inactive" instead of deleting it.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 366 def delete_fleet_schedule_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.delete_fleet_schedule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_fleet_schedule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_fleet_schedule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.delete_fleet_schedule ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling FleetAutomationAPI.delete_fleet_schedule" end # resource path local_var_path = '/api/unstable/fleet/schedules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :delete_fleet_schedule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#delete_fleet_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fleet_agent_detail_v2(agent_key, opts = {}) ⇒ Object
Get detailed information about an agent.
425 426 427 428 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 425 def get_fleet_agent_detail_v2(agent_key, opts = {}) data, _status_code, _headers = get_fleet_agent_detail_v2_with_http_info(agent_key, opts) data end |
#get_fleet_agent_detail_v2_with_http_info(agent_key, opts = {}) ⇒ Array<(FleetAgentDetailV2Response, Integer, Hash)>
Get detailed information about an agent.
Retrieve detailed information about a specific Datadog Agent.
By default, only agent_infos is returned. Use the include query parameter to
request additional data: integrations and/or configuration_files.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 441 def get_fleet_agent_detail_v2_with_http_info(agent_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.get_fleet_agent_detail_v2 ...' end # verify the required parameter 'agent_key' is set if @api_client.config.client_side_validation && agent_key.nil? fail ArgumentError, "Missing the required parameter 'agent_key' when calling FleetAutomationAPI.get_fleet_agent_detail_v2" end pattern = Regexp.new("^[0-9a-f]{32}$") if @api_client.config.client_side_validation && agent_key !~ pattern fail ArgumentError, "invalid value for 'agent_key' when calling FleetAutomationAPI.get_fleet_agent_detail_v2, must conform to the pattern #{pattern}." end # resource path local_var_path = '/api/v2/fleet/agents/{agent_key}'.sub('{agent_key}', CGI.escape(agent_key.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetAgentDetailV2Response' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_fleet_agent_detail_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#get_fleet_agent_detail_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fleet_deployment_v2(deployment_id, opts = {}) ⇒ Object
Get a deployment by ID.
499 500 501 502 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 499 def get_fleet_deployment_v2(deployment_id, opts = {}) data, _status_code, _headers = get_fleet_deployment_v2_with_http_info(deployment_id, opts) data end |
#get_fleet_deployment_v2_with_http_info(deployment_id, opts = {}) ⇒ Array<(FleetDeploymentV2DetailResponse, Integer, Hash)>
Get a deployment by ID.
Retrieve detailed information about a specific deployment, including its current status, configuration operations, and per-host execution status.
Returns a 404 if no deployment matches the given ID or if you do not have access to it.
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 514 def get_fleet_deployment_v2_with_http_info(deployment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.get_fleet_deployment_v2 ...' end # verify the required parameter 'deployment_id' is set if @api_client.config.client_side_validation && deployment_id.nil? fail ArgumentError, "Missing the required parameter 'deployment_id' when calling FleetAutomationAPI.get_fleet_deployment_v2" end # resource path local_var_path = '/api/v2/fleet/deployments/{deployment_id}'.sub('{deployment_id}', CGI.escape(deployment_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetDeploymentV2DetailResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_fleet_deployment_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#get_fleet_deployment_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_fleet_schedule_v2(id, opts = {}) ⇒ Object
Get a schedule by ID.
567 568 569 570 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 567 def get_fleet_schedule_v2(id, opts = {}) data, _status_code, _headers = get_fleet_schedule_v2_with_http_info(id, opts) data end |
#get_fleet_schedule_v2_with_http_info(id, opts = {}) ⇒ Array<(FleetScheduleV2Response, Integer, Hash)>
Get a schedule by ID.
Retrieve detailed information about a specific schedule by its unique identifier.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 579 def get_fleet_schedule_v2_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.get_fleet_schedule_v2 ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling FleetAutomationAPI.get_fleet_schedule_v2" end # resource path local_var_path = '/api/v2/fleet/schedules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetScheduleV2Response' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_fleet_schedule_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#get_fleet_schedule_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fleet_agent_tracers(agent_key, opts = {}) ⇒ Object
List tracers for a specific agent.
717 718 719 720 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 717 def list_fleet_agent_tracers(agent_key, opts = {}) data, _status_code, _headers = list_fleet_agent_tracers_with_http_info(agent_key, opts) data end |
#list_fleet_agent_tracers_with_http_info(agent_key, opts = {}) ⇒ Array<(FleetTracersResponse, Integer, Hash)>
List tracers for a specific agent.
Retrieve a paginated list of tracers for a specific agent.
This endpoint returns tracers associated with a given agent key, identified by the agent's hostname. Use this to discover telemetry-derived service names for a particular host.
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 736 def list_fleet_agent_tracers_with_http_info(agent_key, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_fleet_agent_tracers".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_fleet_agent_tracers") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_fleet_agent_tracers")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.list_fleet_agent_tracers ...' end # verify the required parameter 'agent_key' is set if @api_client.config.client_side_validation && agent_key.nil? fail ArgumentError, "Missing the required parameter 'agent_key' when calling FleetAutomationAPI.list_fleet_agent_tracers" end if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling FleetAutomationAPI.list_fleet_agent_tracers, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_agent_tracers, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_agent_tracers, must be greater than or equal to 1.' end # resource path local_var_path = '/api/unstable/fleet/agents/{agent_key}/tracers'.sub('{agent_key}', CGI.escape(agent_key.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_attribute'] = opts[:'sort_attribute'] if !opts[:'sort_attribute'].nil? query_params[:'sort_descending'] = opts[:'sort_descending'] if !opts[:'sort_descending'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetTracersResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_fleet_agent_tracers, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#list_fleet_agent_tracers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fleet_agent_versions_v2(opts = {}) ⇒ Object
List available Datadog Agent versions.
808 809 810 811 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 808 def list_fleet_agent_versions_v2(opts = {}) data, _status_code, _headers = list_fleet_agent_versions_v2_with_http_info(opts) data end |
#list_fleet_agent_versions_v2_with_http_info(opts = {}) ⇒ Array<(FleetAgentVersionsV2Response, Integer, Hash)>
List available Datadog Agent versions.
Retrieve the list of Datadog Agent versions available for deployment.
Returns 200 with an empty data array if the Agent package exists in the catalog
but has no available versions, and 404 only if the Agent package itself is absent
from the catalog.
823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 823 def list_fleet_agent_versions_v2_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.list_fleet_agent_versions_v2 ...' end # resource path local_var_path = '/api/v2/fleet/agent_versions' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetAgentVersionsV2Response' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_fleet_agent_versions_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#list_fleet_agent_versions_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fleet_agents_v2(opts = {}) ⇒ Object
List all Datadog Agents.
632 633 634 635 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 632 def list_fleet_agents_v2(opts = {}) data, _status_code, _headers = list_fleet_agents_v2_with_http_info(opts) data end |
#list_fleet_agents_v2_with_http_info(opts = {}) ⇒ Array<(FleetAgentsV2Response, Integer, Hash)>
List all Datadog Agents.
Retrieve a paginated list of Datadog Agents.
Returns agents with support for pagination, sorting, and filtering.
Use page_number and page_size to navigate pages, filter to narrow by field values,
and tags to filter by agent tags.
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 653 def list_fleet_agents_v2_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.list_fleet_agents_v2 ...' end if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling FleetAutomationAPI.list_fleet_agents_v2, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_agents_v2, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_agents_v2, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v2/fleet/agents' # query parameters query_params = opts[:query_params] || {} query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil? query_params[:'sort_attribute'] = opts[:'sort_attribute'] if !opts[:'sort_attribute'].nil? query_params[:'sort_descending'] = opts[:'sort_descending'] if !opts[:'sort_descending'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetAgentsV2Response' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_fleet_agents_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#list_fleet_agents_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fleet_deployments_v2(opts = {}) ⇒ Object
List all deployments.
872 873 874 875 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 872 def list_fleet_deployments_v2(opts = {}) data, _status_code, _headers = list_fleet_deployments_v2_with_http_info(opts) data end |
#list_fleet_deployments_v2_with_http_info(opts = {}) ⇒ Array<(FleetDeploymentsV2Response, Integer, Hash)>
List all deployments.
Retrieve a paginated list of all deployments for fleet automation.
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 888 def list_fleet_deployments_v2_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.list_fleet_deployments_v2 ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_deployments_v2, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling FleetAutomationAPI.list_fleet_deployments_v2, must be greater than or equal to 0.' end # resource path local_var_path = '/api/v2/fleet/deployments' # query parameters query_params = opts[:query_params] || {} query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetDeploymentsV2Response' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_fleet_deployments_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#list_fleet_deployments_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fleet_schedules_v2(opts = {}) ⇒ Object
List all schedules.
948 949 950 951 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 948 def list_fleet_schedules_v2(opts = {}) data, _status_code, _headers = list_fleet_schedules_v2_with_http_info(opts) data end |
#list_fleet_schedules_v2_with_http_info(opts = {}) ⇒ Array<(FleetSchedulesV2Response, Integer, Hash)>
List all schedules.
Retrieve all upgrade schedules for the organization.
Schedules automate package upgrades by defining maintenance windows and recurrence rules. Each schedule automatically creates deployments based on its configuration.
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 962 def list_fleet_schedules_v2_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.list_fleet_schedules_v2 ...' end # resource path local_var_path = '/api/v2/fleet/schedules' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetSchedulesV2Response' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_fleet_schedules_v2, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#list_fleet_schedules_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_fleet_tracers(opts = {}) ⇒ Object
List all fleet tracers.
1011 1012 1013 1014 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 1011 def list_fleet_tracers(opts = {}) data, _status_code, _headers = list_fleet_tracers_with_http_info(opts) data end |
#list_fleet_tracers_with_http_info(opts = {}) ⇒ Array<(FleetTracersResponse, Integer, Hash)>
List all fleet tracers.
Retrieve a paginated list of all fleet tracers.
This endpoint returns telemetry-derived service names from the SDK telemetry pipeline.
These names may differ from span-derived names in APM and are useful for querying
service library configurations.
Use the page_number and page_size query parameters to paginate through results.
1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 1032 def list_fleet_tracers_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_fleet_tracers".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_fleet_tracers") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_fleet_tracers")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.list_fleet_tracers ...' end if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling FleetAutomationAPI.list_fleet_tracers, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_tracers, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling FleetAutomationAPI.list_fleet_tracers, must be greater than or equal to 1.' end # resource path local_var_path = '/api/unstable/fleet/tracers' # query parameters query_params = opts[:query_params] || {} query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort_attribute'] = opts[:'sort_attribute'] if !opts[:'sort_attribute'].nil? query_params[:'sort_descending'] = opts[:'sort_descending'] if !opts[:'sort_descending'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetTracersResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_fleet_tracers, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#list_fleet_tracers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#trigger_fleet_schedule(id, opts = {}) ⇒ Object
Trigger a schedule deployment.
1101 1102 1103 1104 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 1101 def trigger_fleet_schedule(id, opts = {}) data, _status_code, _headers = trigger_fleet_schedule_with_http_info(id, opts) data end |
#trigger_fleet_schedule_with_http_info(id, opts = {}) ⇒ Array<(FleetDeploymentResponse, Integer, Hash)>
Trigger a schedule deployment.
Manually trigger a schedule to immediately create and start a deployment.
This endpoint allows you to manually initiate a deployment using the schedule's configuration, without waiting for the next scheduled maintenance window. This is useful for:
- Testing a schedule before it runs automatically
- Performing an emergency update outside the regular maintenance window
- Creating an ad-hoc deployment with the same settings as a schedule
The deployment is created immediately with:
- The same filter query as the schedule
- The package version determined by the schedule's version strategy
- All matching hosts as targets
The manually triggered deployment is independent of the schedule and does not affect the schedule's normal recurrence pattern.
1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 1128 def trigger_fleet_schedule_with_http_info(id, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.trigger_fleet_schedule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.trigger_fleet_schedule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.trigger_fleet_schedule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.trigger_fleet_schedule ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling FleetAutomationAPI.trigger_fleet_schedule" end # resource path local_var_path = '/api/unstable/fleet/schedules/{id}/trigger'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FleetDeploymentResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :trigger_fleet_schedule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#trigger_fleet_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_fleet_schedule(id, body, opts = {}) ⇒ Object
Update a schedule.
1187 1188 1189 1190 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 1187 def update_fleet_schedule(id, body, opts = {}) data, _status_code, _headers = update_fleet_schedule_with_http_info(id, body, opts) data end |
#update_fleet_schedule_with_http_info(id, body, opts = {}) ⇒ Array<(FleetScheduleResponse, Integer, Hash)>
Update a schedule.
Partially update a schedule by providing only the fields you want to change.
This endpoint allows you to modify specific attributes of a schedule without affecting other fields. Common use cases include:
- Changing the schedule status between active and inactive
- Updating the maintenance window times
- Modifying the filter query to target different hosts
- Adjusting the version strategy
Only include the fields you want to update in the request body. All fields are optional in a PATCH request.
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 |
# File 'lib/datadog_api_client/v2/api/fleet_automation_api.rb', line 1210 def update_fleet_schedule_with_http_info(id, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.update_fleet_schedule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_fleet_schedule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_fleet_schedule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FleetAutomationAPI.update_fleet_schedule ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling FleetAutomationAPI.update_fleet_schedule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FleetAutomationAPI.update_fleet_schedule" end # resource path local_var_path = '/api/unstable/fleet/schedules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'FleetScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :update_fleet_schedule, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FleetAutomationAPI#update_fleet_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |