datadog_api_client 2.37.0 → 2.39.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/.generated-info +4 -0
- data/.generator/schemas/v1/openapi.yaml +513 -14
- data/.generator/schemas/v2/openapi.yaml +2101 -107
- data/.github/workflows/approved_status.yml +1 -0
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +36 -0
- data/examples/v1/dashboards/CreateDashboard_1751391372.rb +41 -0
- data/examples/v1/dashboards/CreatePublicDashboard_1668947073.rb +28 -0
- data/examples/v1/dashboards/UpdatePublicDashboard_1708268778.rb +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1248402480.rb +25 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1267211320.rb +27 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_1271012410.rb +25 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_3314493032.rb +26 -0
- data/examples/v1/logs-pipelines/CreateLogsPipeline_3934594739.rb +26 -0
- data/examples/v1/synthetics/SearchTests.rb +5 -0
- data/examples/v1/synthetics/SearchTests_195957771.rb +13 -0
- data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
- data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
- data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
- data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
- data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissions.rb +5 -0
- data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +19 -0
- data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +5 -0
- data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +5 -0
- data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +14 -0
- data/examples/v2/datasets/CreateDataset.rb +27 -0
- data/examples/v2/datasets/DeleteDataset.rb +5 -0
- data/examples/v2/datasets/GetAllDatasets.rb +5 -0
- data/examples/v2/datasets/GetDataset.rb +5 -0
- data/examples/v2/events/CreateEvent.rb +4 -2
- data/examples/v2/monitors/CreateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
- data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
- data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
- data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
- data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
- data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
- data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
- data/examples/v2/on-call/UpdateOnCallSchedule.rb +1 -1
- data/examples/v2/security-monitoring/ListAssetsSBOMs.rb +12 -0
- data/lib/datadog_api_client/configuration.rb +60 -5
- data/lib/datadog_api_client/inflector.rb +70 -0
- data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +72 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -3
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +9 -1
- data/lib/datadog_api_client/v1/models/logs_array_processor.rb +168 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation.rb +64 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append.rb +175 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length.rb +165 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select.rb +207 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_array_processor_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +142 -1
- data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +81 -1
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
- data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/aws_integration_api.rb +60 -0
- data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +264 -0
- data/lib/datadog_api_client/v2/api/datasets_api.rb +283 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +10 -4
- data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -30
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +111 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/asset_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/dataset.rb +154 -0
- data/lib/datadog_api_client/v2/models/dataset_attributes.rb +197 -0
- data/lib/datadog_api_client/v2/models/dataset_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/dataset_response_multi.rb +125 -0
- data/lib/datadog_api_client/v2/models/dataset_response_single.rb +123 -0
- data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
- data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
- data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
- data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
- data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
- data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
- data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
- data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
- data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
- data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
- data/lib/datadog_api_client/v2/models/filters_per_product.rb +150 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +154 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +369 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +217 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
- data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +1 -1
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/list_assets_sbo_ms_response.rb +145 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/sbom_attributes.rb +24 -1
- data/lib/datadog_api_client/v2/models/sbom_component.rb +46 -1
- data/lib/datadog_api_client/v2/models/sbom_component_dependency.rb +117 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license_license.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_component_license_type.rb +33 -0
- data/lib/datadog_api_client/v2/models/sbom_component_property.rb +144 -0
- data/lib/datadog_api_client/v2/models/sbom_component_supplier.rb +123 -0
- data/lib/datadog_api_client/v2/models/sbom_metadata.rb +25 -3
- data/lib/datadog_api_client/v2/models/sbom_metadata_author.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +1 -1
- data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
- data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +24 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +103 -2
- data/.apigentools-info +0 -16
@@ -106,12 +106,6 @@ module DatadogAPIClient::V2
|
|
106
106
|
# @param opts [Hash] the optional parameters
|
107
107
|
# @return [Array<(MonitorNotificationRuleResponse, Integer, Hash)>] MonitorNotificationRuleResponse data, response status code and response headers
|
108
108
|
def create_monitor_notification_rule_with_http_info(body, opts = {})
|
109
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.create_monitor_notification_rule".to_sym]
|
110
|
-
if unstable_enabled
|
111
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_monitor_notification_rule")
|
112
|
-
else
|
113
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_monitor_notification_rule"))
|
114
|
-
end
|
115
109
|
|
116
110
|
if @api_client.config.debugging
|
117
111
|
@api_client.config.logger.debug 'Calling API: MonitorsAPI.create_monitor_notification_rule ...'
|
@@ -163,6 +157,79 @@ module DatadogAPIClient::V2
|
|
163
157
|
return data, status_code, headers
|
164
158
|
end
|
165
159
|
|
160
|
+
# Create a monitor user template.
|
161
|
+
#
|
162
|
+
# @see #create_monitor_user_template_with_http_info
|
163
|
+
def create_monitor_user_template(body, opts = {})
|
164
|
+
data, _status_code, _headers = create_monitor_user_template_with_http_info(body, opts)
|
165
|
+
data
|
166
|
+
end
|
167
|
+
|
168
|
+
# Create a monitor user template.
|
169
|
+
#
|
170
|
+
# Create a new monitor user template.
|
171
|
+
#
|
172
|
+
# @param body [MonitorUserTemplateCreateRequest]
|
173
|
+
# @param opts [Hash] the optional parameters
|
174
|
+
# @return [Array<(MonitorUserTemplateCreateResponse, Integer, Hash)>] MonitorUserTemplateCreateResponse data, response status code and response headers
|
175
|
+
def create_monitor_user_template_with_http_info(body, opts = {})
|
176
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_monitor_user_template".to_sym]
|
177
|
+
if unstable_enabled
|
178
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_monitor_user_template")
|
179
|
+
else
|
180
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_monitor_user_template"))
|
181
|
+
end
|
182
|
+
|
183
|
+
if @api_client.config.debugging
|
184
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.create_monitor_user_template ...'
|
185
|
+
end
|
186
|
+
# verify the required parameter 'body' is set
|
187
|
+
if @api_client.config.client_side_validation && body.nil?
|
188
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.create_monitor_user_template"
|
189
|
+
end
|
190
|
+
# resource path
|
191
|
+
local_var_path = '/api/v2/monitor/template'
|
192
|
+
|
193
|
+
# query parameters
|
194
|
+
query_params = opts[:query_params] || {}
|
195
|
+
|
196
|
+
# header parameters
|
197
|
+
header_params = opts[:header_params] || {}
|
198
|
+
# HTTP header 'Accept' (if needed)
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
200
|
+
# HTTP header 'Content-Type'
|
201
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
202
|
+
|
203
|
+
# form parameters
|
204
|
+
form_params = opts[:form_params] || {}
|
205
|
+
|
206
|
+
# http body (model)
|
207
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
208
|
+
|
209
|
+
# return_type
|
210
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateCreateResponse'
|
211
|
+
|
212
|
+
# auth_names
|
213
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
214
|
+
|
215
|
+
new_options = opts.merge(
|
216
|
+
:operation => :create_monitor_user_template,
|
217
|
+
:header_params => header_params,
|
218
|
+
:query_params => query_params,
|
219
|
+
:form_params => form_params,
|
220
|
+
:body => post_body,
|
221
|
+
:auth_names => auth_names,
|
222
|
+
:return_type => return_type,
|
223
|
+
:api_version => "V2"
|
224
|
+
)
|
225
|
+
|
226
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#create_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
229
|
+
end
|
230
|
+
return data, status_code, headers
|
231
|
+
end
|
232
|
+
|
166
233
|
# Delete a monitor configuration policy.
|
167
234
|
#
|
168
235
|
# @see #delete_monitor_config_policy_with_http_info
|
@@ -244,12 +311,6 @@ module DatadogAPIClient::V2
|
|
244
311
|
# @param opts [Hash] the optional parameters
|
245
312
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
246
313
|
def delete_monitor_notification_rule_with_http_info(rule_id, opts = {})
|
247
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.delete_monitor_notification_rule".to_sym]
|
248
|
-
if unstable_enabled
|
249
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_monitor_notification_rule")
|
250
|
-
else
|
251
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_monitor_notification_rule"))
|
252
|
-
end
|
253
314
|
|
254
315
|
if @api_client.config.debugging
|
255
316
|
@api_client.config.logger.debug 'Calling API: MonitorsAPI.delete_monitor_notification_rule ...'
|
@@ -299,6 +360,77 @@ module DatadogAPIClient::V2
|
|
299
360
|
return data, status_code, headers
|
300
361
|
end
|
301
362
|
|
363
|
+
# Delete a monitor user template.
|
364
|
+
#
|
365
|
+
# @see #delete_monitor_user_template_with_http_info
|
366
|
+
def delete_monitor_user_template(template_id, opts = {})
|
367
|
+
delete_monitor_user_template_with_http_info(template_id, opts)
|
368
|
+
nil
|
369
|
+
end
|
370
|
+
|
371
|
+
# Delete a monitor user template.
|
372
|
+
#
|
373
|
+
# Delete an existing monitor user template by its ID.
|
374
|
+
#
|
375
|
+
# @param template_id [String] ID of the monitor user template.
|
376
|
+
# @param opts [Hash] the optional parameters
|
377
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
378
|
+
def delete_monitor_user_template_with_http_info(template_id, opts = {})
|
379
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_monitor_user_template".to_sym]
|
380
|
+
if unstable_enabled
|
381
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_monitor_user_template")
|
382
|
+
else
|
383
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_monitor_user_template"))
|
384
|
+
end
|
385
|
+
|
386
|
+
if @api_client.config.debugging
|
387
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.delete_monitor_user_template ...'
|
388
|
+
end
|
389
|
+
# verify the required parameter 'template_id' is set
|
390
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
391
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.delete_monitor_user_template"
|
392
|
+
end
|
393
|
+
# resource path
|
394
|
+
local_var_path = '/api/v2/monitor/template/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = opts[:query_params] || {}
|
398
|
+
|
399
|
+
# header parameters
|
400
|
+
header_params = opts[:header_params] || {}
|
401
|
+
# HTTP header 'Accept' (if needed)
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
403
|
+
|
404
|
+
# form parameters
|
405
|
+
form_params = opts[:form_params] || {}
|
406
|
+
|
407
|
+
# http body (model)
|
408
|
+
post_body = opts[:debug_body]
|
409
|
+
|
410
|
+
# return_type
|
411
|
+
return_type = opts[:debug_return_type]
|
412
|
+
|
413
|
+
# auth_names
|
414
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
415
|
+
|
416
|
+
new_options = opts.merge(
|
417
|
+
:operation => :delete_monitor_user_template,
|
418
|
+
:header_params => header_params,
|
419
|
+
:query_params => query_params,
|
420
|
+
:form_params => form_params,
|
421
|
+
:body => post_body,
|
422
|
+
:auth_names => auth_names,
|
423
|
+
:return_type => return_type,
|
424
|
+
:api_version => "V2"
|
425
|
+
)
|
426
|
+
|
427
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#delete_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
430
|
+
end
|
431
|
+
return data, status_code, headers
|
432
|
+
end
|
433
|
+
|
302
434
|
# Get a monitor configuration policy.
|
303
435
|
#
|
304
436
|
# @see #get_monitor_config_policy_with_http_info
|
@@ -381,12 +513,6 @@ module DatadogAPIClient::V2
|
|
381
513
|
# @option opts [String] :include Comma-separated list of resource paths for related resources to include in the response. Supported resource path is `created_by`.
|
382
514
|
# @return [Array<(MonitorNotificationRuleResponse, Integer, Hash)>] MonitorNotificationRuleResponse data, response status code and response headers
|
383
515
|
def get_monitor_notification_rule_with_http_info(rule_id, opts = {})
|
384
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.get_monitor_notification_rule".to_sym]
|
385
|
-
if unstable_enabled
|
386
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_monitor_notification_rule")
|
387
|
-
else
|
388
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_monitor_notification_rule"))
|
389
|
-
end
|
390
516
|
|
391
517
|
if @api_client.config.debugging
|
392
518
|
@api_client.config.logger.debug 'Calling API: MonitorsAPI.get_monitor_notification_rule ...'
|
@@ -453,12 +579,6 @@ module DatadogAPIClient::V2
|
|
453
579
|
# @option opts [String] :include Comma-separated list of resource paths for related resources to include in the response. Supported resource path is `created_by`.
|
454
580
|
# @return [Array<(MonitorNotificationRuleListResponse, Integer, Hash)>] MonitorNotificationRuleListResponse data, response status code and response headers
|
455
581
|
def get_monitor_notification_rules_with_http_info(opts = {})
|
456
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.get_monitor_notification_rules".to_sym]
|
457
|
-
if unstable_enabled
|
458
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_monitor_notification_rules")
|
459
|
-
else
|
460
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_monitor_notification_rules"))
|
461
|
-
end
|
462
582
|
|
463
583
|
if @api_client.config.debugging
|
464
584
|
@api_client.config.logger.debug 'Calling API: MonitorsAPI.get_monitor_notification_rules ...'
|
@@ -505,6 +625,79 @@ module DatadogAPIClient::V2
|
|
505
625
|
return data, status_code, headers
|
506
626
|
end
|
507
627
|
|
628
|
+
# Get a monitor user template.
|
629
|
+
#
|
630
|
+
# @see #get_monitor_user_template_with_http_info
|
631
|
+
def get_monitor_user_template(template_id, opts = {})
|
632
|
+
data, _status_code, _headers = get_monitor_user_template_with_http_info(template_id, opts)
|
633
|
+
data
|
634
|
+
end
|
635
|
+
|
636
|
+
# Get a monitor user template.
|
637
|
+
#
|
638
|
+
# Retrieve a monitor user template by its ID.
|
639
|
+
#
|
640
|
+
# @param template_id [String] ID of the monitor user template.
|
641
|
+
# @param opts [Hash] the optional parameters
|
642
|
+
# @option opts [Boolean] :with_all_versions Whether to include all versions of the template in the response in the versions field.
|
643
|
+
# @return [Array<(MonitorUserTemplateResponse, Integer, Hash)>] MonitorUserTemplateResponse data, response status code and response headers
|
644
|
+
def get_monitor_user_template_with_http_info(template_id, opts = {})
|
645
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_monitor_user_template".to_sym]
|
646
|
+
if unstable_enabled
|
647
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_monitor_user_template")
|
648
|
+
else
|
649
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_monitor_user_template"))
|
650
|
+
end
|
651
|
+
|
652
|
+
if @api_client.config.debugging
|
653
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.get_monitor_user_template ...'
|
654
|
+
end
|
655
|
+
# verify the required parameter 'template_id' is set
|
656
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
657
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.get_monitor_user_template"
|
658
|
+
end
|
659
|
+
# resource path
|
660
|
+
local_var_path = '/api/v2/monitor/template/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
661
|
+
|
662
|
+
# query parameters
|
663
|
+
query_params = opts[:query_params] || {}
|
664
|
+
query_params[:'with_all_versions'] = opts[:'with_all_versions'] if !opts[:'with_all_versions'].nil?
|
665
|
+
|
666
|
+
# header parameters
|
667
|
+
header_params = opts[:header_params] || {}
|
668
|
+
# HTTP header 'Accept' (if needed)
|
669
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
670
|
+
|
671
|
+
# form parameters
|
672
|
+
form_params = opts[:form_params] || {}
|
673
|
+
|
674
|
+
# http body (model)
|
675
|
+
post_body = opts[:debug_body]
|
676
|
+
|
677
|
+
# return_type
|
678
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateResponse'
|
679
|
+
|
680
|
+
# auth_names
|
681
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
682
|
+
|
683
|
+
new_options = opts.merge(
|
684
|
+
:operation => :get_monitor_user_template,
|
685
|
+
:header_params => header_params,
|
686
|
+
:query_params => query_params,
|
687
|
+
:form_params => form_params,
|
688
|
+
:body => post_body,
|
689
|
+
:auth_names => auth_names,
|
690
|
+
:return_type => return_type,
|
691
|
+
:api_version => "V2"
|
692
|
+
)
|
693
|
+
|
694
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
695
|
+
if @api_client.config.debugging
|
696
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#get_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
697
|
+
end
|
698
|
+
return data, status_code, headers
|
699
|
+
end
|
700
|
+
|
508
701
|
# Get all monitor configuration policies.
|
509
702
|
#
|
510
703
|
# @see #list_monitor_config_policies_with_http_info
|
@@ -565,6 +758,72 @@ module DatadogAPIClient::V2
|
|
565
758
|
return data, status_code, headers
|
566
759
|
end
|
567
760
|
|
761
|
+
# Get all monitor user templates.
|
762
|
+
#
|
763
|
+
# @see #list_monitor_user_templates_with_http_info
|
764
|
+
def list_monitor_user_templates(opts = {})
|
765
|
+
data, _status_code, _headers = list_monitor_user_templates_with_http_info(opts)
|
766
|
+
data
|
767
|
+
end
|
768
|
+
|
769
|
+
# Get all monitor user templates.
|
770
|
+
#
|
771
|
+
# Retrieve all monitor user templates.
|
772
|
+
#
|
773
|
+
# @param opts [Hash] the optional parameters
|
774
|
+
# @return [Array<(MonitorUserTemplateListResponse, Integer, Hash)>] MonitorUserTemplateListResponse data, response status code and response headers
|
775
|
+
def list_monitor_user_templates_with_http_info(opts = {})
|
776
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_monitor_user_templates".to_sym]
|
777
|
+
if unstable_enabled
|
778
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_monitor_user_templates")
|
779
|
+
else
|
780
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_monitor_user_templates"))
|
781
|
+
end
|
782
|
+
|
783
|
+
if @api_client.config.debugging
|
784
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.list_monitor_user_templates ...'
|
785
|
+
end
|
786
|
+
# resource path
|
787
|
+
local_var_path = '/api/v2/monitor/template'
|
788
|
+
|
789
|
+
# query parameters
|
790
|
+
query_params = opts[:query_params] || {}
|
791
|
+
|
792
|
+
# header parameters
|
793
|
+
header_params = opts[:header_params] || {}
|
794
|
+
# HTTP header 'Accept' (if needed)
|
795
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
796
|
+
|
797
|
+
# form parameters
|
798
|
+
form_params = opts[:form_params] || {}
|
799
|
+
|
800
|
+
# http body (model)
|
801
|
+
post_body = opts[:debug_body]
|
802
|
+
|
803
|
+
# return_type
|
804
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateListResponse'
|
805
|
+
|
806
|
+
# auth_names
|
807
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
808
|
+
|
809
|
+
new_options = opts.merge(
|
810
|
+
:operation => :list_monitor_user_templates,
|
811
|
+
:header_params => header_params,
|
812
|
+
:query_params => query_params,
|
813
|
+
:form_params => form_params,
|
814
|
+
:body => post_body,
|
815
|
+
:auth_names => auth_names,
|
816
|
+
:return_type => return_type,
|
817
|
+
:api_version => "V2"
|
818
|
+
)
|
819
|
+
|
820
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
821
|
+
if @api_client.config.debugging
|
822
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#list_monitor_user_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
823
|
+
end
|
824
|
+
return data, status_code, headers
|
825
|
+
end
|
826
|
+
|
568
827
|
# Edit a monitor configuration policy.
|
569
828
|
#
|
570
829
|
# @see #update_monitor_config_policy_with_http_info
|
@@ -654,12 +913,6 @@ module DatadogAPIClient::V2
|
|
654
913
|
# @param opts [Hash] the optional parameters
|
655
914
|
# @return [Array<(MonitorNotificationRuleResponse, Integer, Hash)>] MonitorNotificationRuleResponse data, response status code and response headers
|
656
915
|
def update_monitor_notification_rule_with_http_info(rule_id, body, opts = {})
|
657
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.update_monitor_notification_rule".to_sym]
|
658
|
-
if unstable_enabled
|
659
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_monitor_notification_rule")
|
660
|
-
else
|
661
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_monitor_notification_rule"))
|
662
|
-
end
|
663
916
|
|
664
917
|
if @api_client.config.debugging
|
665
918
|
@api_client.config.logger.debug 'Calling API: MonitorsAPI.update_monitor_notification_rule ...'
|
@@ -714,5 +967,234 @@ module DatadogAPIClient::V2
|
|
714
967
|
end
|
715
968
|
return data, status_code, headers
|
716
969
|
end
|
970
|
+
|
971
|
+
# Update a monitor user template to a new version.
|
972
|
+
#
|
973
|
+
# @see #update_monitor_user_template_with_http_info
|
974
|
+
def update_monitor_user_template(template_id, body, opts = {})
|
975
|
+
data, _status_code, _headers = update_monitor_user_template_with_http_info(template_id, body, opts)
|
976
|
+
data
|
977
|
+
end
|
978
|
+
|
979
|
+
# Update a monitor user template to a new version.
|
980
|
+
#
|
981
|
+
# Creates a new version of an existing monitor user template.
|
982
|
+
#
|
983
|
+
# @param template_id [String] ID of the monitor user template.
|
984
|
+
# @param body [MonitorUserTemplateUpdateRequest]
|
985
|
+
# @param opts [Hash] the optional parameters
|
986
|
+
# @return [Array<(MonitorUserTemplateResponse, Integer, Hash)>] MonitorUserTemplateResponse data, response status code and response headers
|
987
|
+
def update_monitor_user_template_with_http_info(template_id, body, opts = {})
|
988
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_monitor_user_template".to_sym]
|
989
|
+
if unstable_enabled
|
990
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_monitor_user_template")
|
991
|
+
else
|
992
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_monitor_user_template"))
|
993
|
+
end
|
994
|
+
|
995
|
+
if @api_client.config.debugging
|
996
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.update_monitor_user_template ...'
|
997
|
+
end
|
998
|
+
# verify the required parameter 'template_id' is set
|
999
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
1000
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.update_monitor_user_template"
|
1001
|
+
end
|
1002
|
+
# verify the required parameter 'body' is set
|
1003
|
+
if @api_client.config.client_side_validation && body.nil?
|
1004
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.update_monitor_user_template"
|
1005
|
+
end
|
1006
|
+
# resource path
|
1007
|
+
local_var_path = '/api/v2/monitor/template/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
1008
|
+
|
1009
|
+
# query parameters
|
1010
|
+
query_params = opts[:query_params] || {}
|
1011
|
+
|
1012
|
+
# header parameters
|
1013
|
+
header_params = opts[:header_params] || {}
|
1014
|
+
# HTTP header 'Accept' (if needed)
|
1015
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1016
|
+
# HTTP header 'Content-Type'
|
1017
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1018
|
+
|
1019
|
+
# form parameters
|
1020
|
+
form_params = opts[:form_params] || {}
|
1021
|
+
|
1022
|
+
# http body (model)
|
1023
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1024
|
+
|
1025
|
+
# return_type
|
1026
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateResponse'
|
1027
|
+
|
1028
|
+
# auth_names
|
1029
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1030
|
+
|
1031
|
+
new_options = opts.merge(
|
1032
|
+
:operation => :update_monitor_user_template,
|
1033
|
+
:header_params => header_params,
|
1034
|
+
:query_params => query_params,
|
1035
|
+
:form_params => form_params,
|
1036
|
+
:body => post_body,
|
1037
|
+
:auth_names => auth_names,
|
1038
|
+
:return_type => return_type,
|
1039
|
+
:api_version => "V2"
|
1040
|
+
)
|
1041
|
+
|
1042
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
1043
|
+
if @api_client.config.debugging
|
1044
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#update_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1045
|
+
end
|
1046
|
+
return data, status_code, headers
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# Validate an existing monitor user template.
|
1050
|
+
#
|
1051
|
+
# @see #validate_existing_monitor_user_template_with_http_info
|
1052
|
+
def validate_existing_monitor_user_template(template_id, body, opts = {})
|
1053
|
+
validate_existing_monitor_user_template_with_http_info(template_id, body, opts)
|
1054
|
+
nil
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
# Validate an existing monitor user template.
|
1058
|
+
#
|
1059
|
+
# Validate the structure and content of an existing monitor user template being updated to a new version.
|
1060
|
+
#
|
1061
|
+
# @param template_id [String] ID of the monitor user template.
|
1062
|
+
# @param body [MonitorUserTemplateUpdateRequest]
|
1063
|
+
# @param opts [Hash] the optional parameters
|
1064
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1065
|
+
def validate_existing_monitor_user_template_with_http_info(template_id, body, opts = {})
|
1066
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.validate_existing_monitor_user_template".to_sym]
|
1067
|
+
if unstable_enabled
|
1068
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.validate_existing_monitor_user_template")
|
1069
|
+
else
|
1070
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.validate_existing_monitor_user_template"))
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
if @api_client.config.debugging
|
1074
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.validate_existing_monitor_user_template ...'
|
1075
|
+
end
|
1076
|
+
# verify the required parameter 'template_id' is set
|
1077
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
1078
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.validate_existing_monitor_user_template"
|
1079
|
+
end
|
1080
|
+
# verify the required parameter 'body' is set
|
1081
|
+
if @api_client.config.client_side_validation && body.nil?
|
1082
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.validate_existing_monitor_user_template"
|
1083
|
+
end
|
1084
|
+
# resource path
|
1085
|
+
local_var_path = '/api/v2/monitor/template/{template_id}/validate'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
1086
|
+
|
1087
|
+
# query parameters
|
1088
|
+
query_params = opts[:query_params] || {}
|
1089
|
+
|
1090
|
+
# header parameters
|
1091
|
+
header_params = opts[:header_params] || {}
|
1092
|
+
# HTTP header 'Accept' (if needed)
|
1093
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1094
|
+
# HTTP header 'Content-Type'
|
1095
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1096
|
+
|
1097
|
+
# form parameters
|
1098
|
+
form_params = opts[:form_params] || {}
|
1099
|
+
|
1100
|
+
# http body (model)
|
1101
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1102
|
+
|
1103
|
+
# return_type
|
1104
|
+
return_type = opts[:debug_return_type]
|
1105
|
+
|
1106
|
+
# auth_names
|
1107
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1108
|
+
|
1109
|
+
new_options = opts.merge(
|
1110
|
+
:operation => :validate_existing_monitor_user_template,
|
1111
|
+
:header_params => header_params,
|
1112
|
+
:query_params => query_params,
|
1113
|
+
:form_params => form_params,
|
1114
|
+
:body => post_body,
|
1115
|
+
:auth_names => auth_names,
|
1116
|
+
:return_type => return_type,
|
1117
|
+
:api_version => "V2"
|
1118
|
+
)
|
1119
|
+
|
1120
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
1121
|
+
if @api_client.config.debugging
|
1122
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#validate_existing_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1123
|
+
end
|
1124
|
+
return data, status_code, headers
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
# Validate a monitor user template.
|
1128
|
+
#
|
1129
|
+
# @see #validate_monitor_user_template_with_http_info
|
1130
|
+
def validate_monitor_user_template(body, opts = {})
|
1131
|
+
validate_monitor_user_template_with_http_info(body, opts)
|
1132
|
+
nil
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
# Validate a monitor user template.
|
1136
|
+
#
|
1137
|
+
# Validate the structure and content of a monitor user template.
|
1138
|
+
#
|
1139
|
+
# @param body [MonitorUserTemplateCreateRequest]
|
1140
|
+
# @param opts [Hash] the optional parameters
|
1141
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1142
|
+
def validate_monitor_user_template_with_http_info(body, opts = {})
|
1143
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.validate_monitor_user_template".to_sym]
|
1144
|
+
if unstable_enabled
|
1145
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.validate_monitor_user_template")
|
1146
|
+
else
|
1147
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.validate_monitor_user_template"))
|
1148
|
+
end
|
1149
|
+
|
1150
|
+
if @api_client.config.debugging
|
1151
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.validate_monitor_user_template ...'
|
1152
|
+
end
|
1153
|
+
# verify the required parameter 'body' is set
|
1154
|
+
if @api_client.config.client_side_validation && body.nil?
|
1155
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.validate_monitor_user_template"
|
1156
|
+
end
|
1157
|
+
# resource path
|
1158
|
+
local_var_path = '/api/v2/monitor/template/validate'
|
1159
|
+
|
1160
|
+
# query parameters
|
1161
|
+
query_params = opts[:query_params] || {}
|
1162
|
+
|
1163
|
+
# header parameters
|
1164
|
+
header_params = opts[:header_params] || {}
|
1165
|
+
# HTTP header 'Accept' (if needed)
|
1166
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1167
|
+
# HTTP header 'Content-Type'
|
1168
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1169
|
+
|
1170
|
+
# form parameters
|
1171
|
+
form_params = opts[:form_params] || {}
|
1172
|
+
|
1173
|
+
# http body (model)
|
1174
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1175
|
+
|
1176
|
+
# return_type
|
1177
|
+
return_type = opts[:debug_return_type]
|
1178
|
+
|
1179
|
+
# auth_names
|
1180
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1181
|
+
|
1182
|
+
new_options = opts.merge(
|
1183
|
+
:operation => :validate_monitor_user_template,
|
1184
|
+
:header_params => header_params,
|
1185
|
+
:query_params => query_params,
|
1186
|
+
:form_params => form_params,
|
1187
|
+
:body => post_body,
|
1188
|
+
:auth_names => auth_names,
|
1189
|
+
:return_type => return_type,
|
1190
|
+
:api_version => "V2"
|
1191
|
+
)
|
1192
|
+
|
1193
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
1194
|
+
if @api_client.config.debugging
|
1195
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#validate_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1196
|
+
end
|
1197
|
+
return data, status_code, headers
|
1198
|
+
end
|
717
1199
|
end
|
718
1200
|
end
|
@@ -35,7 +35,7 @@ module DatadogAPIClient::V2
|
|
35
35
|
#
|
36
36
|
# Deletes the restriction policy associated with a specified resource.
|
37
37
|
#
|
38
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`.
|
38
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`, `cross-org-connection`, `spreadsheet`.
|
39
39
|
# @param opts [Hash] the optional parameters
|
40
40
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
41
|
def delete_restriction_policy_with_http_info(resource_id, opts = {})
|
@@ -100,7 +100,7 @@ module DatadogAPIClient::V2
|
|
100
100
|
#
|
101
101
|
# Retrieves the restriction policy associated with a specified resource.
|
102
102
|
#
|
103
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`.
|
103
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`, `cross-org-connection`, `spreadsheet`.
|
104
104
|
# @param opts [Hash] the optional parameters
|
105
105
|
# @return [Array<(RestrictionPolicyResponse, Integer, Hash)>] RestrictionPolicyResponse data, response status code and response headers
|
106
106
|
def get_restriction_policy_with_http_info(resource_id, opts = {})
|
@@ -185,6 +185,8 @@ module DatadogAPIClient::V2
|
|
185
185
|
# - Connections: `connection`
|
186
186
|
# - Connection Groups: `connection-group`
|
187
187
|
# - RUM Applications: `rum-application`
|
188
|
+
# - Cross Org Connections: `cross-org-connection`
|
189
|
+
# - Spreadsheets: `spreadsheet`
|
188
190
|
#
|
189
191
|
# #### Supported relations for resources
|
190
192
|
# Resource Type | Supported Relations
|
@@ -207,8 +209,10 @@ module DatadogAPIClient::V2
|
|
207
209
|
# Connections | `viewer`, `resolver`, `editor`
|
208
210
|
# Connection Groups | `viewer`, `editor`
|
209
211
|
# RUM Application | `viewer`, `editor`
|
212
|
+
# Cross Org Connections | `viewer`, `editor`
|
213
|
+
# Spreadsheets | `viewer`, `editor`
|
210
214
|
#
|
211
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`.
|
215
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`, `cross-org-connection`, `spreadsheet`.
|
212
216
|
# @param body [RestrictionPolicyUpdateRequest] Restriction policy payload
|
213
217
|
# @param opts [Hash] the optional parameters
|
214
218
|
# @option opts [Boolean] :allow_self_lockout Allows admins (users with the `user_access_manage` permission) to remove their own access from the resource if set to `true`. By default, this is set to `false`, preventing admins from locking themselves out.
|