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
@@ -157,6 +157,73 @@ module DatadogAPIClient::V2
|
|
157
157
|
return data, status_code, headers
|
158
158
|
end
|
159
159
|
|
160
|
+
# Create Cloud Cost Management GCP Usage Cost config.
|
161
|
+
#
|
162
|
+
# @see #create_cost_gcp_usage_cost_config_with_http_info
|
163
|
+
def create_cost_gcp_usage_cost_config(body, opts = {})
|
164
|
+
data, _status_code, _headers = create_cost_gcp_usage_cost_config_with_http_info(body, opts)
|
165
|
+
data
|
166
|
+
end
|
167
|
+
|
168
|
+
# Create Cloud Cost Management GCP Usage Cost config.
|
169
|
+
#
|
170
|
+
# Create a Cloud Cost Management account for an GCP Usage Cost config.
|
171
|
+
#
|
172
|
+
# @param body [GCPUsageCostConfigPostRequest]
|
173
|
+
# @param opts [Hash] the optional parameters
|
174
|
+
# @return [Array<(GCPUsageCostConfigResponse, Integer, Hash)>] GCPUsageCostConfigResponse data, response status code and response headers
|
175
|
+
def create_cost_gcp_usage_cost_config_with_http_info(body, opts = {})
|
176
|
+
|
177
|
+
if @api_client.config.debugging
|
178
|
+
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_cost_gcp_usage_cost_config ...'
|
179
|
+
end
|
180
|
+
# verify the required parameter 'body' is set
|
181
|
+
if @api_client.config.client_side_validation && body.nil?
|
182
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_cost_gcp_usage_cost_config"
|
183
|
+
end
|
184
|
+
# resource path
|
185
|
+
local_var_path = '/api/v2/cost/gcp_uc_config'
|
186
|
+
|
187
|
+
# query parameters
|
188
|
+
query_params = opts[:query_params] || {}
|
189
|
+
|
190
|
+
# header parameters
|
191
|
+
header_params = opts[:header_params] || {}
|
192
|
+
# HTTP header 'Accept' (if needed)
|
193
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
194
|
+
# HTTP header 'Content-Type'
|
195
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
196
|
+
|
197
|
+
# form parameters
|
198
|
+
form_params = opts[:form_params] || {}
|
199
|
+
|
200
|
+
# http body (model)
|
201
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
202
|
+
|
203
|
+
# return_type
|
204
|
+
return_type = opts[:debug_return_type] || 'GCPUsageCostConfigResponse'
|
205
|
+
|
206
|
+
# auth_names
|
207
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
208
|
+
|
209
|
+
new_options = opts.merge(
|
210
|
+
:operation => :create_cost_gcp_usage_cost_config,
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => return_type,
|
217
|
+
:api_version => "V2"
|
218
|
+
)
|
219
|
+
|
220
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "API called: CloudCostManagementAPI#create_cost_gcp_usage_cost_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
|
+
end
|
224
|
+
return data, status_code, headers
|
225
|
+
end
|
226
|
+
|
160
227
|
# Delete a budget.
|
161
228
|
#
|
162
229
|
# @see #delete_budget_with_http_info
|
@@ -352,6 +419,71 @@ module DatadogAPIClient::V2
|
|
352
419
|
return data, status_code, headers
|
353
420
|
end
|
354
421
|
|
422
|
+
# Delete Cloud Cost Management GCP Usage Cost config.
|
423
|
+
#
|
424
|
+
# @see #delete_cost_gcp_usage_cost_config_with_http_info
|
425
|
+
def delete_cost_gcp_usage_cost_config(cloud_account_id, opts = {})
|
426
|
+
delete_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts)
|
427
|
+
nil
|
428
|
+
end
|
429
|
+
|
430
|
+
# Delete Cloud Cost Management GCP Usage Cost config.
|
431
|
+
#
|
432
|
+
# Archive a Cloud Cost Management account.
|
433
|
+
#
|
434
|
+
# @param cloud_account_id [String] Cloud Account id.
|
435
|
+
# @param opts [Hash] the optional parameters
|
436
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
437
|
+
def delete_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts = {})
|
438
|
+
|
439
|
+
if @api_client.config.debugging
|
440
|
+
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_cost_gcp_usage_cost_config ...'
|
441
|
+
end
|
442
|
+
# verify the required parameter 'cloud_account_id' is set
|
443
|
+
if @api_client.config.client_side_validation && cloud_account_id.nil?
|
444
|
+
fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.delete_cost_gcp_usage_cost_config"
|
445
|
+
end
|
446
|
+
# resource path
|
447
|
+
local_var_path = '/api/v2/cost/gcp_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
|
448
|
+
|
449
|
+
# query parameters
|
450
|
+
query_params = opts[:query_params] || {}
|
451
|
+
|
452
|
+
# header parameters
|
453
|
+
header_params = opts[:header_params] || {}
|
454
|
+
# HTTP header 'Accept' (if needed)
|
455
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
456
|
+
|
457
|
+
# form parameters
|
458
|
+
form_params = opts[:form_params] || {}
|
459
|
+
|
460
|
+
# http body (model)
|
461
|
+
post_body = opts[:debug_body]
|
462
|
+
|
463
|
+
# return_type
|
464
|
+
return_type = opts[:debug_return_type]
|
465
|
+
|
466
|
+
# auth_names
|
467
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
468
|
+
|
469
|
+
new_options = opts.merge(
|
470
|
+
:operation => :delete_cost_gcp_usage_cost_config,
|
471
|
+
:header_params => header_params,
|
472
|
+
:query_params => query_params,
|
473
|
+
:form_params => form_params,
|
474
|
+
:body => post_body,
|
475
|
+
:auth_names => auth_names,
|
476
|
+
:return_type => return_type,
|
477
|
+
:api_version => "V2"
|
478
|
+
)
|
479
|
+
|
480
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
481
|
+
if @api_client.config.debugging
|
482
|
+
@api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_cost_gcp_usage_cost_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
483
|
+
end
|
484
|
+
return data, status_code, headers
|
485
|
+
end
|
486
|
+
|
355
487
|
# Delete Custom Costs file.
|
356
488
|
#
|
357
489
|
# @see #delete_custom_costs_file_with_http_info
|
@@ -727,6 +859,66 @@ module DatadogAPIClient::V2
|
|
727
859
|
return data, status_code, headers
|
728
860
|
end
|
729
861
|
|
862
|
+
# List Cloud Cost Management GCP Usage Cost configs.
|
863
|
+
#
|
864
|
+
# @see #list_cost_gcp_usage_cost_configs_with_http_info
|
865
|
+
def list_cost_gcp_usage_cost_configs(opts = {})
|
866
|
+
data, _status_code, _headers = list_cost_gcp_usage_cost_configs_with_http_info(opts)
|
867
|
+
data
|
868
|
+
end
|
869
|
+
|
870
|
+
# List Cloud Cost Management GCP Usage Cost configs.
|
871
|
+
#
|
872
|
+
# List the GCP Usage Cost configs.
|
873
|
+
#
|
874
|
+
# @param opts [Hash] the optional parameters
|
875
|
+
# @return [Array<(GCPUsageCostConfigsResponse, Integer, Hash)>] GCPUsageCostConfigsResponse data, response status code and response headers
|
876
|
+
def list_cost_gcp_usage_cost_configs_with_http_info(opts = {})
|
877
|
+
|
878
|
+
if @api_client.config.debugging
|
879
|
+
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_gcp_usage_cost_configs ...'
|
880
|
+
end
|
881
|
+
# resource path
|
882
|
+
local_var_path = '/api/v2/cost/gcp_uc_config'
|
883
|
+
|
884
|
+
# query parameters
|
885
|
+
query_params = opts[:query_params] || {}
|
886
|
+
|
887
|
+
# header parameters
|
888
|
+
header_params = opts[:header_params] || {}
|
889
|
+
# HTTP header 'Accept' (if needed)
|
890
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
891
|
+
|
892
|
+
# form parameters
|
893
|
+
form_params = opts[:form_params] || {}
|
894
|
+
|
895
|
+
# http body (model)
|
896
|
+
post_body = opts[:debug_body]
|
897
|
+
|
898
|
+
# return_type
|
899
|
+
return_type = opts[:debug_return_type] || 'GCPUsageCostConfigsResponse'
|
900
|
+
|
901
|
+
# auth_names
|
902
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
903
|
+
|
904
|
+
new_options = opts.merge(
|
905
|
+
:operation => :list_cost_gcp_usage_cost_configs,
|
906
|
+
:header_params => header_params,
|
907
|
+
:query_params => query_params,
|
908
|
+
:form_params => form_params,
|
909
|
+
:body => post_body,
|
910
|
+
:auth_names => auth_names,
|
911
|
+
:return_type => return_type,
|
912
|
+
:api_version => "V2"
|
913
|
+
)
|
914
|
+
|
915
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
916
|
+
if @api_client.config.debugging
|
917
|
+
@api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_gcp_usage_cost_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
918
|
+
end
|
919
|
+
return data, status_code, headers
|
920
|
+
end
|
921
|
+
|
730
922
|
# List Custom Costs files.
|
731
923
|
#
|
732
924
|
# @see #list_custom_costs_files_with_http_info
|
@@ -931,6 +1123,78 @@ module DatadogAPIClient::V2
|
|
931
1123
|
return data, status_code, headers
|
932
1124
|
end
|
933
1125
|
|
1126
|
+
# Update Cloud Cost Management GCP Usage Cost config.
|
1127
|
+
#
|
1128
|
+
# @see #update_cost_gcp_usage_cost_config_with_http_info
|
1129
|
+
def update_cost_gcp_usage_cost_config(cloud_account_id, body, opts = {})
|
1130
|
+
data, _status_code, _headers = update_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, body, opts)
|
1131
|
+
data
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# Update Cloud Cost Management GCP Usage Cost config.
|
1135
|
+
#
|
1136
|
+
# Update the status of an GCP Usage Cost config (active/archived).
|
1137
|
+
#
|
1138
|
+
# @param cloud_account_id [String] Cloud Account id.
|
1139
|
+
# @param body [GCPUsageCostConfigPatchRequest]
|
1140
|
+
# @param opts [Hash] the optional parameters
|
1141
|
+
# @return [Array<(GCPUsageCostConfigResponse, Integer, Hash)>] GCPUsageCostConfigResponse data, response status code and response headers
|
1142
|
+
def update_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, body, opts = {})
|
1143
|
+
|
1144
|
+
if @api_client.config.debugging
|
1145
|
+
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_cost_gcp_usage_cost_config ...'
|
1146
|
+
end
|
1147
|
+
# verify the required parameter 'cloud_account_id' is set
|
1148
|
+
if @api_client.config.client_side_validation && cloud_account_id.nil?
|
1149
|
+
fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.update_cost_gcp_usage_cost_config"
|
1150
|
+
end
|
1151
|
+
# verify the required parameter 'body' is set
|
1152
|
+
if @api_client.config.client_side_validation && body.nil?
|
1153
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_cost_gcp_usage_cost_config"
|
1154
|
+
end
|
1155
|
+
# resource path
|
1156
|
+
local_var_path = '/api/v2/cost/gcp_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
|
1157
|
+
|
1158
|
+
# query parameters
|
1159
|
+
query_params = opts[:query_params] || {}
|
1160
|
+
|
1161
|
+
# header parameters
|
1162
|
+
header_params = opts[:header_params] || {}
|
1163
|
+
# HTTP header 'Accept' (if needed)
|
1164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1165
|
+
# HTTP header 'Content-Type'
|
1166
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1167
|
+
|
1168
|
+
# form parameters
|
1169
|
+
form_params = opts[:form_params] || {}
|
1170
|
+
|
1171
|
+
# http body (model)
|
1172
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1173
|
+
|
1174
|
+
# return_type
|
1175
|
+
return_type = opts[:debug_return_type] || 'GCPUsageCostConfigResponse'
|
1176
|
+
|
1177
|
+
# auth_names
|
1178
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1179
|
+
|
1180
|
+
new_options = opts.merge(
|
1181
|
+
:operation => :update_cost_gcp_usage_cost_config,
|
1182
|
+
:header_params => header_params,
|
1183
|
+
:query_params => query_params,
|
1184
|
+
:form_params => form_params,
|
1185
|
+
:body => post_body,
|
1186
|
+
:auth_names => auth_names,
|
1187
|
+
:return_type => return_type,
|
1188
|
+
:api_version => "V2"
|
1189
|
+
)
|
1190
|
+
|
1191
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
1192
|
+
if @api_client.config.debugging
|
1193
|
+
@api_client.config.logger.debug "API called: CloudCostManagementAPI#update_cost_gcp_usage_cost_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1194
|
+
end
|
1195
|
+
return data, status_code, headers
|
1196
|
+
end
|
1197
|
+
|
934
1198
|
# Upload Custom Costs file.
|
935
1199
|
#
|
936
1200
|
# @see #upload_custom_costs_file_with_http_info
|
@@ -0,0 +1,283 @@
|
|
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 DatasetsAPI
|
20
|
+
attr_accessor :api_client
|
21
|
+
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
23
|
+
@api_client = api_client
|
24
|
+
end
|
25
|
+
|
26
|
+
# Create a dataset.
|
27
|
+
#
|
28
|
+
# @see #create_dataset_with_http_info
|
29
|
+
def create_dataset(body, opts = {})
|
30
|
+
data, _status_code, _headers = create_dataset_with_http_info(body, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a dataset.
|
35
|
+
#
|
36
|
+
# Create a dataset with the configurations in the request.
|
37
|
+
#
|
38
|
+
# @param body [DatasetCreateRequest] Dataset payload
|
39
|
+
# @param opts [Hash] the optional parameters
|
40
|
+
# @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers
|
41
|
+
def create_dataset_with_http_info(body, opts = {})
|
42
|
+
|
43
|
+
if @api_client.config.debugging
|
44
|
+
@api_client.config.logger.debug 'Calling API: DatasetsAPI.create_dataset ...'
|
45
|
+
end
|
46
|
+
# verify the required parameter 'body' is set
|
47
|
+
if @api_client.config.client_side_validation && body.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DatasetsAPI.create_dataset"
|
49
|
+
end
|
50
|
+
# resource path
|
51
|
+
local_var_path = '/api/v2/datasets'
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = opts[:query_params] || {}
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = opts[:header_params] || {}
|
58
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
# HTTP header 'Content-Type'
|
61
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = opts[:form_params] || {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
68
|
+
|
69
|
+
# return_type
|
70
|
+
return_type = opts[:debug_return_type] || 'DatasetResponseSingle'
|
71
|
+
|
72
|
+
# auth_names
|
73
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
74
|
+
|
75
|
+
new_options = opts.merge(
|
76
|
+
:operation => :create_dataset,
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type,
|
83
|
+
:api_version => "V2"
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: DatasetsAPI#create_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
93
|
+
# Delete a dataset.
|
94
|
+
#
|
95
|
+
# @see #delete_dataset_with_http_info
|
96
|
+
def delete_dataset(dataset_id, opts = {})
|
97
|
+
delete_dataset_with_http_info(dataset_id, opts)
|
98
|
+
nil
|
99
|
+
end
|
100
|
+
|
101
|
+
# Delete a dataset.
|
102
|
+
#
|
103
|
+
# Deletes the dataset associated with the ID.
|
104
|
+
#
|
105
|
+
# @param dataset_id [String] The ID of a defined dataset.
|
106
|
+
# @param opts [Hash] the optional parameters
|
107
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
108
|
+
def delete_dataset_with_http_info(dataset_id, opts = {})
|
109
|
+
|
110
|
+
if @api_client.config.debugging
|
111
|
+
@api_client.config.logger.debug 'Calling API: DatasetsAPI.delete_dataset ...'
|
112
|
+
end
|
113
|
+
# verify the required parameter 'dataset_id' is set
|
114
|
+
if @api_client.config.client_side_validation && dataset_id.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'dataset_id' when calling DatasetsAPI.delete_dataset"
|
116
|
+
end
|
117
|
+
# resource path
|
118
|
+
local_var_path = '/api/v2/datasets/{dataset_id}'.sub('{dataset_id}', CGI.escape(dataset_id.to_s).gsub('%2F', '/'))
|
119
|
+
|
120
|
+
# query parameters
|
121
|
+
query_params = opts[:query_params] || {}
|
122
|
+
|
123
|
+
# header parameters
|
124
|
+
header_params = opts[:header_params] || {}
|
125
|
+
# HTTP header 'Accept' (if needed)
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body]
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type]
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :delete_dataset,
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type,
|
148
|
+
:api_version => "V2"
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: DatasetsAPI#delete_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
|
158
|
+
# Get all datasets.
|
159
|
+
#
|
160
|
+
# @see #get_all_datasets_with_http_info
|
161
|
+
def get_all_datasets(opts = {})
|
162
|
+
data, _status_code, _headers = get_all_datasets_with_http_info(opts)
|
163
|
+
data
|
164
|
+
end
|
165
|
+
|
166
|
+
# Get all datasets.
|
167
|
+
#
|
168
|
+
# Get all datasets that have been configured for an organization.
|
169
|
+
#
|
170
|
+
# @param opts [Hash] the optional parameters
|
171
|
+
# @return [Array<(DatasetResponseMulti, Integer, Hash)>] DatasetResponseMulti data, response status code and response headers
|
172
|
+
def get_all_datasets_with_http_info(opts = {})
|
173
|
+
|
174
|
+
if @api_client.config.debugging
|
175
|
+
@api_client.config.logger.debug 'Calling API: DatasetsAPI.get_all_datasets ...'
|
176
|
+
end
|
177
|
+
# resource path
|
178
|
+
local_var_path = '/api/v2/datasets'
|
179
|
+
|
180
|
+
# query parameters
|
181
|
+
query_params = opts[:query_params] || {}
|
182
|
+
|
183
|
+
# header parameters
|
184
|
+
header_params = opts[:header_params] || {}
|
185
|
+
# HTTP header 'Accept' (if needed)
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = opts[:form_params] || {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = opts[:debug_body]
|
193
|
+
|
194
|
+
# return_type
|
195
|
+
return_type = opts[:debug_return_type] || 'DatasetResponseMulti'
|
196
|
+
|
197
|
+
# auth_names
|
198
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
199
|
+
|
200
|
+
new_options = opts.merge(
|
201
|
+
:operation => :get_all_datasets,
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type,
|
208
|
+
:api_version => "V2"
|
209
|
+
)
|
210
|
+
|
211
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
212
|
+
if @api_client.config.debugging
|
213
|
+
@api_client.config.logger.debug "API called: DatasetsAPI#get_all_datasets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
214
|
+
end
|
215
|
+
return data, status_code, headers
|
216
|
+
end
|
217
|
+
|
218
|
+
# Get a single dataset by ID.
|
219
|
+
#
|
220
|
+
# @see #get_dataset_with_http_info
|
221
|
+
def get_dataset(dataset_id, opts = {})
|
222
|
+
data, _status_code, _headers = get_dataset_with_http_info(dataset_id, opts)
|
223
|
+
data
|
224
|
+
end
|
225
|
+
|
226
|
+
# Get a single dataset by ID.
|
227
|
+
#
|
228
|
+
# Retrieves the dataset associated with the ID.
|
229
|
+
#
|
230
|
+
# @param dataset_id [String] The ID of a defined dataset.
|
231
|
+
# @param opts [Hash] the optional parameters
|
232
|
+
# @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers
|
233
|
+
def get_dataset_with_http_info(dataset_id, opts = {})
|
234
|
+
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug 'Calling API: DatasetsAPI.get_dataset ...'
|
237
|
+
end
|
238
|
+
# verify the required parameter 'dataset_id' is set
|
239
|
+
if @api_client.config.client_side_validation && dataset_id.nil?
|
240
|
+
fail ArgumentError, "Missing the required parameter 'dataset_id' when calling DatasetsAPI.get_dataset"
|
241
|
+
end
|
242
|
+
# resource path
|
243
|
+
local_var_path = '/api/v2/datasets/{dataset_id}'.sub('{dataset_id}', CGI.escape(dataset_id.to_s).gsub('%2F', '/'))
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = opts[:query_params] || {}
|
247
|
+
|
248
|
+
# header parameters
|
249
|
+
header_params = opts[:header_params] || {}
|
250
|
+
# HTTP header 'Accept' (if needed)
|
251
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:debug_body]
|
258
|
+
|
259
|
+
# return_type
|
260
|
+
return_type = opts[:debug_return_type] || 'DatasetResponseSingle'
|
261
|
+
|
262
|
+
# auth_names
|
263
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
264
|
+
|
265
|
+
new_options = opts.merge(
|
266
|
+
:operation => :get_dataset,
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type,
|
273
|
+
:api_version => "V2"
|
274
|
+
)
|
275
|
+
|
276
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
277
|
+
if @api_client.config.debugging
|
278
|
+
@api_client.config.logger.debug "API called: DatasetsAPI#get_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
279
|
+
end
|
280
|
+
return data, status_code, headers
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
@@ -33,13 +33,19 @@ module DatadogAPIClient::V2
|
|
33
33
|
|
34
34
|
# Post an event.
|
35
35
|
#
|
36
|
-
# This endpoint allows you to
|
36
|
+
# This endpoint allows you to publish events.
|
37
37
|
#
|
38
|
-
#
|
38
|
+
# **Note:** To utilize this endpoint with our client libraries, please ensure you are using the latest version released on or after July 1, 2025. Earlier versions do not support this functionality.
|
39
39
|
#
|
40
|
-
#
|
40
|
+
# ✅ **Only events with the `change` or `alert` category** are in General Availability. For change events, see [Change Tracking](https://docs.datadoghq.com/change_tracking) for more details.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# ❌ For use cases involving other event categories, use the V1 endpoint or reach out to [support](https://www.datadoghq.com/support/).
|
43
|
+
#
|
44
|
+
# ❌ Notifications are not yet supported for events sent to this endpoint. Use the V1 endpoint for notification functionality.
|
45
|
+
#
|
46
|
+
# ❌ This endpoint is not available for the Government (US1-FED) site. Contact your account representative for more information.
|
47
|
+
#
|
48
|
+
# @param body [EventCreateRequestPayload] Event creation request payload.
|
43
49
|
# @param opts [Hash] the optional parameters
|
44
50
|
# @return [Array<(EventCreateResponsePayload, Integer, Hash)>] EventCreateResponsePayload data, response status code and response headers
|
45
51
|
def create_event_with_http_info(body, opts = {})
|