Class: DatadogAPIClient::V1::UsageMeteringAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::UsageMeteringAPI
- Defined in:
- lib/datadog_api_client/v1/api/usage_metering_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_daily_custom_reports(opts = {}) ⇒ Object
Get the list of available daily custom reports.
-
#get_daily_custom_reports_with_http_info(opts = {}) ⇒ Array<(UsageCustomReportsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_hourly_usage_attribution(start_hr, usage_type, opts = {}) ⇒ Object
Get hourly usage attribution.
-
#get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {}) ⇒ Array<(HourlyUsageAttributionResponse, Integer, Hash)>
Get hourly usage attribution.
-
#get_incident_management(start_hr, opts = {}) ⇒ Object
Get hourly usage for incident management.
-
#get_incident_management_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIncidentManagementResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_ingested_spans(start_hr, opts = {}) ⇒ Object
Get hourly usage for ingested spans.
-
#get_ingested_spans_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIngestedSpansResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_monthly_custom_reports(opts = {}) ⇒ Object
Get the list of available monthly custom reports.
-
#get_monthly_custom_reports_with_http_info(opts = {}) ⇒ Array<(UsageCustomReportsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_monthly_usage_attribution(start_month, fields, opts = {}) ⇒ Object
Get monthly usage attribution.
-
#get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) ⇒ Array<(MonthlyUsageAttributionResponse, Integer, Hash)>
Get monthly usage attribution.
-
#get_specified_daily_custom_reports(report_id, opts = {}) ⇒ Object
Get specified daily custom reports.
-
#get_specified_daily_custom_reports_with_http_info(report_id, opts = {}) ⇒ Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_specified_monthly_custom_reports(report_id, opts = {}) ⇒ Object
Get specified monthly custom reports.
-
#get_specified_monthly_custom_reports_with_http_info(report_id, opts = {}) ⇒ Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_analyzed_logs(start_hr, opts = {}) ⇒ Object
Get hourly usage for analyzed logs.
-
#get_usage_analyzed_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageAnalyzedLogsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_audit_logs(start_hr, opts = {}) ⇒ Object
Get hourly usage for audit logs.
-
#get_usage_audit_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageAuditLogsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_billable_summary(opts = {}) ⇒ Object
Get billable usage across your account.
-
#get_usage_billable_summary_with_http_info(opts = {}) ⇒ Array<(UsageBillableSummaryResponse, Integer, Hash)>
Get billable usage across your account.
-
#get_usage_ci_app(start_hr, opts = {}) ⇒ Object
Get hourly usage for CI visibility.
-
#get_usage_ci_app_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCIVisibilityResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_cloud_security_posture_management(start_hr, opts = {}) ⇒ Object
Get hourly usage for CSM Pro.
-
#get_usage_cloud_security_posture_management_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCloudSecurityPostureManagementResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_cws(start_hr, opts = {}) ⇒ Object
Get hourly usage for cloud workload security.
-
#get_usage_cws_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCWSResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_dbm(start_hr, opts = {}) ⇒ Object
Get hourly usage for database monitoring.
-
#get_usage_dbm_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageDBMResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_fargate(start_hr, opts = {}) ⇒ Object
Get hourly usage for Fargate.
-
#get_usage_fargate_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageFargateResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_hosts(start_hr, opts = {}) ⇒ Object
Get hourly usage for hosts and containers.
-
#get_usage_hosts_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageHostsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_indexed_spans(start_hr, opts = {}) ⇒ Object
Get hourly usage for indexed spans.
-
#get_usage_indexed_spans_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIndexedSpansResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_internet_of_things(start_hr, opts = {}) ⇒ Object
Get hourly usage for IoT.
-
#get_usage_internet_of_things_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIoTResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_lambda(start_hr, opts = {}) ⇒ Object
Get hourly usage for Lambda.
-
#get_usage_lambda_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLambdaResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_logs(start_hr, opts = {}) ⇒ Object
Get hourly usage for logs.
-
#get_usage_logs_by_index(start_hr, opts = {}) ⇒ Object
Get hourly usage for logs by index.
-
#get_usage_logs_by_index_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsByIndexResponse, Integer, Hash)>
Get hourly usage for logs by index.
-
#get_usage_logs_by_retention(start_hr, opts = {}) ⇒ Object
Get hourly logs usage by retention.
-
#get_usage_logs_by_retention_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsByRetentionResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_network_flows(start_hr, opts = {}) ⇒ Object
get hourly usage for network flows.
-
#get_usage_network_flows_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageNetworkFlowsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_network_hosts(start_hr, opts = {}) ⇒ Object
Get hourly usage for network hosts.
-
#get_usage_network_hosts_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageNetworkHostsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_online_archive(start_hr, opts = {}) ⇒ Object
Get hourly usage for online archive.
-
#get_usage_online_archive_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageOnlineArchiveResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_profiling(start_hr, opts = {}) ⇒ Object
Get hourly usage for profiled hosts.
-
#get_usage_profiling_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageProfilingResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_rum_sessions(start_hr, opts = {}) ⇒ Object
Get hourly usage for RUM sessions.
-
#get_usage_rum_sessions_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageRumSessionsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_rum_units(start_hr, opts = {}) ⇒ Object
Get hourly usage for RUM units.
-
#get_usage_rum_units_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageRumUnitsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_sds(start_hr, opts = {}) ⇒ Object
Get hourly usage for sensitive data scanner.
-
#get_usage_sds_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSDSResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_snmp(start_hr, opts = {}) ⇒ Object
Get hourly usage for SNMP devices.
-
#get_usage_snmp_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSNMPResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_summary(start_month, opts = {}) ⇒ Object
Get usage across your account.
-
#get_usage_summary_with_http_info(start_month, opts = {}) ⇒ Array<(UsageSummaryResponse, Integer, Hash)>
Get usage across your account.
-
#get_usage_synthetics(start_hr, opts = {}) ⇒ Object
Get hourly usage for synthetics checks.
-
#get_usage_synthetics_api(start_hr, opts = {}) ⇒ Object
Get hourly usage for synthetics API checks.
-
#get_usage_synthetics_api_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSyntheticsAPIResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_synthetics_browser(start_hr, opts = {}) ⇒ Object
Get hourly usage for synthetics browser checks.
-
#get_usage_synthetics_browser_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSyntheticsBrowserResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_synthetics_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSyntheticsResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_timeseries(start_hr, opts = {}) ⇒ Object
Get hourly usage for custom metrics.
-
#get_usage_timeseries_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageTimeseriesResponse, Integer, Hash)>
deprecated
Deprecated.
This API is deprecated.
-
#get_usage_top_avg_metrics(opts = {}) ⇒ Object
Get all custom metrics by hourly average.
-
#get_usage_top_avg_metrics_with_http_info(opts = {}) ⇒ Array<(UsageTopAvgMetricsResponse, Integer, Hash)>
Get all custom metrics by hourly average.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ UsageMeteringAPI
constructor
A new instance of UsageMeteringAPI.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ UsageMeteringAPI
Returns a new instance of UsageMeteringAPI.
22 23 24 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#get_daily_custom_reports(opts = {}) ⇒ Object
Get the list of available daily custom reports.
29 30 31 32 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 29 def get_daily_custom_reports(opts = {}) data, _status_code, _headers = get_daily_custom_reports_with_http_info(opts) data end |
#get_daily_custom_reports_with_http_info(opts = {}) ⇒ Array<(UsageCustomReportsResponse, Integer, Hash)>
This API is deprecated.
Get the list of available daily custom reports.
Get daily custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to [Migrating from v1 to v2 of the Usage Attribution API](docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 48 def get_daily_custom_reports_with_http_info(opts = {}) warn "[DEPRECATION] `GetDailyCustomReports` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_daily_custom_reports ...' end allowable_values = ['desc', 'asc'] if @api_client.config.client_side_validation && opts[:'sort_dir'] && !allowable_values.include?(opts[:'sort_dir']) fail ArgumentError, "invalid value for \"sort_dir\", must be one of #{allowable_values}" end allowable_values = ['computed_on', 'size', 'start_date', 'end_date'] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/daily_custom_reports' # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageCustomReportsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_daily_custom_reports, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_daily_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_hourly_usage_attribution(start_hr, usage_type, opts = {}) ⇒ Object
Get hourly usage attribution.
110 111 112 113 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 110 def get_hourly_usage_attribution(start_hr, usage_type, opts = {}) data, _status_code, _headers = get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts) data end |
#get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {}) ⇒ Array<(HourlyUsageAttributionResponse, Integer, Hash)>
Get hourly usage attribution.
Get hourly usage attribution. Multi-region data is available starting March 1, 2023.
This API endpoint is paginated. To make sure you receive all records, check if the value of ‘next_record_id` is set in the response. If it is, make another request and pass `next_record_id` as a parameter. Pseudo code example:
“‘ response := GetHourlyUsageAttribution(start_month) cursor := response.metadata.pagination.next_record_id WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetHourlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END “‘
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 141 def get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_hourly_usage_attribution ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_hourly_usage_attribution" end # verify the required parameter 'usage_type' is set if @api_client.config.client_side_validation && usage_type.nil? fail ArgumentError, "Missing the required parameter 'usage_type' when calling UsageMeteringAPI.get_hourly_usage_attribution" end # verify enum value allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'apm_usm_usage', 'appsec_fargate_usage', 'appsec_usage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'browser_usage', 'ci_pipeline_indexed_spans_usage', 'ci_test_indexed_spans_usage', 'ci_visibility_itr_usage', 'cloud_siem_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_event_usage', 'custom_ingested_timeseries_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_hosts_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_spans_usage', 'estimated_ingested_logs_usage', 'estimated_ingested_spans_usage', 'estimated_rum_sessions_usage', 'fargate_usage', 'functions_usage', 'incident_management_monthly_active_users_usage', 'indexed_spans_usage', 'infra_host_usage', 'ingested_logs_bytes_usage', 'ingested_spans_bytes_usage', 'invocations_usage', 'lambda_traced_invocations_usage', 'logs_indexed_15day_usage', 'logs_indexed_180day_usage', 'logs_indexed_1day_usage', 'logs_indexed_30day_usage', 'logs_indexed_360day_usage', 'logs_indexed_3day_usage', 'logs_indexed_45day_usage', 'logs_indexed_60day_usage', 'logs_indexed_7day_usage', 'logs_indexed_90day_usage', 'logs_indexed_custom_retention_usage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'npm_host_usage', 'obs_pipeline_bytes_usage', 'obs_pipelines_vcpu_usage', 'online_archive_usage', 'profiled_container_usage', 'profiled_fargate_usage', 'profiled_host_usage', 'rum_browser_mobile_sessions_usage', 'rum_replay_sessions_usage', 'sca_fargate_usage', 'sds_scanned_bytes_usage', 'serverless_apps_usage', 'siem_analyzed_logs_add_on_usage', 'siem_ingested_bytes_usage', 'snmp_usage', 'universal_service_monitoring_usage', 'vuln_management_hosts_usage', 'workflow_executions_usage'] if @api_client.config.client_side_validation && !allowable_values.include?(usage_type) fail ArgumentError, "invalid value for \"usage_type\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/usage/hourly-attribution' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'usage_type'] = usage_type query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? query_params[:'next_record_id'] = opts[:'next_record_id'] if !opts[:'next_record_id'].nil? query_params[:'tag_breakdown_keys'] = opts[:'tag_breakdown_keys'] if !opts[:'tag_breakdown_keys'].nil? query_params[:'include_descendants'] = opts[:'include_descendants'] if !opts[:'include_descendants'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'HourlyUsageAttributionResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_hourly_usage_attribution, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_hourly_usage_attribution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_incident_management(start_hr, opts = {}) ⇒ Object
Get hourly usage for incident management.
209 210 211 212 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 209 def get_incident_management(start_hr, opts = {}) data, _status_code, _headers = get_incident_management_with_http_info(start_hr, opts) data end |
#get_incident_management_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIncidentManagementResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for incident management.
Get hourly usage for incident management. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 225 def get_incident_management_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetIncidentManagement` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_incident_management ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_incident_management" end # resource path local_var_path = '/api/v1/usage/incident-management' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageIncidentManagementResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_incident_management, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_incident_management\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ingested_spans(start_hr, opts = {}) ⇒ Object
Get hourly usage for ingested spans.
281 282 283 284 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 281 def get_ingested_spans(start_hr, opts = {}) data, _status_code, _headers = get_ingested_spans_with_http_info(start_hr, opts) data end |
#get_ingested_spans_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIngestedSpansResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for ingested spans.
Get hourly usage for ingested spans. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 297 def get_ingested_spans_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetIngestedSpans` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_ingested_spans ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_ingested_spans" end # resource path local_var_path = '/api/v1/usage/ingested-spans' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageIngestedSpansResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_ingested_spans, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_ingested_spans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_monthly_custom_reports(opts = {}) ⇒ Object
Get the list of available monthly custom reports.
353 354 355 356 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 353 def get_monthly_custom_reports(opts = {}) data, _status_code, _headers = get_monthly_custom_reports_with_http_info(opts) data end |
#get_monthly_custom_reports_with_http_info(opts = {}) ⇒ Array<(UsageCustomReportsResponse, Integer, Hash)>
This API is deprecated.
Get the list of available monthly custom reports.
Get monthly custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to [Migrating from v1 to v2 of the Usage Attribution API](docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 372 def get_monthly_custom_reports_with_http_info(opts = {}) warn "[DEPRECATION] `GetMonthlyCustomReports` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_monthly_custom_reports ...' end allowable_values = ['desc', 'asc'] if @api_client.config.client_side_validation && opts[:'sort_dir'] && !allowable_values.include?(opts[:'sort_dir']) fail ArgumentError, "invalid value for \"sort_dir\", must be one of #{allowable_values}" end allowable_values = ['computed_on', 'size', 'start_date', 'end_date'] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/monthly_custom_reports' # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageCustomReportsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_monthly_custom_reports, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_monthly_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_monthly_usage_attribution(start_month, fields, opts = {}) ⇒ Object
Get monthly usage attribution.
434 435 436 437 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 434 def get_monthly_usage_attribution(start_month, fields, opts = {}) data, _status_code, _headers = get_monthly_usage_attribution_with_http_info(start_month, fields, opts) data end |
#get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) ⇒ Array<(MonthlyUsageAttributionResponse, Integer, Hash)>
Get monthly usage attribution.
Get monthly usage attribution. Multi-region data is available starting March 1, 2023.
This API endpoint is paginated. To make sure you receive all records, check if the value of ‘next_record_id` is set in the response. If it is, make another request and pass `next_record_id` as a parameter. Pseudo code example:
“‘ response := GetMonthlyUsageAttribution(start_month) cursor := response.metadata.pagination.next_record_id WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END “‘
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 467 def get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_monthly_usage_attribution ...' end # verify the required parameter 'start_month' is set if @api_client.config.client_side_validation && start_month.nil? fail ArgumentError, "Missing the required parameter 'start_month' when calling UsageMeteringAPI.get_monthly_usage_attribution" end # verify the required parameter 'fields' is set if @api_client.config.client_side_validation && fields.nil? fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_monthly_usage_attribution" end # verify enum value allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'apm_usm_usage', 'apm_usm_percentage', 'appsec_usage', 'appsec_percentage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'browser_usage', 'browser_percentage', 'ci_visibility_itr_usage', 'ci_visibility_itr_percentage', 'cloud_siem_usage', 'cloud_siem_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'custom_ingested_timeseries_usage', 'custom_ingested_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'incident_management_monthly_active_users_usage', 'incident_management_monthly_active_users_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'lambda_traced_invocations_usage', 'lambda_traced_invocations_percentage', 'mobile_app_testing_percentage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'ndm_netflow_percentage', 'npm_host_usage', 'npm_host_percentage', 'obs_pipeline_bytes_usage', 'obs_pipeline_bytes_percentage', 'obs_pipelines_vcpu_usage', 'obs_pipelines_vcpu_percentage', 'online_archive_usage', 'online_archive_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'serverless_apps_usage', 'serverless_apps_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', 'universal_service_monitoring_usage', 'universal_service_monitoring_percentage', 'vuln_management_hosts_usage', 'vuln_management_hosts_percentage', 'sds_scanned_bytes_usage', 'sds_scanned_bytes_percentage', 'ci_test_indexed_spans_usage', 'ci_test_indexed_spans_percentage', 'ingested_logs_bytes_usage', 'ingested_logs_bytes_percentage', 'ci_pipeline_indexed_spans_usage', 'ci_pipeline_indexed_spans_percentage', 'indexed_spans_usage', 'indexed_spans_percentage', 'custom_event_usage', 'custom_event_percentage', 'logs_indexed_custom_retention_usage', 'logs_indexed_custom_retention_percentage', 'logs_indexed_360day_usage', 'logs_indexed_360day_percentage', 'logs_indexed_180day_usage', 'logs_indexed_180day_percentage', 'logs_indexed_90day_usage', 'logs_indexed_90day_percentage', 'logs_indexed_60day_usage', 'logs_indexed_60day_percentage', 'logs_indexed_45day_usage', 'logs_indexed_45day_percentage', 'logs_indexed_30day_usage', 'logs_indexed_30day_percentage', 'logs_indexed_15day_usage', 'logs_indexed_15day_percentage', 'logs_indexed_7day_usage', 'logs_indexed_7day_percentage', 'logs_indexed_3day_usage', 'logs_indexed_3day_percentage', 'logs_indexed_1day_usage', 'logs_indexed_1day_percentage', 'rum_replay_sessions_usage', 'rum_replay_sessions_percentage', 'rum_browser_mobile_sessions_usage', 'rum_browser_mobile_sessions_percentage', 'ingested_spans_bytes_usage', 'ingested_spans_bytes_percentage', 'siem_analyzed_logs_add_on_usage', 'siem_analyzed_logs_add_on_percentage', 'siem_ingested_bytes_usage', 'siem_ingested_bytes_percentage', 'workflow_executions_usage', 'workflow_executions_percentage', 'sca_fargate_usage', 'sca_fargate_percentage', '*'] if @api_client.config.client_side_validation && !allowable_values.include?(fields) fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}" end allowable_values = ['desc', 'asc'] if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'apm_usm_usage', 'apm_usm_percentage', 'appsec_usage', 'appsec_percentage', 'asm_serverless_traced_invocations_usage', 'asm_serverless_traced_invocations_percentage', 'browser_usage', 'browser_percentage', 'ci_visibility_itr_usage', 'ci_visibility_itr_percentage', 'cloud_siem_usage', 'cloud_siem_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'custom_ingested_timeseries_usage', 'custom_ingested_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'error_tracking_usage', 'error_tracking_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'incident_management_monthly_active_users_usage', 'incident_management_monthly_active_users_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'lambda_traced_invocations_usage', 'lambda_traced_invocations_percentage', 'mobile_app_testing_percentage', 'mobile_app_testing_usage', 'ndm_netflow_usage', 'ndm_netflow_percentage', 'npm_host_usage', 'npm_host_percentage', 'obs_pipeline_bytes_usage', 'obs_pipeline_bytes_percentage', 'obs_pipelines_vcpu_usage', 'obs_pipelines_vcpu_percentage', 'online_archive_usage', 'online_archive_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'serverless_apps_usage', 'serverless_apps_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', 'universal_service_monitoring_usage', 'universal_service_monitoring_percentage', 'vuln_management_hosts_usage', 'vuln_management_hosts_percentage', 'sds_scanned_bytes_usage', 'sds_scanned_bytes_percentage', 'ci_test_indexed_spans_usage', 'ci_test_indexed_spans_percentage', 'ingested_logs_bytes_usage', 'ingested_logs_bytes_percentage', 'ci_pipeline_indexed_spans_usage', 'ci_pipeline_indexed_spans_percentage', 'indexed_spans_usage', 'indexed_spans_percentage', 'custom_event_usage', 'custom_event_percentage', 'logs_indexed_custom_retention_usage', 'logs_indexed_custom_retention_percentage', 'logs_indexed_360day_usage', 'logs_indexed_360day_percentage', 'logs_indexed_180day_usage', 'logs_indexed_180day_percentage', 'logs_indexed_90day_usage', 'logs_indexed_90day_percentage', 'logs_indexed_60day_usage', 'logs_indexed_60day_percentage', 'logs_indexed_45day_usage', 'logs_indexed_45day_percentage', 'logs_indexed_30day_usage', 'logs_indexed_30day_percentage', 'logs_indexed_15day_usage', 'logs_indexed_15day_percentage', 'logs_indexed_7day_usage', 'logs_indexed_7day_percentage', 'logs_indexed_3day_usage', 'logs_indexed_3day_percentage', 'logs_indexed_1day_usage', 'logs_indexed_1day_percentage', 'rum_replay_sessions_usage', 'rum_replay_sessions_percentage', 'rum_browser_mobile_sessions_usage', 'rum_browser_mobile_sessions_percentage', 'ingested_spans_bytes_usage', 'ingested_spans_bytes_percentage', 'siem_analyzed_logs_add_on_usage', 'siem_analyzed_logs_add_on_percentage', 'siem_ingested_bytes_usage', 'siem_ingested_bytes_percentage', 'workflow_executions_usage', 'workflow_executions_percentage', 'sca_fargate_usage', 'sca_fargate_percentage', '*'] if @api_client.config.client_side_validation && opts[:'sort_name'] && !allowable_values.include?(opts[:'sort_name']) fail ArgumentError, "invalid value for \"sort_name\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/usage/monthly-attribution' # query parameters query_params = opts[:query_params] || {} query_params[:'start_month'] = start_month query_params[:'fields'] = fields query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil? query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil? query_params[:'sort_name'] = opts[:'sort_name'] if !opts[:'sort_name'].nil? query_params[:'tag_breakdown_keys'] = opts[:'tag_breakdown_keys'] if !opts[:'tag_breakdown_keys'].nil? query_params[:'next_record_id'] = opts[:'next_record_id'] if !opts[:'next_record_id'].nil? query_params[:'include_descendants'] = opts[:'include_descendants'] if !opts[:'include_descendants'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MonthlyUsageAttributionResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_monthly_usage_attribution, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_monthly_usage_attribution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_specified_daily_custom_reports(report_id, opts = {}) ⇒ Object
Get specified daily custom reports.
545 546 547 548 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 545 def get_specified_daily_custom_reports(report_id, opts = {}) data, _status_code, _headers = get_specified_daily_custom_reports_with_http_info(report_id, opts) data end |
#get_specified_daily_custom_reports_with_http_info(report_id, opts = {}) ⇒ Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>
This API is deprecated.
Get specified daily custom reports.
Get specified daily custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to [Migrating from v1 to v2 of the Usage Attribution API](docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 561 def get_specified_daily_custom_reports_with_http_info(report_id, opts = {}) warn "[DEPRECATION] `GetSpecifiedDailyCustomReports` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_specified_daily_custom_reports ...' end # verify the required parameter 'report_id' is set if @api_client.config.client_side_validation && report_id.nil? fail ArgumentError, "Missing the required parameter 'report_id' when calling UsageMeteringAPI.get_specified_daily_custom_reports" end # resource path local_var_path = '/api/v1/daily_custom_reports/{report_id}'.sub('{report_id}', CGI.escape(report_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSpecifiedCustomReportsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_specified_daily_custom_reports, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_specified_daily_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_specified_monthly_custom_reports(report_id, opts = {}) ⇒ Object
Get specified monthly custom reports.
615 616 617 618 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 615 def get_specified_monthly_custom_reports(report_id, opts = {}) data, _status_code, _headers = get_specified_monthly_custom_reports_with_http_info(report_id, opts) data end |
#get_specified_monthly_custom_reports_with_http_info(report_id, opts = {}) ⇒ Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>
This API is deprecated.
Get specified monthly custom reports.
Get specified monthly custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to [Migrating from v1 to v2 of the Usage Attribution API](docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 631 def get_specified_monthly_custom_reports_with_http_info(report_id, opts = {}) warn "[DEPRECATION] `GetSpecifiedMonthlyCustomReports` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_specified_monthly_custom_reports ...' end # verify the required parameter 'report_id' is set if @api_client.config.client_side_validation && report_id.nil? fail ArgumentError, "Missing the required parameter 'report_id' when calling UsageMeteringAPI.get_specified_monthly_custom_reports" end # resource path local_var_path = '/api/v1/monthly_custom_reports/{report_id}'.sub('{report_id}', CGI.escape(report_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSpecifiedCustomReportsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_specified_monthly_custom_reports, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_specified_monthly_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_analyzed_logs(start_hr, opts = {}) ⇒ Object
Get hourly usage for analyzed logs.
685 686 687 688 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 685 def get_usage_analyzed_logs(start_hr, opts = {}) data, _status_code, _headers = get_usage_analyzed_logs_with_http_info(start_hr, opts) data end |
#get_usage_analyzed_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageAnalyzedLogsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for analyzed logs.
Get hourly usage for analyzed logs (Security Monitoring). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 701 def get_usage_analyzed_logs_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageAnalyzedLogs` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_analyzed_logs ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_analyzed_logs" end # resource path local_var_path = '/api/v1/usage/analyzed_logs' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageAnalyzedLogsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_analyzed_logs, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_analyzed_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_audit_logs(start_hr, opts = {}) ⇒ Object
Get hourly usage for audit logs.
757 758 759 760 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 757 def get_usage_audit_logs(start_hr, opts = {}) data, _status_code, _headers = get_usage_audit_logs_with_http_info(start_hr, opts) data end |
#get_usage_audit_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageAuditLogsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for audit logs.
Get hourly usage for audit logs. Note: This endpoint has been deprecated.
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 773 def get_usage_audit_logs_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageAuditLogs` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_audit_logs ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_audit_logs" end # resource path local_var_path = '/api/v1/usage/audit_logs' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageAuditLogsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_audit_logs, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_audit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_billable_summary(opts = {}) ⇒ Object
Get billable usage across your account.
829 830 831 832 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 829 def get_usage_billable_summary(opts = {}) data, _status_code, _headers = get_usage_billable_summary_with_http_info(opts) data end |
#get_usage_billable_summary_with_http_info(opts = {}) ⇒ Array<(UsageBillableSummaryResponse, Integer, Hash)>
Get billable usage across your account.
Get billable usage across your account.
This endpoint is only accessible for [parent-level organizations](docs.datadoghq.com/account_management/multi_organization/).
844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 844 def get_usage_billable_summary_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_billable_summary ...' end # resource path local_var_path = '/api/v1/usage/billable-summary' # query parameters query_params = opts[:query_params] || {} query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil? query_params[:'include_connected_accounts'] = opts[:'include_connected_accounts'] if !opts[:'include_connected_accounts'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageBillableSummaryResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_billable_summary, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_billable_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_ci_app(start_hr, opts = {}) ⇒ Object
Get hourly usage for CI visibility.
895 896 897 898 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 895 def get_usage_ci_app(start_hr, opts = {}) data, _status_code, _headers = get_usage_ci_app_with_http_info(start_hr, opts) data end |
#get_usage_ci_app_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCIVisibilityResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for CI visibility.
Get hourly usage for CI visibility (tests, pipeline, and spans). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 911 def get_usage_ci_app_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageCIApp` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_ci_app ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_ci_app" end # resource path local_var_path = '/api/v1/usage/ci-app' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageCIVisibilityResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_ci_app, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_ci_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_cloud_security_posture_management(start_hr, opts = {}) ⇒ Object
Get hourly usage for CSM Pro.
967 968 969 970 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 967 def get_usage_cloud_security_posture_management(start_hr, opts = {}) data, _status_code, _headers = get_usage_cloud_security_posture_management_with_http_info(start_hr, opts) data end |
#get_usage_cloud_security_posture_management_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCloudSecurityPostureManagementResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for CSM Pro.
Get hourly usage for cloud security management (CSM) pro. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 983 def get_usage_cloud_security_posture_management_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageCloudSecurityPostureManagement` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_cloud_security_posture_management ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_cloud_security_posture_management" end # resource path local_var_path = '/api/v1/usage/cspm' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageCloudSecurityPostureManagementResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_cloud_security_posture_management, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_cloud_security_posture_management\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_cws(start_hr, opts = {}) ⇒ Object
Get hourly usage for cloud workload security.
1039 1040 1041 1042 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1039 def get_usage_cws(start_hr, opts = {}) data, _status_code, _headers = get_usage_cws_with_http_info(start_hr, opts) data end |
#get_usage_cws_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCWSResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for cloud workload security.
Get hourly usage for cloud workload security. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1055 def get_usage_cws_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageCWS` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_cws ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_cws" end # resource path local_var_path = '/api/v1/usage/cws' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageCWSResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_cws, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_cws\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_dbm(start_hr, opts = {}) ⇒ Object
Get hourly usage for database monitoring.
1111 1112 1113 1114 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1111 def get_usage_dbm(start_hr, opts = {}) data, _status_code, _headers = get_usage_dbm_with_http_info(start_hr, opts) data end |
#get_usage_dbm_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageDBMResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for database monitoring.
Get hourly usage for database monitoring Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1127 def get_usage_dbm_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageDBM` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_dbm ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_dbm" end # resource path local_var_path = '/api/v1/usage/dbm' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageDBMResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_dbm, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_dbm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_fargate(start_hr, opts = {}) ⇒ Object
Get hourly usage for Fargate.
1183 1184 1185 1186 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1183 def get_usage_fargate(start_hr, opts = {}) data, _status_code, _headers = get_usage_fargate_with_http_info(start_hr, opts) data end |
#get_usage_fargate_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageFargateResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for Fargate.
Get hourly usage for [Fargate](docs.datadoghq.com/integrations/ecs_fargate/). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1199 def get_usage_fargate_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageFargate` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_fargate ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_fargate" end # resource path local_var_path = '/api/v1/usage/fargate' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageFargateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_fargate, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_fargate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_hosts(start_hr, opts = {}) ⇒ Object
Get hourly usage for hosts and containers.
1255 1256 1257 1258 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1255 def get_usage_hosts(start_hr, opts = {}) data, _status_code, _headers = get_usage_hosts_with_http_info(start_hr, opts) data end |
#get_usage_hosts_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageHostsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for hosts and containers.
Get hourly usage for hosts and containers. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1271 def get_usage_hosts_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageHosts` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_hosts ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_hosts" end # resource path local_var_path = '/api/v1/usage/hosts' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageHostsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_hosts, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_hosts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_indexed_spans(start_hr, opts = {}) ⇒ Object
Get hourly usage for indexed spans.
1327 1328 1329 1330 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1327 def get_usage_indexed_spans(start_hr, opts = {}) data, _status_code, _headers = get_usage_indexed_spans_with_http_info(start_hr, opts) data end |
#get_usage_indexed_spans_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIndexedSpansResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for indexed spans.
Get hourly usage for indexed spans. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1343 def get_usage_indexed_spans_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageIndexedSpans` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_indexed_spans ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_indexed_spans" end # resource path local_var_path = '/api/v1/usage/indexed-spans' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageIndexedSpansResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_indexed_spans, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_indexed_spans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_internet_of_things(start_hr, opts = {}) ⇒ Object
Get hourly usage for IoT.
1399 1400 1401 1402 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1399 def get_usage_internet_of_things(start_hr, opts = {}) data, _status_code, _headers = get_usage_internet_of_things_with_http_info(start_hr, opts) data end |
#get_usage_internet_of_things_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageIoTResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for IoT.
Get hourly usage for IoT. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1415 def get_usage_internet_of_things_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageInternetOfThings` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_internet_of_things ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_internet_of_things" end # resource path local_var_path = '/api/v1/usage/iot' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageIoTResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_internet_of_things, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_internet_of_things\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_lambda(start_hr, opts = {}) ⇒ Object
Get hourly usage for Lambda.
1471 1472 1473 1474 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1471 def get_usage_lambda(start_hr, opts = {}) data, _status_code, _headers = get_usage_lambda_with_http_info(start_hr, opts) data end |
#get_usage_lambda_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLambdaResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for Lambda.
Get hourly usage for Lambda. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1487 def get_usage_lambda_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageLambda` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_lambda ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_lambda" end # resource path local_var_path = '/api/v1/usage/aws_lambda' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageLambdaResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_lambda, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_lambda\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_logs(start_hr, opts = {}) ⇒ Object
Get hourly usage for logs.
1543 1544 1545 1546 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1543 def get_usage_logs(start_hr, opts = {}) data, _status_code, _headers = get_usage_logs_with_http_info(start_hr, opts) data end |
#get_usage_logs_by_index(start_hr, opts = {}) ⇒ Object
Get hourly usage for logs by index.
1615 1616 1617 1618 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1615 def get_usage_logs_by_index(start_hr, opts = {}) data, _status_code, _headers = get_usage_logs_by_index_with_http_info(start_hr, opts) data end |
#get_usage_logs_by_index_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsByIndexResponse, Integer, Hash)>
Get hourly usage for logs by index.
Get hourly usage for logs by index.
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1629 def get_usage_logs_by_index_with_http_info(start_hr, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_logs_by_index ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_logs_by_index" end # resource path local_var_path = '/api/v1/usage/logs_by_index' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? query_params[:'index_name'] = @api_client.build_collection_param(opts[:'index_name'], :multi) if !opts[:'index_name'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageLogsByIndexResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_logs_by_index, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_logs_by_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_logs_by_retention(start_hr, opts = {}) ⇒ Object
Get hourly logs usage by retention.
1685 1686 1687 1688 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1685 def get_usage_logs_by_retention(start_hr, opts = {}) data, _status_code, _headers = get_usage_logs_by_retention_with_http_info(start_hr, opts) data end |
#get_usage_logs_by_retention_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsByRetentionResponse, Integer, Hash)>
This API is deprecated.
Get hourly logs usage by retention.
Get hourly usage for indexed logs by retention period. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1701 def get_usage_logs_by_retention_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageLogsByRetention` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_logs_by_retention ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_logs_by_retention" end # resource path local_var_path = '/api/v1/usage/logs-by-retention' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageLogsByRetentionResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_logs_by_retention, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_logs_by_retention\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for logs.
Get hourly usage for logs. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1559 def get_usage_logs_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageLogs` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_logs ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_logs" end # resource path local_var_path = '/api/v1/usage/logs' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageLogsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_logs, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_network_flows(start_hr, opts = {}) ⇒ Object
get hourly usage for network flows.
1757 1758 1759 1760 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1757 def get_usage_network_flows(start_hr, opts = {}) data, _status_code, _headers = get_usage_network_flows_with_http_info(start_hr, opts) data end |
#get_usage_network_flows_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageNetworkFlowsResponse, Integer, Hash)>
This API is deprecated.
get hourly usage for network flows.
Get hourly usage for network flows. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1773 def get_usage_network_flows_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageNetworkFlows` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_network_flows ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_network_flows" end # resource path local_var_path = '/api/v1/usage/network_flows' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageNetworkFlowsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_network_flows, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_network_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_network_hosts(start_hr, opts = {}) ⇒ Object
Get hourly usage for network hosts.
1829 1830 1831 1832 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1829 def get_usage_network_hosts(start_hr, opts = {}) data, _status_code, _headers = get_usage_network_hosts_with_http_info(start_hr, opts) data end |
#get_usage_network_hosts_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageNetworkHostsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for network hosts.
Get hourly usage for network hosts. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1845 def get_usage_network_hosts_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageNetworkHosts` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_network_hosts ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_network_hosts" end # resource path local_var_path = '/api/v1/usage/network_hosts' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageNetworkHostsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_network_hosts, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_network_hosts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_online_archive(start_hr, opts = {}) ⇒ Object
Get hourly usage for online archive.
1901 1902 1903 1904 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1901 def get_usage_online_archive(start_hr, opts = {}) data, _status_code, _headers = get_usage_online_archive_with_http_info(start_hr, opts) data end |
#get_usage_online_archive_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageOnlineArchiveResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for online archive.
Get hourly usage for online archive. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1917 def get_usage_online_archive_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageOnlineArchive` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_online_archive ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_online_archive" end # resource path local_var_path = '/api/v1/usage/online-archive' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageOnlineArchiveResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_online_archive, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_online_archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_profiling(start_hr, opts = {}) ⇒ Object
Get hourly usage for profiled hosts.
1973 1974 1975 1976 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1973 def get_usage_profiling(start_hr, opts = {}) data, _status_code, _headers = get_usage_profiling_with_http_info(start_hr, opts) data end |
#get_usage_profiling_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageProfilingResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for profiled hosts.
Get hourly usage for profiled hosts. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1989 def get_usage_profiling_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageProfiling` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_profiling ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_profiling" end # resource path local_var_path = '/api/v1/usage/profiling' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageProfilingResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_profiling, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_profiling\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_rum_sessions(start_hr, opts = {}) ⇒ Object
Get hourly usage for RUM sessions.
2045 2046 2047 2048 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2045 def get_usage_rum_sessions(start_hr, opts = {}) data, _status_code, _headers = get_usage_rum_sessions_with_http_info(start_hr, opts) data end |
#get_usage_rum_sessions_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageRumSessionsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for RUM sessions.
Get hourly usage for [RUM](docs.datadoghq.com/real_user_monitoring/) Sessions. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2062 def get_usage_rum_sessions_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageRumSessions` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_rum_sessions ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_rum_sessions" end # resource path local_var_path = '/api/v1/usage/rum_sessions' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageRumSessionsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_rum_sessions, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_rum_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_rum_units(start_hr, opts = {}) ⇒ Object
Get hourly usage for RUM units.
2119 2120 2121 2122 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2119 def get_usage_rum_units(start_hr, opts = {}) data, _status_code, _headers = get_usage_rum_units_with_http_info(start_hr, opts) data end |
#get_usage_rum_units_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageRumUnitsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for RUM units.
Get hourly usage for [RUM](docs.datadoghq.com/real_user_monitoring/) Units. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2135 def get_usage_rum_units_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageRumUnits` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_rum_units ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_rum_units" end # resource path local_var_path = '/api/v1/usage/rum' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageRumUnitsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_rum_units, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_rum_units\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_sds(start_hr, opts = {}) ⇒ Object
Get hourly usage for sensitive data scanner.
2191 2192 2193 2194 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2191 def get_usage_sds(start_hr, opts = {}) data, _status_code, _headers = get_usage_sds_with_http_info(start_hr, opts) data end |
#get_usage_sds_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSDSResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for sensitive data scanner.
Get hourly usage for sensitive data scanner. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2207 def get_usage_sds_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageSDS` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_sds ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_sds" end # resource path local_var_path = '/api/v1/usage/sds' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSDSResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_sds, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_sds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_snmp(start_hr, opts = {}) ⇒ Object
Get hourly usage for SNMP devices.
2263 2264 2265 2266 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2263 def get_usage_snmp(start_hr, opts = {}) data, _status_code, _headers = get_usage_snmp_with_http_info(start_hr, opts) data end |
#get_usage_snmp_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSNMPResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for SNMP devices.
Get hourly usage for SNMP devices. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2279 def get_usage_snmp_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageSNMP` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_snmp ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_snmp" end # resource path local_var_path = '/api/v1/usage/snmp' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSNMPResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_snmp, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_snmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_summary(start_month, opts = {}) ⇒ Object
Get usage across your account.
2335 2336 2337 2338 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2335 def get_usage_summary(start_month, opts = {}) data, _status_code, _headers = get_usage_summary_with_http_info(start_month, opts) data end |
#get_usage_summary_with_http_info(start_month, opts = {}) ⇒ Array<(UsageSummaryResponse, Integer, Hash)>
Get usage across your account.
Get all usage across your account.
This endpoint is only accessible for [parent-level organizations](docs.datadoghq.com/account_management/multi_organization/).
2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2352 def get_usage_summary_with_http_info(start_month, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_summary ...' end # verify the required parameter 'start_month' is set if @api_client.config.client_side_validation && start_month.nil? fail ArgumentError, "Missing the required parameter 'start_month' when calling UsageMeteringAPI.get_usage_summary" end # resource path local_var_path = '/api/v1/usage/summary' # query parameters query_params = opts[:query_params] || {} query_params[:'start_month'] = start_month query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil? query_params[:'include_org_details'] = opts[:'include_org_details'] if !opts[:'include_org_details'].nil? query_params[:'include_connected_accounts'] = opts[:'include_connected_accounts'] if !opts[:'include_connected_accounts'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSummaryResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_summary, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_synthetics(start_hr, opts = {}) ⇒ Object
Get hourly usage for synthetics checks.
2409 2410 2411 2412 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2409 def get_usage_synthetics(start_hr, opts = {}) data, _status_code, _headers = get_usage_synthetics_with_http_info(start_hr, opts) data end |
#get_usage_synthetics_api(start_hr, opts = {}) ⇒ Object
Get hourly usage for synthetics API checks.
2481 2482 2483 2484 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2481 def get_usage_synthetics_api(start_hr, opts = {}) data, _status_code, _headers = get_usage_synthetics_api_with_http_info(start_hr, opts) data end |
#get_usage_synthetics_api_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSyntheticsAPIResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for synthetics API checks.
Get hourly usage for [synthetics API checks](docs.datadoghq.com/synthetics/). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2497 def get_usage_synthetics_api_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageSyntheticsAPI` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_synthetics_api ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_synthetics_api" end # resource path local_var_path = '/api/v1/usage/synthetics_api' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSyntheticsAPIResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_synthetics_api, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_synthetics_api\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_synthetics_browser(start_hr, opts = {}) ⇒ Object
Get hourly usage for synthetics browser checks.
2553 2554 2555 2556 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2553 def get_usage_synthetics_browser(start_hr, opts = {}) data, _status_code, _headers = get_usage_synthetics_browser_with_http_info(start_hr, opts) data end |
#get_usage_synthetics_browser_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSyntheticsBrowserResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for synthetics browser checks.
Get hourly usage for synthetics browser checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2569 def get_usage_synthetics_browser_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageSyntheticsBrowser` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_synthetics_browser ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_synthetics_browser" end # resource path local_var_path = '/api/v1/usage/synthetics_browser' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSyntheticsBrowserResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_synthetics_browser, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_synthetics_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_synthetics_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageSyntheticsResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for synthetics checks.
Get hourly usage for [synthetics checks](docs.datadoghq.com/synthetics/). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2425 def get_usage_synthetics_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageSynthetics` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_synthetics ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_synthetics" end # resource path local_var_path = '/api/v1/usage/synthetics' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageSyntheticsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_synthetics, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_synthetics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_timeseries(start_hr, opts = {}) ⇒ Object
Get hourly usage for custom metrics.
2625 2626 2627 2628 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2625 def get_usage_timeseries(start_hr, opts = {}) data, _status_code, _headers = get_usage_timeseries_with_http_info(start_hr, opts) data end |
#get_usage_timeseries_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageTimeseriesResponse, Integer, Hash)>
This API is deprecated.
Get hourly usage for custom metrics.
Get hourly usage for [custom metrics](docs.datadoghq.com/developers/metrics/custom_metrics/). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide.
2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2641 def get_usage_timeseries_with_http_info(start_hr, opts = {}) warn "[DEPRECATION] `GetUsageTimeseries` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_timeseries ...' end # verify the required parameter 'start_hr' is set if @api_client.config.client_side_validation && start_hr.nil? fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_timeseries" end # resource path local_var_path = '/api/v1/usage/timeseries' # query parameters query_params = opts[:query_params] || {} query_params[:'start_hr'] = start_hr query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageTimeseriesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_timeseries, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_timeseries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_top_avg_metrics(opts = {}) ⇒ Object
Get all custom metrics by hourly average.
2697 2698 2699 2700 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2697 def get_usage_top_avg_metrics(opts = {}) data, _status_code, _headers = get_usage_top_avg_metrics_with_http_info(opts) data end |
#get_usage_top_avg_metrics_with_http_info(opts = {}) ⇒ Array<(UsageTopAvgMetricsResponse, Integer, Hash)>
Get all custom metrics by hourly average.
Get all [custom metrics](docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2713 def get_usage_top_avg_metrics_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_top_avg_metrics ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageMeteringAPI.get_usage_top_avg_metrics, must be smaller than or equal to 5000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsageMeteringAPI.get_usage_top_avg_metrics, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/usage/top_avg_metrics' # query parameters query_params = opts[:query_params] || {} query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil? query_params[:'day'] = opts[:'day'] if !opts[:'day'].nil? query_params[:'names'] = @api_client.build_collection_param(opts[:'names'], :multi) if !opts[:'names'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'next_record_id'] = opts[:'next_record_id'] if !opts[:'next_record_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsageTopAvgMetricsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_usage_top_avg_metrics, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_top_avg_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |