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)>
Get hourly usage for incident management.
-
#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)>
Get hourly usage for ingested spans.
-
#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)>
Get hourly usage for analyzed logs.
-
#get_usage_attribution(start_month, fields, opts = {}) ⇒ Object
Get usage attribution.
-
#get_usage_attribution_with_http_info(start_month, fields, opts = {}) ⇒ Array<(UsageAttributionResponse, 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)>
Get hourly usage for audit logs.
-
#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)>
Get hourly usage for CI visibility.
-
#get_usage_cloud_security_posture_management(start_hr, opts = {}) ⇒ Object
Get hourly usage for CSPM.
-
#get_usage_cloud_security_posture_management_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageCloudSecurityPostureManagementResponse, Integer, Hash)>
Get hourly usage for CSPM.
-
#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)>
Get hourly usage for cloud workload security.
-
#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)>
Get hourly usage for database monitoring.
-
#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)>
Get hourly usage for Fargate.
-
#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)>
Get hourly usage for hosts and containers.
-
#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)>
Get hourly usage for indexed spans.
-
#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)>
Get hourly usage for IoT.
-
#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)>
Get hourly usage for lambda.
-
#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)>
Get hourly logs usage by retention.
-
#get_usage_logs_with_http_info(start_hr, opts = {}) ⇒ Array<(UsageLogsResponse, Integer, Hash)>
Get hourly usage for logs.
-
#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)>
get hourly usage for network flows.
-
#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)>
Get hourly usage for network hosts.
-
#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)>
Get hourly usage for online archive.
-
#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)>
Get hourly usage for profiled hosts.
-
#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)>
Get hourly usage for RUM sessions.
-
#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)>
Get hourly usage for RUM units.
-
#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)>
Get hourly usage for sensitive data scanner.
-
#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)>
Get hourly usage for SNMP devices.
-
#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)>
Get hourly usage for synthetics API checks.
-
#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)>
Get hourly usage for synthetics browser checks.
-
#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)>
Get hourly usage for custom metrics.
-
#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
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, :AuthZ] = 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.
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..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', 'appsec_fargate_usage', 'appsec_usage', 'browser_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_hosts_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_ingested_logs_usage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'functions_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_host_usage', 'snmp_usage', 'estimated_rum_sessions_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)>
Get hourly usage for incident management.
Get hourly usage for incident management. Note: 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.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 223 def get_incident_management_with_http_info(start_hr, opts = {}) 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.
278 279 280 281 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 278 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)>
Get hourly usage for ingested spans.
Get hourly usage for ingested spans. Note: 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.
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 292 def get_ingested_spans_with_http_info(start_hr, opts = {}) 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.
347 348 349 350 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 347 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.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 366 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, :AuthZ] = 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.
428 429 430 431 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 428 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.
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..pagination.next_record_id
END “‘
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 461 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', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_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', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', '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', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_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', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_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', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', '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', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_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.
539 540 541 542 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 539 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.
555 556 557 558 559 560 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 555 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, :AuthZ] = 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.
609 610 611 612 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 609 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.
625 626 627 628 629 630 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 625 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, :AuthZ] = 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.
679 680 681 682 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 679 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)>
Get hourly usage for analyzed logs.
Get hourly usage for analyzed logs (Security Monitoring). Note: 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.
693 694 695 696 697 698 699 700 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 693 def get_usage_analyzed_logs_with_http_info(start_hr, opts = {}) 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_attribution(start_month, fields, opts = {}) ⇒ Object
Get usage attribution.
748 749 750 751 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 748 def get_usage_attribution(start_month, fields, opts = {}) data, _status_code, _headers = get_usage_attribution_with_http_info(start_month, fields, opts) data end |
#get_usage_attribution_with_http_info(start_month, fields, opts = {}) ⇒ Array<(UsageAttributionResponse, Integer, Hash)>
This API is deprecated.
Get usage attribution.
Get usage attribution. 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.
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 771 def get_usage_attribution_with_http_info(start_month, fields, opts = {}) warn "[DEPRECATION] `GetUsageAttribution` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_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_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_usage_attribution" end # verify enum value allowable_values = ['custom_timeseries_usage', 'container_usage', 'snmp_percentage', 'apm_host_usage', 'browser_usage', 'npm_host_percentage', 'infra_host_usage', 'custom_timeseries_percentage', 'container_percentage', 'api_usage', 'apm_host_percentage', 'infra_host_percentage', 'snmp_usage', 'browser_percentage', 'api_percentage', 'npm_host_usage', 'lambda_functions_usage', 'lambda_functions_percentage', 'lambda_invocations_usage', 'lambda_invocations_percentage', 'fargate_usage', 'fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'dbm_hosts_usage', 'dbm_hosts_percentage', 'dbm_queries_usage', 'dbm_queries_percentage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'appsec_usage', 'appsec_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'estimated_rum_usage_attribution_usage', 'estimated_rum_usage_attribution_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_percentage', 'snmp_usage', 'apm_host_usage', 'api_usage', 'appsec_usage', 'appsec_percentage', 'container_usage', 'custom_timeseries_percentage', 'container_percentage', 'apm_host_percentage', 'npm_host_percentage', 'browser_percentage', 'browser_usage', 'infra_host_percentage', 'snmp_percentage', 'npm_host_usage', 'infra_host_usage', 'custom_timeseries_usage', 'lambda_functions_usage', 'lambda_functions_percentage', 'lambda_invocations_usage', 'lambda_invocations_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', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'estimated_rum_usage_attribution_usage', 'estimated_rum_usage_attribution_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/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[:'include_descendants'] = opts[:'include_descendants'] if !opts[:'include_descendants'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'UsageAttributionResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_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_usage_attribution\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.
850 851 852 853 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 850 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)>
Get hourly usage for audit logs.
Get hourly usage for audit logs. Note: 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.
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 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 864 def get_usage_audit_logs_with_http_info(start_hr, opts = {}) 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.
919 920 921 922 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 919 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.
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 963 964 965 966 967 968 969 970 971 972 973 974 975 976 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 931 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? # 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.
981 982 983 984 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 981 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)>
Get hourly usage for CI visibility.
Get hourly usage for CI visibility (tests, pipeline, and spans). Note: 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.
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 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 995 def get_usage_ci_app_with_http_info(start_hr, opts = {}) 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 CSPM.
1050 1051 1052 1053 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1050 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)>
Get hourly usage for CSPM.
Get hourly usage for cloud security posture management (CSPM). Note: 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.
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 1107 1108 1109 1110 1111 1112 1113 1114 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1064 def get_usage_cloud_security_posture_management_with_http_info(start_hr, opts = {}) 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.
1119 1120 1121 1122 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1119 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)>
Get hourly usage for cloud workload security.
Get hourly usage for cloud workload security. Note: 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.
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1133 def get_usage_cws_with_http_info(start_hr, opts = {}) 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.
1188 1189 1190 1191 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1188 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)>
Get hourly usage for database monitoring.
Get hourly usage for database monitoring Note: 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.
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 1251 1252 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1202 def get_usage_dbm_with_http_info(start_hr, opts = {}) 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.
1257 1258 1259 1260 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1257 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)>
Get hourly usage for Fargate.
Get hourly usage for [Fargate](docs.datadoghq.com/integrations/ecs_fargate/). Note: 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1271 def get_usage_fargate_with_http_info(start_hr, opts = {}) 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.
1326 1327 1328 1329 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1326 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)>
Get hourly usage for hosts and containers.
Get hourly usage for hosts and containers. Note: 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.
1340 1341 1342 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1340 def get_usage_hosts_with_http_info(start_hr, opts = {}) 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.
1395 1396 1397 1398 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1395 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)>
Get hourly usage for indexed spans.
Get hourly usage for indexed spans. Note: 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.
1409 1410 1411 1412 1413 1414 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1409 def get_usage_indexed_spans_with_http_info(start_hr, opts = {}) 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.
1464 1465 1466 1467 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1464 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)>
Get hourly usage for IoT.
Get hourly usage for IoT. Note: 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.
1478 1479 1480 1481 1482 1483 1484 1485 1486 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1478 def get_usage_internet_of_things_with_http_info(start_hr, opts = {}) 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.
1533 1534 1535 1536 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1533 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)>
Get hourly usage for lambda.
Get hourly usage for lambda. Note: 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.
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1547 def get_usage_lambda_with_http_info(start_hr, opts = {}) 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.
1602 1603 1604 1605 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1602 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.
1671 1672 1673 1674 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1671 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.
1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1685 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.
1741 1742 1743 1744 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1741 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)>
Get hourly logs usage by retention.
Get hourly usage for indexed logs by retention period. Note: 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.
1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1755 def get_usage_logs_by_retention_with_http_info(start_hr, opts = {}) 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)>
Get hourly usage for logs.
Get hourly usage for logs. Note: 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.
1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1616 def get_usage_logs_with_http_info(start_hr, opts = {}) 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.
1810 1811 1812 1813 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1810 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)>
get hourly usage for network flows.
Get hourly usage for network flows. Note: 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.
1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1824 def get_usage_network_flows_with_http_info(start_hr, opts = {}) 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.
1879 1880 1881 1882 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1879 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)>
Get hourly usage for network hosts.
Get hourly usage for network hosts. Note: 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.
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 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 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1893 def get_usage_network_hosts_with_http_info(start_hr, opts = {}) 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.
1948 1949 1950 1951 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1948 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)>
Get hourly usage for online archive.
Get hourly usage for online archive. Note: 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.
1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 1962 def get_usage_online_archive_with_http_info(start_hr, opts = {}) 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.
2017 2018 2019 2020 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2017 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)>
Get hourly usage for profiled hosts.
Get hourly usage for profiled hosts. Note: 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.
2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2031 def get_usage_profiling_with_http_info(start_hr, opts = {}) 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.
2086 2087 2088 2089 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2086 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)>
Get hourly usage for RUM sessions.
Get hourly usage for [RUM](docs.datadoghq.com/real_user_monitoring/) Sessions. Note: 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.
2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2101 def get_usage_rum_sessions_with_http_info(start_hr, opts = {}) 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.
2157 2158 2159 2160 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2157 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)>
Get hourly usage for RUM units.
Get hourly usage for [RUM](docs.datadoghq.com/real_user_monitoring/) Units. Note: 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.
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2171 def get_usage_rum_units_with_http_info(start_hr, opts = {}) 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.
2226 2227 2228 2229 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2226 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)>
Get hourly usage for sensitive data scanner.
Get hourly usage for sensitive data scanner. Note: 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.
2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2240 def get_usage_sds_with_http_info(start_hr, opts = {}) 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.
2295 2296 2297 2298 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2295 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)>
Get hourly usage for SNMP devices.
Get hourly usage for SNMP devices. Note: 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.
2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2309 def get_usage_snmp_with_http_info(start_hr, opts = {}) 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.
2364 2365 2366 2367 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2364 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.
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 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2378 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? # 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.
2434 2435 2436 2437 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2434 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.
2506 2507 2508 2509 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2506 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)>
Get hourly usage for synthetics API checks.
Get hourly usage for [synthetics API checks](docs.datadoghq.com/synthetics/). Note: 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.
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 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2520 def get_usage_synthetics_api_with_http_info(start_hr, opts = {}) 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.
2575 2576 2577 2578 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2575 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)>
Get hourly usage for synthetics browser checks.
Get hourly usage for synthetics browser checks. Note: 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.
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 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2589 def get_usage_synthetics_browser_with_http_info(start_hr, opts = {}) 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: 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.
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 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2450 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.
2644 2645 2646 2647 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2644 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)>
Get hourly usage for custom metrics.
Get hourly usage for [custom metrics](docs.datadoghq.com/developers/metrics/custom_metrics/). Note: 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.
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 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2658 def get_usage_timeseries_with_http_info(start_hr, opts = {}) 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.
2713 2714 2715 2716 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2713 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.
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 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 |
# File 'lib/datadog_api_client/v1/api/usage_metering_api.rb', line 2729 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 |