Class: Azure::CostManagement::Mgmt::V2019_03_01_preview::Dimensions
- Inherits:
-
Object
- Object
- Azure::CostManagement::Mgmt::V2019_03_01_preview::Dimensions
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb
Overview
Dimensions
Instance Attribute Summary collapse
-
#client ⇒ CostManagementClient
readonly
Reference to the CostManagementClient.
Instance Method Summary collapse
-
#initialize(client) ⇒ Dimensions
constructor
Creates and initializes a new instance of the Dimensions class.
-
#list_by_billing_account(billing_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by billingAccount Id.
-
#list_by_billing_account_async(billing_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by billingAccount Id.
-
#list_by_billing_account_with_http_info(billing_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by billingAccount Id.
-
#list_by_department(billing_account_id, department_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by Department Id.
-
#list_by_department_async(billing_account_id, department_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by Department Id.
-
#list_by_department_with_http_info(billing_account_id, department_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by Department Id.
-
#list_by_enrollment_account(billing_account_id, enrollment_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by Enrollment Account Id.
-
#list_by_enrollment_account_async(billing_account_id, enrollment_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by Enrollment Account Id.
-
#list_by_enrollment_account_with_http_info(billing_account_id, enrollment_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by Enrollment Account Id.
-
#list_by_management_group(management_group_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by managementGroup Id.
-
#list_by_management_group_async(management_group_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by managementGroup Id.
-
#list_by_management_group_with_http_info(management_group_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by managementGroup Id.
-
#list_by_resource_group(resource_group_name, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by resource group Id.
-
#list_by_resource_group_async(resource_group_name, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by resource group Id.
-
#list_by_resource_group_with_http_info(resource_group_name, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by resource group Id.
-
#list_by_subscription(filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by subscription Id.
-
#list_by_subscription_async(filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by subscription Id.
-
#list_by_subscription_with_http_info(filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by subscription Id.
Constructor Details
#initialize(client) ⇒ Dimensions
Creates and initializes a new instance of the Dimensions class.
17 18 19 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ CostManagementClient (readonly)
Returns reference to the CostManagementClient.
22 23 24 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 22 def client @client end |
Instance Method Details
#list_by_billing_account(billing_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by billingAccount Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
44 45 46 47 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 44 def list_by_billing_account(billing_account_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) response = list_by_billing_account_async(billing_account_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_billing_account_async(billing_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by billingAccount Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. to the HTTP request.
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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 93 def list_by_billing_account_async(billing_account_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000 fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'billingAccountId' => billing_account_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => ,'$skiptoken' => skiptoken,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CostManagement::Mgmt::V2019_03_01_preview::Models::DimensionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_billing_account_with_http_info(billing_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by billingAccount Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
69 70 71 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 69 def list_by_billing_account_with_http_info(billing_account_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) list_by_billing_account_async(billing_account_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! end |
#list_by_department(billing_account_id, department_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by Department Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
297 298 299 300 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 297 def list_by_department(billing_account_id, department_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) response = list_by_department_async(billing_account_id, department_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_department_async(billing_account_id, department_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by Department Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. to the HTTP request.
348 349 350 351 352 353 354 355 356 357 358 359 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 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 348 def list_by_department_async(billing_account_id, department_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil? fail ArgumentError, 'department_id is nil' if department_id.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000 fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/dimensions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'billingAccountId' => billing_account_id,'departmentId' => department_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => ,'$skiptoken' => skiptoken,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CostManagement::Mgmt::V2019_03_01_preview::Models::DimensionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_department_with_http_info(billing_account_id, department_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by Department Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
323 324 325 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 323 def list_by_department_with_http_info(billing_account_id, department_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) list_by_department_async(billing_account_id, department_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! end |
#list_by_enrollment_account(billing_account_id, enrollment_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by Enrollment Account Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
169 170 171 172 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 169 def list_by_enrollment_account(billing_account_id, enrollment_account_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) response = list_by_enrollment_account_async(billing_account_id, enrollment_account_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_enrollment_account_async(billing_account_id, enrollment_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by Enrollment Account Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. to the HTTP request.
220 221 222 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 274 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 220 def list_by_enrollment_account_async(billing_account_id, enrollment_account_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil? fail ArgumentError, 'enrollment_account_id is nil' if enrollment_account_id.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000 fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/dimensions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'billingAccountId' => billing_account_id,'enrollmentAccountId' => enrollment_account_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => ,'$skiptoken' => skiptoken,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CostManagement::Mgmt::V2019_03_01_preview::Models::DimensionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_enrollment_account_with_http_info(billing_account_id, enrollment_account_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by Enrollment Account Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
195 196 197 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 195 def list_by_enrollment_account_with_http_info(billing_account_id, enrollment_account_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) list_by_enrollment_account_async(billing_account_id, enrollment_account_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! end |
#list_by_management_group(management_group_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by managementGroup Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
424 425 426 427 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 424 def list_by_management_group(management_group_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) response = list_by_management_group_async(management_group_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_management_group_async(management_group_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by managementGroup Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. to the HTTP request.
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 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 473 def list_by_management_group_async(management_group_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, 'management_group_id is nil' if management_group_id.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000 fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/dimensions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'managementGroupId' => management_group_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => ,'$skiptoken' => skiptoken,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CostManagement::Mgmt::V2019_03_01_preview::Models::DimensionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_management_group_with_http_info(management_group_id, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by managementGroup Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
449 450 451 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 449 def list_by_management_group_with_http_info(management_group_id, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) list_by_management_group_async(management_group_id, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! end |
#list_by_resource_group(resource_group_name, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by resource group Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
669 670 671 672 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 669 def list_by_resource_group(resource_group_name, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_async(resource_group_name, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by resource group Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. to the HTTP request.
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 718 def list_by_resource_group_async(resource_group_name, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000 fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/dimensions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => ,'$skiptoken' => skiptoken,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CostManagement::Mgmt::V2019_03_01_preview::Models::DimensionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_with_http_info(resource_group_name, filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by resource group Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
694 695 696 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 694 def list_by_resource_group_with_http_info(resource_group_name, filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! end |
#list_by_subscription(filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ DimensionsListResult
Lists the dimensions by subscription Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
547 548 549 550 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 547 def list_by_subscription(filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) response = list_by_subscription_async(filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_subscription_async(filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists the dimensions by subscription Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. to the HTTP request.
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 594 def list_by_subscription_async(filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000 fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/dimensions' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => ,'$skiptoken' => skiptoken,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::CostManagement::Mgmt::V2019_03_01_preview::Models::DimensionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_subscription_with_http_info(filter: nil, expand: nil, skiptoken: nil, top: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the dimensions by subscription Id.
properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'. dimension category. By default, data is not included when listing dimensions. returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. recent N dimension data. will be added to the HTTP request.
571 572 573 |
# File 'lib/2019-03-01-preview/generated/azure_mgmt_cost_management/dimensions.rb', line 571 def list_by_subscription_with_http_info(filter:nil, expand:nil, skiptoken:nil, top:nil, custom_headers:nil) list_by_subscription_async(filter:filter, expand:, skiptoken:skiptoken, top:top, custom_headers:custom_headers).value! end |