datadog_api_client 2.47.0 → 2.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.generator/schemas/v1/openapi.yaml +96 -5
- data/.generator/schemas/v2/openapi.yaml +2453 -707
- data/CHANGELOG.md +20 -0
- data/examples/v2/incidents/CreateIncidentAttachment.rb +22 -0
- data/examples/v2/incidents/DeleteIncidentAttachment.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments.rb +1 -1
- data/examples/v2/incidents/UpdateIncidentAttachment.rb +20 -0
- data/examples/v2/on-call/CreateUserNotificationRule.rb +29 -0
- data/examples/v2/on-call/DeleteUserNotificationRule.rb +11 -0
- data/examples/v2/on-call/GetUserNotificationRule.rb +14 -0
- data/examples/v2/on-call/ListUserNotificationRules.rb +11 -0
- data/examples/v2/on-call/UpdateUserNotificationRule.rb +36 -0
- data/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb +24 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2323193894.rb +48 -0
- data/examples/v2/synthetics/PatchGlobalVariable.rb +19 -0
- data/examples/v2/teams/CreateTeamNotificationRule.rb +23 -0
- data/examples/v2/teams/DeleteTeamConnections.rb +0 -3
- data/examples/v2/teams/DeleteTeamNotificationRule.rb +11 -0
- data/examples/v2/teams/GetTeamNotificationRule.rb +11 -0
- data/examples/v2/teams/GetTeamNotificationRules.rb +8 -0
- data/examples/v2/teams/GetTeamSync.rb +0 -3
- data/examples/v2/teams/ListTeamConnections.rb +0 -3
- data/examples/v2/teams/ListTeamConnections_2418873869.rb +0 -3
- data/examples/v2/teams/SyncTeams.rb +0 -3
- data/examples/v2/teams/SyncTeams_3215592344.rb +0 -3
- data/examples/v2/teams/UpdateTeamNotificationRule.rb +27 -0
- data/lib/datadog_api_client/configuration.rb +55 -6
- data/lib/datadog_api_client/inflector.rb +92 -20
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +3 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -4
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
- data/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details_without_steps.rb +221 -0
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/incidents_api.rb +188 -36
- data/lib/datadog_api_client/v2/api/on_call_api.rb +360 -0
- data/lib/datadog_api_client/v2/api/product_analytics_api.rb +121 -0
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +4 -0
- data/lib/datadog_api_client/v2/api/synthetics_api.rb +79 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +339 -30
- data/lib/datadog_api_client/v2/models/attachment.rb +117 -0
- data/lib/datadog_api_client/v2/models/{incident_attachments_response.rb → attachment_array.rb} +7 -7
- data/lib/datadog_api_client/v2/models/{incident_attachment_data.rb → attachment_data.rb} +8 -8
- data/lib/datadog_api_client/v2/models/attachment_data_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/attachment_data_attributes_attachment.rb +115 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_attachment_type.rb → attachment_data_attributes_attachment_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/{incident_attachment_relationships.rb → attachment_data_relationships.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_request.rb → attachment_data_relationships_last_modified_by_user.rb} +6 -11
- data/lib/datadog_api_client/v2/models/attachment_data_relationships_last_modified_by_user_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/{incident_attachments_response_included_item.rb → attachment_included.rb} +3 -3
- data/lib/datadog_api_client/v2/models/case_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/{dora_fetch_response.rb → create_attachment_request.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_data.rb → create_attachment_request_data.rb} +6 -6
- data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes_attachment.rb +115 -0
- data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_type.rb +1 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_fetch_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_object.rb +125 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_object_attributes.rb +225 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/dora_deployments_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/{dora_list_response.rb → dora_failures_list_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{dora_event.rb → dora_incident_object.rb} +8 -8
- data/lib/datadog_api_client/v2/models/dora_incident_object_attributes.rb +225 -0
- data/lib/datadog_api_client/v2/models/global_variable_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/global_variable_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_link_attachment_type.rb → global_variable_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/{incident_attachments_postmortem_attributes_attachment_object.rb → json_patch_operation.rb} +40 -30
- data/lib/datadog_api_client/v2/models/json_patch_operation_op.rb +31 -0
- data/lib/datadog_api_client/v2/models/list_on_call_notification_rules_response.rb +119 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_response.rb → on_call_notification_rule.rb} +8 -11
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_category.rb +27 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship.rb +123 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_attributes.rb → on_call_notification_rule_channel_settings.rb} +3 -4
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_request_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_attributes.rb → on_call_notification_rules_included.rb} +3 -4
- data/lib/datadog_api_client/v2/models/on_call_phone_notification_rule_method.rb +27 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes_attachment_object.rb → on_call_phone_notification_rule_settings.rb} +30 -30
- data/lib/datadog_api_client/v2/models/patch_attachment_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/patch_attachment_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes.rb +105 -0
- data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes_attachment.rb +115 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb +125 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb +107 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb +195 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.rb +123 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb +124 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.rb +123 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.rb +123 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.rb +123 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options.rb +155 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_bucket_duration.rb +32 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_detection_tolerance.rb +31 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_learning_duration.rb +32 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/synthetics_global_variable.rb +248 -0
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_options.rb +105 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attributes.rb → synthetics_global_variable_parse_test_options.rb} +44 -35
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_parse_test_options_type.rb +29 -0
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_parser_type.rb +29 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes.rb → synthetics_global_variable_totp_parameters.rb} +38 -40
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_value.rb +126 -0
- data/lib/datadog_api_client/v2/models/synthetics_variable_parser.rb +133 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule.rb +154 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_email.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_ms_teams.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_pagerduty.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_slack.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attachment_type.rb → team_notification_rule_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/team_notification_rules_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta_page.rb +184 -0
- data/lib/datadog_api_client/v2/models/threat_hunting_job_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/user140420082644000.rb +143 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_related_object.rb → user_type.rb} +2 -2
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +109 -24
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +0 -11
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +0 -38
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +0 -26
|
@@ -233,6 +233,78 @@ module DatadogAPIClient::V2
|
|
|
233
233
|
return data, status_code, headers
|
|
234
234
|
end
|
|
235
235
|
|
|
236
|
+
# Create an On-Call notification rule for a user.
|
|
237
|
+
#
|
|
238
|
+
# @see #create_user_notification_rule_with_http_info
|
|
239
|
+
def create_user_notification_rule(user_id, body, opts = {})
|
|
240
|
+
data, _status_code, _headers = create_user_notification_rule_with_http_info(user_id, body, opts)
|
|
241
|
+
data
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Create an On-Call notification rule for a user.
|
|
245
|
+
#
|
|
246
|
+
# Create a new notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission
|
|
247
|
+
#
|
|
248
|
+
# @param user_id [String] The user ID
|
|
249
|
+
# @param body [CreateOnCallNotificationRuleRequest]
|
|
250
|
+
# @param opts [Hash] the optional parameters
|
|
251
|
+
# @return [Array<(OnCallNotificationRule, Integer, Hash)>] OnCallNotificationRule data, response status code and response headers
|
|
252
|
+
def create_user_notification_rule_with_http_info(user_id, body, opts = {})
|
|
253
|
+
|
|
254
|
+
if @api_client.config.debugging
|
|
255
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.create_user_notification_rule ...'
|
|
256
|
+
end
|
|
257
|
+
# verify the required parameter 'user_id' is set
|
|
258
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
259
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OnCallAPI.create_user_notification_rule"
|
|
260
|
+
end
|
|
261
|
+
# verify the required parameter 'body' is set
|
|
262
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
263
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OnCallAPI.create_user_notification_rule"
|
|
264
|
+
end
|
|
265
|
+
# resource path
|
|
266
|
+
local_var_path = '/api/v2/on-call/users/{user_id}/notification-rules'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/'))
|
|
267
|
+
|
|
268
|
+
# query parameters
|
|
269
|
+
query_params = opts[:query_params] || {}
|
|
270
|
+
|
|
271
|
+
# header parameters
|
|
272
|
+
header_params = opts[:header_params] || {}
|
|
273
|
+
# HTTP header 'Accept' (if needed)
|
|
274
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
275
|
+
# HTTP header 'Content-Type'
|
|
276
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
277
|
+
|
|
278
|
+
# form parameters
|
|
279
|
+
form_params = opts[:form_params] || {}
|
|
280
|
+
|
|
281
|
+
# http body (model)
|
|
282
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
283
|
+
|
|
284
|
+
# return_type
|
|
285
|
+
return_type = opts[:debug_return_type] || 'OnCallNotificationRule'
|
|
286
|
+
|
|
287
|
+
# auth_names
|
|
288
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
289
|
+
|
|
290
|
+
new_options = opts.merge(
|
|
291
|
+
:operation => :create_user_notification_rule,
|
|
292
|
+
:header_params => header_params,
|
|
293
|
+
:query_params => query_params,
|
|
294
|
+
:form_params => form_params,
|
|
295
|
+
:body => post_body,
|
|
296
|
+
:auth_names => auth_names,
|
|
297
|
+
:return_type => return_type,
|
|
298
|
+
:api_version => "V2"
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug "API called: OnCallAPI#create_user_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
304
|
+
end
|
|
305
|
+
return data, status_code, headers
|
|
306
|
+
end
|
|
307
|
+
|
|
236
308
|
# Delete On-Call escalation policy.
|
|
237
309
|
#
|
|
238
310
|
# @see #delete_on_call_escalation_policy_with_http_info
|
|
@@ -433,6 +505,76 @@ module DatadogAPIClient::V2
|
|
|
433
505
|
return data, status_code, headers
|
|
434
506
|
end
|
|
435
507
|
|
|
508
|
+
# Delete an On-Call notification rule for a user.
|
|
509
|
+
#
|
|
510
|
+
# @see #delete_user_notification_rule_with_http_info
|
|
511
|
+
def delete_user_notification_rule(user_id, rule_id, opts = {})
|
|
512
|
+
delete_user_notification_rule_with_http_info(user_id, rule_id, opts)
|
|
513
|
+
nil
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Delete an On-Call notification rule for a user.
|
|
517
|
+
#
|
|
518
|
+
# Delete a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission
|
|
519
|
+
#
|
|
520
|
+
# @param user_id [String] The user ID
|
|
521
|
+
# @param rule_id [String] The rule ID
|
|
522
|
+
# @param opts [Hash] the optional parameters
|
|
523
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
524
|
+
def delete_user_notification_rule_with_http_info(user_id, rule_id, opts = {})
|
|
525
|
+
|
|
526
|
+
if @api_client.config.debugging
|
|
527
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.delete_user_notification_rule ...'
|
|
528
|
+
end
|
|
529
|
+
# verify the required parameter 'user_id' is set
|
|
530
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
531
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OnCallAPI.delete_user_notification_rule"
|
|
532
|
+
end
|
|
533
|
+
# verify the required parameter 'rule_id' is set
|
|
534
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
|
535
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling OnCallAPI.delete_user_notification_rule"
|
|
536
|
+
end
|
|
537
|
+
# resource path
|
|
538
|
+
local_var_path = '/api/v2/on-call/users/{user_id}/notification-rules/{rule_id}'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
|
|
539
|
+
|
|
540
|
+
# query parameters
|
|
541
|
+
query_params = opts[:query_params] || {}
|
|
542
|
+
|
|
543
|
+
# header parameters
|
|
544
|
+
header_params = opts[:header_params] || {}
|
|
545
|
+
# HTTP header 'Accept' (if needed)
|
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
547
|
+
|
|
548
|
+
# form parameters
|
|
549
|
+
form_params = opts[:form_params] || {}
|
|
550
|
+
|
|
551
|
+
# http body (model)
|
|
552
|
+
post_body = opts[:debug_body]
|
|
553
|
+
|
|
554
|
+
# return_type
|
|
555
|
+
return_type = opts[:debug_return_type]
|
|
556
|
+
|
|
557
|
+
# auth_names
|
|
558
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
559
|
+
|
|
560
|
+
new_options = opts.merge(
|
|
561
|
+
:operation => :delete_user_notification_rule,
|
|
562
|
+
:header_params => header_params,
|
|
563
|
+
:query_params => query_params,
|
|
564
|
+
:form_params => form_params,
|
|
565
|
+
:body => post_body,
|
|
566
|
+
:auth_names => auth_names,
|
|
567
|
+
:return_type => return_type,
|
|
568
|
+
:api_version => "V2"
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
572
|
+
if @api_client.config.debugging
|
|
573
|
+
@api_client.config.logger.debug "API called: OnCallAPI#delete_user_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
574
|
+
end
|
|
575
|
+
return data, status_code, headers
|
|
576
|
+
end
|
|
577
|
+
|
|
436
578
|
# Get On-Call escalation policy.
|
|
437
579
|
#
|
|
438
580
|
# @see #get_on_call_escalation_policy_with_http_info
|
|
@@ -840,6 +982,78 @@ module DatadogAPIClient::V2
|
|
|
840
982
|
return data, status_code, headers
|
|
841
983
|
end
|
|
842
984
|
|
|
985
|
+
# Get an On-Call notification rule for a user.
|
|
986
|
+
#
|
|
987
|
+
# @see #get_user_notification_rule_with_http_info
|
|
988
|
+
def get_user_notification_rule(user_id, rule_id, opts = {})
|
|
989
|
+
data, _status_code, _headers = get_user_notification_rule_with_http_info(user_id, rule_id, opts)
|
|
990
|
+
data
|
|
991
|
+
end
|
|
992
|
+
|
|
993
|
+
# Get an On-Call notification rule for a user.
|
|
994
|
+
#
|
|
995
|
+
# Get a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission
|
|
996
|
+
#
|
|
997
|
+
# @param user_id [String] The user ID
|
|
998
|
+
# @param rule_id [String] The rule ID
|
|
999
|
+
# @param opts [Hash] the optional parameters
|
|
1000
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `channel`.
|
|
1001
|
+
# @return [Array<(OnCallNotificationRule, Integer, Hash)>] OnCallNotificationRule data, response status code and response headers
|
|
1002
|
+
def get_user_notification_rule_with_http_info(user_id, rule_id, opts = {})
|
|
1003
|
+
|
|
1004
|
+
if @api_client.config.debugging
|
|
1005
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.get_user_notification_rule ...'
|
|
1006
|
+
end
|
|
1007
|
+
# verify the required parameter 'user_id' is set
|
|
1008
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
1009
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OnCallAPI.get_user_notification_rule"
|
|
1010
|
+
end
|
|
1011
|
+
# verify the required parameter 'rule_id' is set
|
|
1012
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
|
1013
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling OnCallAPI.get_user_notification_rule"
|
|
1014
|
+
end
|
|
1015
|
+
# resource path
|
|
1016
|
+
local_var_path = '/api/v2/on-call/users/{user_id}/notification-rules/{rule_id}'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
|
|
1017
|
+
|
|
1018
|
+
# query parameters
|
|
1019
|
+
query_params = opts[:query_params] || {}
|
|
1020
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1021
|
+
|
|
1022
|
+
# header parameters
|
|
1023
|
+
header_params = opts[:header_params] || {}
|
|
1024
|
+
# HTTP header 'Accept' (if needed)
|
|
1025
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1026
|
+
|
|
1027
|
+
# form parameters
|
|
1028
|
+
form_params = opts[:form_params] || {}
|
|
1029
|
+
|
|
1030
|
+
# http body (model)
|
|
1031
|
+
post_body = opts[:debug_body]
|
|
1032
|
+
|
|
1033
|
+
# return_type
|
|
1034
|
+
return_type = opts[:debug_return_type] || 'OnCallNotificationRule'
|
|
1035
|
+
|
|
1036
|
+
# auth_names
|
|
1037
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1038
|
+
|
|
1039
|
+
new_options = opts.merge(
|
|
1040
|
+
:operation => :get_user_notification_rule,
|
|
1041
|
+
:header_params => header_params,
|
|
1042
|
+
:query_params => query_params,
|
|
1043
|
+
:form_params => form_params,
|
|
1044
|
+
:body => post_body,
|
|
1045
|
+
:auth_names => auth_names,
|
|
1046
|
+
:return_type => return_type,
|
|
1047
|
+
:api_version => "V2"
|
|
1048
|
+
)
|
|
1049
|
+
|
|
1050
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
1051
|
+
if @api_client.config.debugging
|
|
1052
|
+
@api_client.config.logger.debug "API called: OnCallAPI#get_user_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1053
|
+
end
|
|
1054
|
+
return data, status_code, headers
|
|
1055
|
+
end
|
|
1056
|
+
|
|
843
1057
|
# List On-Call notification channels for a user.
|
|
844
1058
|
#
|
|
845
1059
|
# @see #list_user_notification_channels_with_http_info
|
|
@@ -905,6 +1119,73 @@ module DatadogAPIClient::V2
|
|
|
905
1119
|
return data, status_code, headers
|
|
906
1120
|
end
|
|
907
1121
|
|
|
1122
|
+
# List On-Call notification rules for a user.
|
|
1123
|
+
#
|
|
1124
|
+
# @see #list_user_notification_rules_with_http_info
|
|
1125
|
+
def list_user_notification_rules(user_id, opts = {})
|
|
1126
|
+
data, _status_code, _headers = list_user_notification_rules_with_http_info(user_id, opts)
|
|
1127
|
+
data
|
|
1128
|
+
end
|
|
1129
|
+
|
|
1130
|
+
# List On-Call notification rules for a user.
|
|
1131
|
+
#
|
|
1132
|
+
# List the notification rules for a user. The authenticated user must be the target user or have the `on_call_admin` permission
|
|
1133
|
+
#
|
|
1134
|
+
# @param user_id [String] The user ID
|
|
1135
|
+
# @param opts [Hash] the optional parameters
|
|
1136
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `channel`.
|
|
1137
|
+
# @return [Array<(ListOnCallNotificationRulesResponse, Integer, Hash)>] ListOnCallNotificationRulesResponse data, response status code and response headers
|
|
1138
|
+
def list_user_notification_rules_with_http_info(user_id, opts = {})
|
|
1139
|
+
|
|
1140
|
+
if @api_client.config.debugging
|
|
1141
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.list_user_notification_rules ...'
|
|
1142
|
+
end
|
|
1143
|
+
# verify the required parameter 'user_id' is set
|
|
1144
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
1145
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OnCallAPI.list_user_notification_rules"
|
|
1146
|
+
end
|
|
1147
|
+
# resource path
|
|
1148
|
+
local_var_path = '/api/v2/on-call/users/{user_id}/notification-rules'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/'))
|
|
1149
|
+
|
|
1150
|
+
# query parameters
|
|
1151
|
+
query_params = opts[:query_params] || {}
|
|
1152
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1153
|
+
|
|
1154
|
+
# header parameters
|
|
1155
|
+
header_params = opts[:header_params] || {}
|
|
1156
|
+
# HTTP header 'Accept' (if needed)
|
|
1157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1158
|
+
|
|
1159
|
+
# form parameters
|
|
1160
|
+
form_params = opts[:form_params] || {}
|
|
1161
|
+
|
|
1162
|
+
# http body (model)
|
|
1163
|
+
post_body = opts[:debug_body]
|
|
1164
|
+
|
|
1165
|
+
# return_type
|
|
1166
|
+
return_type = opts[:debug_return_type] || 'ListOnCallNotificationRulesResponse'
|
|
1167
|
+
|
|
1168
|
+
# auth_names
|
|
1169
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1170
|
+
|
|
1171
|
+
new_options = opts.merge(
|
|
1172
|
+
:operation => :list_user_notification_rules,
|
|
1173
|
+
:header_params => header_params,
|
|
1174
|
+
:query_params => query_params,
|
|
1175
|
+
:form_params => form_params,
|
|
1176
|
+
:body => post_body,
|
|
1177
|
+
:auth_names => auth_names,
|
|
1178
|
+
:return_type => return_type,
|
|
1179
|
+
:api_version => "V2"
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
1183
|
+
if @api_client.config.debugging
|
|
1184
|
+
@api_client.config.logger.debug "API called: OnCallAPI#list_user_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1185
|
+
end
|
|
1186
|
+
return data, status_code, headers
|
|
1187
|
+
end
|
|
1188
|
+
|
|
908
1189
|
# Set On-Call team routing rules.
|
|
909
1190
|
#
|
|
910
1191
|
# @see #set_on_call_team_routing_rules_with_http_info
|
|
@@ -1126,5 +1407,84 @@ module DatadogAPIClient::V2
|
|
|
1126
1407
|
end
|
|
1127
1408
|
return data, status_code, headers
|
|
1128
1409
|
end
|
|
1410
|
+
|
|
1411
|
+
# Update an On-Call notification rule for a user.
|
|
1412
|
+
#
|
|
1413
|
+
# @see #update_user_notification_rule_with_http_info
|
|
1414
|
+
def update_user_notification_rule(user_id, rule_id, body, opts = {})
|
|
1415
|
+
data, _status_code, _headers = update_user_notification_rule_with_http_info(user_id, rule_id, body, opts)
|
|
1416
|
+
data
|
|
1417
|
+
end
|
|
1418
|
+
|
|
1419
|
+
# Update an On-Call notification rule for a user.
|
|
1420
|
+
#
|
|
1421
|
+
# Update a notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission
|
|
1422
|
+
#
|
|
1423
|
+
# @param user_id [String] The user ID
|
|
1424
|
+
# @param rule_id [String] The rule ID
|
|
1425
|
+
# @param body [UpdateOnCallNotificationRuleRequest]
|
|
1426
|
+
# @param opts [Hash] the optional parameters
|
|
1427
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `channel`.
|
|
1428
|
+
# @return [Array<(OnCallNotificationRule, Integer, Hash)>] OnCallNotificationRule data, response status code and response headers
|
|
1429
|
+
def update_user_notification_rule_with_http_info(user_id, rule_id, body, opts = {})
|
|
1430
|
+
|
|
1431
|
+
if @api_client.config.debugging
|
|
1432
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.update_user_notification_rule ...'
|
|
1433
|
+
end
|
|
1434
|
+
# verify the required parameter 'user_id' is set
|
|
1435
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
1436
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OnCallAPI.update_user_notification_rule"
|
|
1437
|
+
end
|
|
1438
|
+
# verify the required parameter 'rule_id' is set
|
|
1439
|
+
if @api_client.config.client_side_validation && rule_id.nil?
|
|
1440
|
+
fail ArgumentError, "Missing the required parameter 'rule_id' when calling OnCallAPI.update_user_notification_rule"
|
|
1441
|
+
end
|
|
1442
|
+
# verify the required parameter 'body' is set
|
|
1443
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1444
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OnCallAPI.update_user_notification_rule"
|
|
1445
|
+
end
|
|
1446
|
+
# resource path
|
|
1447
|
+
local_var_path = '/api/v2/on-call/users/{user_id}/notification-rules/{rule_id}'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
|
|
1448
|
+
|
|
1449
|
+
# query parameters
|
|
1450
|
+
query_params = opts[:query_params] || {}
|
|
1451
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1452
|
+
|
|
1453
|
+
# header parameters
|
|
1454
|
+
header_params = opts[:header_params] || {}
|
|
1455
|
+
# HTTP header 'Accept' (if needed)
|
|
1456
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1457
|
+
# HTTP header 'Content-Type'
|
|
1458
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1459
|
+
|
|
1460
|
+
# form parameters
|
|
1461
|
+
form_params = opts[:form_params] || {}
|
|
1462
|
+
|
|
1463
|
+
# http body (model)
|
|
1464
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1465
|
+
|
|
1466
|
+
# return_type
|
|
1467
|
+
return_type = opts[:debug_return_type] || 'OnCallNotificationRule'
|
|
1468
|
+
|
|
1469
|
+
# auth_names
|
|
1470
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
1471
|
+
|
|
1472
|
+
new_options = opts.merge(
|
|
1473
|
+
:operation => :update_user_notification_rule,
|
|
1474
|
+
:header_params => header_params,
|
|
1475
|
+
:query_params => query_params,
|
|
1476
|
+
:form_params => form_params,
|
|
1477
|
+
:body => post_body,
|
|
1478
|
+
:auth_names => auth_names,
|
|
1479
|
+
:return_type => return_type,
|
|
1480
|
+
:api_version => "V2"
|
|
1481
|
+
)
|
|
1482
|
+
|
|
1483
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
|
1484
|
+
if @api_client.config.debugging
|
|
1485
|
+
@api_client.config.logger.debug "API called: OnCallAPI#update_user_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1486
|
+
end
|
|
1487
|
+
return data, status_code, headers
|
|
1488
|
+
end
|
|
1129
1489
|
end
|
|
1130
1490
|
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class ProductAnalyticsAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Send server-side events.
|
|
27
|
+
#
|
|
28
|
+
# @see #submit_product_analytics_event_with_http_info
|
|
29
|
+
def submit_product_analytics_event(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = submit_product_analytics_event_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Send server-side events.
|
|
35
|
+
#
|
|
36
|
+
# Send server-side events to Product Analytics. Server-side events are retained for 15 months.
|
|
37
|
+
#
|
|
38
|
+
# Server-Side events in Product Analytics are helpful for tracking events that occur on the server,
|
|
39
|
+
# as opposed to client-side events, which are captured by Real User Monitoring (RUM) SDKs.
|
|
40
|
+
# This allows for a more comprehensive view of the user journey by including actions that happen on the server.
|
|
41
|
+
# Typical examples could be `checkout.completed` or `payment.processed`.
|
|
42
|
+
#
|
|
43
|
+
# Ingested server-side events are integrated into Product Analytics to allow users to select and filter
|
|
44
|
+
# these events in the event picker, similar to how views or actions are handled.
|
|
45
|
+
#
|
|
46
|
+
# **Requirements:**
|
|
47
|
+
# - At least one of `usr`, `account`, or `session` must be provided with a valid ID.
|
|
48
|
+
# - The `application.id` must reference a Product Analytics-enabled application.
|
|
49
|
+
#
|
|
50
|
+
# **Custom Attributes:**
|
|
51
|
+
# Any additional fields in the payload are flattened and searchable as facets.
|
|
52
|
+
# For example, a payload with `{"customer": {"tier": "premium"}}` is searchable with
|
|
53
|
+
# the syntax `@customer.tier:premium` in Datadog.
|
|
54
|
+
#
|
|
55
|
+
# The status codes answered by the HTTP API are:
|
|
56
|
+
# - 202: Accepted: The request has been accepted for processing
|
|
57
|
+
# - 400: Bad request (likely an issue in the payload formatting)
|
|
58
|
+
# - 401: Unauthorized (likely a missing API Key)
|
|
59
|
+
# - 403: Permission issue (likely using an invalid API Key)
|
|
60
|
+
# - 408: Request Timeout, request should be retried after some time
|
|
61
|
+
# - 413: Payload too large (batch is above 5MB uncompressed)
|
|
62
|
+
# - 429: Too Many Requests, request should be retried after some time
|
|
63
|
+
# - 500: Internal Server Error, the server encountered an unexpected condition that prevented it from fulfilling the request, request should be retried after some time
|
|
64
|
+
# - 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time
|
|
65
|
+
#
|
|
66
|
+
# @param body [ProductAnalyticsServerSideEventItem] Server-side event to send (JSON format).
|
|
67
|
+
# @param opts [Hash] the optional parameters
|
|
68
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
69
|
+
def submit_product_analytics_event_with_http_info(body, opts = {})
|
|
70
|
+
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug 'Calling API: ProductAnalyticsAPI.submit_product_analytics_event ...'
|
|
73
|
+
end
|
|
74
|
+
# verify the required parameter 'body' is set
|
|
75
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
76
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ProductAnalyticsAPI.submit_product_analytics_event"
|
|
77
|
+
end
|
|
78
|
+
# resource path
|
|
79
|
+
local_var_path = '/api/v2/prodlytics'
|
|
80
|
+
|
|
81
|
+
# query parameters
|
|
82
|
+
query_params = opts[:query_params] || {}
|
|
83
|
+
|
|
84
|
+
# header parameters
|
|
85
|
+
header_params = opts[:header_params] || {}
|
|
86
|
+
# HTTP header 'Accept' (if needed)
|
|
87
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
88
|
+
# HTTP header 'Content-Type'
|
|
89
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
90
|
+
|
|
91
|
+
# form parameters
|
|
92
|
+
form_params = opts[:form_params] || {}
|
|
93
|
+
|
|
94
|
+
# http body (model)
|
|
95
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
96
|
+
|
|
97
|
+
# return_type
|
|
98
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
99
|
+
|
|
100
|
+
# auth_names
|
|
101
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth]
|
|
102
|
+
|
|
103
|
+
new_options = opts.merge(
|
|
104
|
+
:operation => :submit_product_analytics_event,
|
|
105
|
+
:header_params => header_params,
|
|
106
|
+
:query_params => query_params,
|
|
107
|
+
:form_params => form_params,
|
|
108
|
+
:body => post_body,
|
|
109
|
+
:auth_names => auth_names,
|
|
110
|
+
:return_type => return_type,
|
|
111
|
+
:api_version => "V2"
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
115
|
+
if @api_client.config.debugging
|
|
116
|
+
@api_client.config.logger.debug "API called: ProductAnalyticsAPI#submit_product_analytics_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
117
|
+
end
|
|
118
|
+
return data, status_code, headers
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -176,6 +176,7 @@ module DatadogAPIClient::V2
|
|
|
176
176
|
# @option opts [RelationType] :filter_relation_type Filter entities by relation type.
|
|
177
177
|
# @option opts [String] :filter_exclude_snapshot Filter entities by excluding snapshotted entities.
|
|
178
178
|
# @option opts [IncludeType] :include Include relationship data.
|
|
179
|
+
# @option opts [Boolean] :include_discovered If true, includes discovered services from APM and USM that do not have entity definitions.
|
|
179
180
|
# @return [Array<(ListEntityCatalogResponse, Integer, Hash)>] ListEntityCatalogResponse data, response status code and response headers
|
|
180
181
|
def list_catalog_entity_with_http_info(opts = {})
|
|
181
182
|
|
|
@@ -205,6 +206,7 @@ module DatadogAPIClient::V2
|
|
|
205
206
|
query_params[:'filter[relation][type]'] = opts[:'filter_relation_type'] if !opts[:'filter_relation_type'].nil?
|
|
206
207
|
query_params[:'filter[exclude_snapshot]'] = opts[:'filter_exclude_snapshot'] if !opts[:'filter_exclude_snapshot'].nil?
|
|
207
208
|
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
209
|
+
query_params[:'includeDiscovered'] = opts[:'include_discovered'] if !opts[:'include_discovered'].nil?
|
|
208
210
|
|
|
209
211
|
# header parameters
|
|
210
212
|
header_params = opts[:header_params] || {}
|
|
@@ -370,6 +372,7 @@ module DatadogAPIClient::V2
|
|
|
370
372
|
# @option opts [String] :filter_from_ref Filter relations by the reference of the first entity in the relation.
|
|
371
373
|
# @option opts [String] :filter_to_ref Filter relations by the reference of the second entity in the relation.
|
|
372
374
|
# @option opts [RelationIncludeType] :include Include relationship data.
|
|
375
|
+
# @option opts [Boolean] :include_discovered If true, includes relationships discovered by APM and USM.
|
|
373
376
|
# @return [Array<(ListRelationCatalogResponse, Integer, Hash)>] ListRelationCatalogResponse data, response status code and response headers
|
|
374
377
|
def list_catalog_relation_with_http_info(opts = {})
|
|
375
378
|
|
|
@@ -395,6 +398,7 @@ module DatadogAPIClient::V2
|
|
|
395
398
|
query_params[:'filter[from_ref]'] = opts[:'filter_from_ref'] if !opts[:'filter_from_ref'].nil?
|
|
396
399
|
query_params[:'filter[to_ref]'] = opts[:'filter_to_ref'] if !opts[:'filter_to_ref'].nil?
|
|
397
400
|
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
401
|
+
query_params[:'includeDiscovered'] = opts[:'include_discovered'] if !opts[:'include_discovered'].nil?
|
|
398
402
|
|
|
399
403
|
# header parameters
|
|
400
404
|
header_params = opts[:header_params] || {}
|
|
@@ -83,6 +83,85 @@ module DatadogAPIClient::V2
|
|
|
83
83
|
return data, status_code, headers
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
# Patch a global variable.
|
|
87
|
+
#
|
|
88
|
+
# @see #patch_global_variable_with_http_info
|
|
89
|
+
def patch_global_variable(variable_id, body, opts = {})
|
|
90
|
+
data, _status_code, _headers = patch_global_variable_with_http_info(variable_id, body, opts)
|
|
91
|
+
data
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Patch a global variable.
|
|
95
|
+
#
|
|
96
|
+
# Patch a global variable using JSON Patch (RFC 6902).
|
|
97
|
+
# This endpoint allows partial updates to a global variable by specifying only the fields to modify.
|
|
98
|
+
#
|
|
99
|
+
# Common operations include:
|
|
100
|
+
# - Replace field values: `{"op": "replace", "path": "/name", "value": "new_name"}`
|
|
101
|
+
# - Update nested values: `{"op": "replace", "path": "/value/value", "value": "new_value"}`
|
|
102
|
+
# - Add/update tags: `{"op": "add", "path": "/tags/-", "value": "new_tag"}`
|
|
103
|
+
# - Remove fields: `{"op": "remove", "path": "/description"}`
|
|
104
|
+
#
|
|
105
|
+
# @param variable_id [String] The ID of the global variable.
|
|
106
|
+
# @param body [GlobalVariableJsonPatchRequest] JSON Patch document with operations to apply.
|
|
107
|
+
# @param opts [Hash] the optional parameters
|
|
108
|
+
# @return [Array<(GlobalVariableResponse, Integer, Hash)>] GlobalVariableResponse data, response status code and response headers
|
|
109
|
+
def patch_global_variable_with_http_info(variable_id, body, opts = {})
|
|
110
|
+
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug 'Calling API: SyntheticsAPI.patch_global_variable ...'
|
|
113
|
+
end
|
|
114
|
+
# verify the required parameter 'variable_id' is set
|
|
115
|
+
if @api_client.config.client_side_validation && variable_id.nil?
|
|
116
|
+
fail ArgumentError, "Missing the required parameter 'variable_id' when calling SyntheticsAPI.patch_global_variable"
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'body' is set
|
|
119
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SyntheticsAPI.patch_global_variable"
|
|
121
|
+
end
|
|
122
|
+
# resource path
|
|
123
|
+
local_var_path = '/api/v2/synthetics/variables/{variable_id}/jsonpatch'.sub('{variable_id}', CGI.escape(variable_id.to_s).gsub('%2F', '/'))
|
|
124
|
+
|
|
125
|
+
# query parameters
|
|
126
|
+
query_params = opts[:query_params] || {}
|
|
127
|
+
|
|
128
|
+
# header parameters
|
|
129
|
+
header_params = opts[:header_params] || {}
|
|
130
|
+
# HTTP header 'Accept' (if needed)
|
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
132
|
+
# HTTP header 'Content-Type'
|
|
133
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
134
|
+
|
|
135
|
+
# form parameters
|
|
136
|
+
form_params = opts[:form_params] || {}
|
|
137
|
+
|
|
138
|
+
# http body (model)
|
|
139
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
140
|
+
|
|
141
|
+
# return_type
|
|
142
|
+
return_type = opts[:debug_return_type] || 'GlobalVariableResponse'
|
|
143
|
+
|
|
144
|
+
# auth_names
|
|
145
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
146
|
+
|
|
147
|
+
new_options = opts.merge(
|
|
148
|
+
:operation => :patch_global_variable,
|
|
149
|
+
:header_params => header_params,
|
|
150
|
+
:query_params => query_params,
|
|
151
|
+
:form_params => form_params,
|
|
152
|
+
:body => post_body,
|
|
153
|
+
:auth_names => auth_names,
|
|
154
|
+
:return_type => return_type,
|
|
155
|
+
:api_version => "V2"
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug "API called: SyntheticsAPI#patch_global_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
161
|
+
end
|
|
162
|
+
return data, status_code, headers
|
|
163
|
+
end
|
|
164
|
+
|
|
86
165
|
# Save new value for on-demand concurrency cap.
|
|
87
166
|
#
|
|
88
167
|
# @see #set_on_demand_concurrency_cap_with_http_info
|