Class: NutanixVmm::EsxiStatsApi
- Inherits:
-
Object
- Object
- NutanixVmm::EsxiStatsApi
- Defined in:
- lib/nutanix_vmm/api/esxi_stats_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_disk_stats_by_id(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ GetDiskStatsById200Response
Get the stats for the specified VM disk Fetches the stats for the specified VM disk.
-
#get_disk_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetDiskStatsById200Response, Integer, Hash)>
Get the stats for the specified VM disk Fetches the stats for the specified VM disk.
-
#get_nic_stats_by_id(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ GetNicStatsById200Response
Get the stats for the specified VM NIC Fetches the stats for the specified VM NIC.
-
#get_nic_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetNicStatsById200Response, Integer, Hash)>
Get the stats for the specified VM NIC Fetches the stats for the specified VM NIC.
-
#get_vm_stats_by_id(ext_id, start_time, end_time, opts = {}) ⇒ GetVmStatsById200Response
Get VM stats for a given VM Get VM stats for a given VM.
-
#get_vm_stats_by_id_with_http_info(ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetVmStatsById200Response, Integer, Hash)>
Get VM stats for a given VM Get VM stats for a given VM.
-
#initialize(api_client = ApiClient.default) ⇒ EsxiStatsApi
constructor
A new instance of EsxiStatsApi.
-
#list_vm_stats(start_time, end_time, opts = {}) ⇒ ListVmStats200Response
List VM stats for all VMs List VM stats for all VMs.
-
#list_vm_stats_with_http_info(start_time, end_time, opts = {}) ⇒ Array<(ListVmStats200Response, Integer, Hash)>
List VM stats for all VMs List VM stats for all VMs.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EsxiStatsApi
Returns a new instance of EsxiStatsApi.
19 20 21 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_disk_stats_by_id(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ GetDiskStatsById200Response
Get the stats for the specified VM disk Fetches the stats for the specified VM disk. Users can fetch the stats by specifying the following params in the request query: 1) ‘$select’: comma-separated attributes with the prefix ‘stats/’, e.g. ‘stats/checkScore’. 2) ‘$startTime’: the start time for which stats should be reported, e.g. ‘2023-01-01T12:00:00.000-08:00’; 3) ‘$endTime’: the end time for which stats should be reported; 4) ‘$samplingInterval’: the sampling interval in seconds at which statistical data should be collected; 5) ‘$statType’: the down-sampling operator to use while performing down-sampling on stats data
33 34 35 36 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 33 def get_disk_stats_by_id(vm_ext_id, ext_id, start_time, end_time, opts = {}) data, _status_code, _headers = get_disk_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts) data end |
#get_disk_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetDiskStatsById200Response, Integer, Hash)>
Get the stats for the specified VM disk Fetches the stats for the specified VM disk. Users can fetch the stats by specifying the following params in the request query: 1) '$select': comma-separated attributes with the prefix 'stats/', e.g. 'stats/checkScore'. 2) '$startTime': the start time for which stats should be reported, e.g. '2023-01-01T12:00:00.000-08:00'; 3) '$endTime': the end time for which stats should be reported; 4) '$samplingInterval': the sampling interval in seconds at which statistical data should be collected; 5) '$statType': the down-sampling operator to use while performing down-sampling on stats data
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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 49 def get_disk_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EsxiStatsApi.get_disk_stats_by_id ...' end # verify the required parameter 'vm_ext_id' is set if @api_client.config.client_side_validation && vm_ext_id.nil? fail ArgumentError, "Missing the required parameter 'vm_ext_id' when calling EsxiStatsApi.get_disk_stats_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && vm_ext_id !~ pattern fail ArgumentError, "invalid value for 'vm_ext_id' when calling EsxiStatsApi.get_disk_stats_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling EsxiStatsApi.get_disk_stats_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling EsxiStatsApi.get_disk_stats_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'start_time' is set if @api_client.config.client_side_validation && start_time.nil? fail ArgumentError, "Missing the required parameter 'start_time' when calling EsxiStatsApi.get_disk_stats_by_id" end # verify the required parameter 'end_time' is set if @api_client.config.client_side_validation && end_time.nil? fail ArgumentError, "Missing the required parameter 'end_time' when calling EsxiStatsApi.get_disk_stats_by_id" end if @api_client.config.client_side_validation && !opts[:'sampling_interval'].nil? && opts[:'sampling_interval'] < 1 fail ArgumentError, 'invalid value for "opts[:"sampling_interval"]" when calling EsxiStatsApi.get_disk_stats_by_id, must be greater than or equal to 1.' end # resource path local_var_path = '/vmm/v4.0/esxi/stats/vms/{vmExtId}/disks/{extId}'.sub('{' + 'vmExtId' + '}', CGI.escape(vm_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'$startTime'] = start_time query_params[:'$endTime'] = end_time query_params[:'$samplingInterval'] = opts[:'sampling_interval'] if !opts[:'sampling_interval'].nil? query_params[:'$statType'] = opts[:'stat_type'] if !opts[:'stat_type'].nil? query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetDiskStatsById200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"EsxiStatsApi.get_disk_stats_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EsxiStatsApi#get_disk_stats_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_nic_stats_by_id(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ GetNicStatsById200Response
Get the stats for the specified VM NIC Fetches the stats for the specified VM NIC. Users can fetch the stats by specifying the following params in the request query: 1) ‘$select’: comma-separated attributes with the prefix ‘stats/’, e.g. ‘stats/checkScore’. 2) ‘$startTime’: the start time for which stats should be reported, e.g. ‘2023-01-01T12:00:00.000-08:00’; 3) ‘$endTime’: the end time for which stats should be reported; 4) ‘$samplingInterval’: the sampling interval in seconds at which statistical data should be collected; 5) ‘$statType’: the down-sampling operator to use while performing down-sampling on stats data
139 140 141 142 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 139 def get_nic_stats_by_id(vm_ext_id, ext_id, start_time, end_time, opts = {}) data, _status_code, _headers = get_nic_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts) data end |
#get_nic_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetNicStatsById200Response, Integer, Hash)>
Get the stats for the specified VM NIC Fetches the stats for the specified VM NIC. Users can fetch the stats by specifying the following params in the request query: 1) '$select': comma-separated attributes with the prefix 'stats/', e.g. 'stats/checkScore'. 2) '$startTime': the start time for which stats should be reported, e.g. '2023-01-01T12:00:00.000-08:00'; 3) '$endTime': the end time for which stats should be reported; 4) '$samplingInterval': the sampling interval in seconds at which statistical data should be collected; 5) '$statType': the down-sampling operator to use while performing down-sampling on stats data
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 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 155 def get_nic_stats_by_id_with_http_info(vm_ext_id, ext_id, start_time, end_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EsxiStatsApi.get_nic_stats_by_id ...' end # verify the required parameter 'vm_ext_id' is set if @api_client.config.client_side_validation && vm_ext_id.nil? fail ArgumentError, "Missing the required parameter 'vm_ext_id' when calling EsxiStatsApi.get_nic_stats_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && vm_ext_id !~ pattern fail ArgumentError, "invalid value for 'vm_ext_id' when calling EsxiStatsApi.get_nic_stats_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling EsxiStatsApi.get_nic_stats_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling EsxiStatsApi.get_nic_stats_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'start_time' is set if @api_client.config.client_side_validation && start_time.nil? fail ArgumentError, "Missing the required parameter 'start_time' when calling EsxiStatsApi.get_nic_stats_by_id" end # verify the required parameter 'end_time' is set if @api_client.config.client_side_validation && end_time.nil? fail ArgumentError, "Missing the required parameter 'end_time' when calling EsxiStatsApi.get_nic_stats_by_id" end if @api_client.config.client_side_validation && !opts[:'sampling_interval'].nil? && opts[:'sampling_interval'] < 1 fail ArgumentError, 'invalid value for "opts[:"sampling_interval"]" when calling EsxiStatsApi.get_nic_stats_by_id, must be greater than or equal to 1.' end # resource path local_var_path = '/vmm/v4.0/esxi/stats/vms/{vmExtId}/nics/{extId}'.sub('{' + 'vmExtId' + '}', CGI.escape(vm_ext_id.to_s)).sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'$startTime'] = start_time query_params[:'$endTime'] = end_time query_params[:'$samplingInterval'] = opts[:'sampling_interval'] if !opts[:'sampling_interval'].nil? query_params[:'$statType'] = opts[:'stat_type'] if !opts[:'stat_type'].nil? query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetNicStatsById200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"EsxiStatsApi.get_nic_stats_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EsxiStatsApi#get_nic_stats_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_vm_stats_by_id(ext_id, start_time, end_time, opts = {}) ⇒ GetVmStatsById200Response
Get VM stats for a given VM Get VM stats for a given VM. Users can fetch the stats by specifying the following params in the request query: 1) ‘$select’: comma-separated attributes with the prefix ‘stats/’, e.g. ‘stats/checkScore’. 2) ‘$startTime’: the start time for which stats should be reported, e.g. ‘2023-01-01T12:00:00.000-08:00’; 3) ‘$endTime’: the end time for which stats should be reported; 4) ‘$samplingInterval’: the sampling interval in seconds at which statistical data should be collected; 5) ‘$statType’: the down-sampling operator to use while performing down-sampling on stats data
244 245 246 247 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 244 def get_vm_stats_by_id(ext_id, start_time, end_time, opts = {}) data, _status_code, _headers = get_vm_stats_by_id_with_http_info(ext_id, start_time, end_time, opts) data end |
#get_vm_stats_by_id_with_http_info(ext_id, start_time, end_time, opts = {}) ⇒ Array<(GetVmStatsById200Response, Integer, Hash)>
Get VM stats for a given VM Get VM stats for a given VM. Users can fetch the stats by specifying the following params in the request query: 1) '$select': comma-separated attributes with the prefix 'stats/', e.g. 'stats/checkScore'. 2) '$startTime': the start time for which stats should be reported, e.g. '2023-01-01T12:00:00.000-08:00'; 3) '$endTime': the end time for which stats should be reported; 4) '$samplingInterval': the sampling interval in seconds at which statistical data should be collected; 5) '$statType': the down-sampling operator to use while performing down-sampling on stats data
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 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 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 259 def get_vm_stats_by_id_with_http_info(ext_id, start_time, end_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EsxiStatsApi.get_vm_stats_by_id ...' end # verify the required parameter 'ext_id' is set if @api_client.config.client_side_validation && ext_id.nil? fail ArgumentError, "Missing the required parameter 'ext_id' when calling EsxiStatsApi.get_vm_stats_by_id" end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if @api_client.config.client_side_validation && ext_id !~ pattern fail ArgumentError, "invalid value for 'ext_id' when calling EsxiStatsApi.get_vm_stats_by_id, must conform to the pattern #{pattern}." end # verify the required parameter 'start_time' is set if @api_client.config.client_side_validation && start_time.nil? fail ArgumentError, "Missing the required parameter 'start_time' when calling EsxiStatsApi.get_vm_stats_by_id" end # verify the required parameter 'end_time' is set if @api_client.config.client_side_validation && end_time.nil? fail ArgumentError, "Missing the required parameter 'end_time' when calling EsxiStatsApi.get_vm_stats_by_id" end if @api_client.config.client_side_validation && !opts[:'sampling_interval'].nil? && opts[:'sampling_interval'] < 1 fail ArgumentError, 'invalid value for "opts[:"sampling_interval"]" when calling EsxiStatsApi.get_vm_stats_by_id, must be greater than or equal to 1.' end # resource path local_var_path = '/vmm/v4.0/esxi/stats/vms/{extId}'.sub('{' + 'extId' + '}', CGI.escape(ext_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'$startTime'] = start_time query_params[:'$endTime'] = end_time query_params[:'$samplingInterval'] = opts[:'sampling_interval'] if !opts[:'sampling_interval'].nil? query_params[:'$statType'] = opts[:'stat_type'] if !opts[:'stat_type'].nil? query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetVmStatsById200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"EsxiStatsApi.get_vm_stats_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EsxiStatsApi#get_vm_stats_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_vm_stats(start_time, end_time, opts = {}) ⇒ ListVmStats200Response
List VM stats for all VMs List VM stats for all VMs. Users can fetch the stats by specifying the following params in the request query: 1) ‘$select’: comma-separated attributes with the prefix ‘stats/’, e.g. ‘stats/controllerNumIo,stats/hypervisorNumIo’. 2) ‘$startTime’: the start time for which stats should be reported, e.g. ‘2023-01-01T12:00:00.000-08:00’; 3) ‘$endTime’: the end time for which stats should be reported; 4) ‘$samplingInterval’: the sampling interval in seconds at which statistical data should be collected; 5) ‘$statType’: the down-sampling operator to use while performing down-sampling on stats data; 6) ‘$orderby’; 7) ‘$page’; 8) ‘$limit’; and 9) ‘$filter’: the OData filter to use, e.g. ‘stats/hypervisorCpuUsagePpm gt 100000 and stats/guestMemoryUsagePpm lt 2000000.’
342 343 344 345 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 342 def list_vm_stats(start_time, end_time, opts = {}) data, _status_code, _headers = list_vm_stats_with_http_info(start_time, end_time, opts) data end |
#list_vm_stats_with_http_info(start_time, end_time, opts = {}) ⇒ Array<(ListVmStats200Response, Integer, Hash)>
List VM stats for all VMs List VM stats for all VMs. Users can fetch the stats by specifying the following params in the request query: 1) '$select': comma-separated attributes with the prefix 'stats/', e.g. 'stats/controllerNumIo,stats/hypervisorNumIo'. 2) '$startTime': the start time for which stats should be reported, e.g. '2023-01-01T12:00:00.000-08:00'; 3) '$endTime': the end time for which stats should be reported; 4) '$samplingInterval': the sampling interval in seconds at which statistical data should be collected; 5) '$statType': the down-sampling operator to use while performing down-sampling on stats data; 6) '$orderby'; 7) '$page'; 8) '$limit'; and 9) '$filter': the OData filter to use, e.g. 'stats/hypervisorCpuUsagePpm gt 100000 and stats/guestMemoryUsagePpm lt 2000000.'
360 361 362 363 364 365 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 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/nutanix_vmm/api/esxi_stats_api.rb', line 360 def list_vm_stats_with_http_info(start_time, end_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EsxiStatsApi.list_vm_stats ...' end # verify the required parameter 'start_time' is set if @api_client.config.client_side_validation && start_time.nil? fail ArgumentError, "Missing the required parameter 'start_time' when calling EsxiStatsApi.list_vm_stats" end # verify the required parameter 'end_time' is set if @api_client.config.client_side_validation && end_time.nil? fail ArgumentError, "Missing the required parameter 'end_time' when calling EsxiStatsApi.list_vm_stats" end if @api_client.config.client_side_validation && !opts[:'sampling_interval'].nil? && opts[:'sampling_interval'] < 1 fail ArgumentError, 'invalid value for "opts[:"sampling_interval"]" when calling EsxiStatsApi.list_vm_stats, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling EsxiStatsApi.list_vm_stats, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EsxiStatsApi.list_vm_stats, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EsxiStatsApi.list_vm_stats, must be greater than or equal to 1.' end # resource path local_var_path = '/vmm/v4.0/esxi/stats/vms' # query parameters query_params = opts[:query_params] || {} query_params[:'$startTime'] = start_time query_params[:'$endTime'] = end_time query_params[:'$samplingInterval'] = opts[:'sampling_interval'] if !opts[:'sampling_interval'].nil? query_params[:'$statType'] = opts[:'stat_type'] if !opts[:'stat_type'].nil? query_params[:'$page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'$limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListVmStats200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuthScheme', 'basicAuthScheme'] = opts.merge( :operation => :"EsxiStatsApi.list_vm_stats", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EsxiStatsApi#list_vm_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |