azure_mgmt_consumption 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  3. data/lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  4. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  5. data/lib/2018-01-31/generated/azure_mgmt_consumption/consumption_management_client.rb +7 -6
  6. data/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb +28 -12
  7. data/lib/2018-03-31/generated/azure_mgmt_consumption.rb +84 -0
  8. data/lib/2018-03-31/generated/azure_mgmt_consumption/budgets.rb +993 -0
  9. data/lib/2018-03-31/generated/azure_mgmt_consumption/consumption_management_client.rb +289 -0
  10. data/lib/2018-03-31/generated/azure_mgmt_consumption/cost_tags_operations.rb +233 -0
  11. data/lib/2018-03-31/generated/azure_mgmt_consumption/get_balances_by_billing_account.rb +120 -0
  12. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces.rb +528 -0
  13. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_billing_account.rb +536 -0
  14. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_department.rb +536 -0
  15. data/lib/2018-03-31/generated/azure_mgmt_consumption/marketplaces_by_enrollment_accounts.rb +536 -0
  16. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  17. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  18. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  19. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  20. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  21. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  22. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  23. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  24. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/cost_tag.rb +46 -0
  25. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/cost_tags.rb +90 -0
  26. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  27. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  28. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  29. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  30. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  31. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  32. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  33. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  34. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  35. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  36. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  37. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  38. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  39. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +134 -0
  40. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  41. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  42. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  43. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  44. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  45. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_recommendations.rb +224 -0
  46. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  47. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  48. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +101 -0
  49. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  50. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  51. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  52. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/tags.rb +90 -0
  53. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  54. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/usage_detail.rb +355 -0
  55. data/lib/2018-03-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  56. data/lib/2018-03-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  57. data/lib/2018-03-31/generated/azure_mgmt_consumption/operations.rb +216 -0
  58. data/lib/2018-03-31/generated/azure_mgmt_consumption/price_sheet.rb +262 -0
  59. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservation_recommendations_operations.rb +226 -0
  60. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservations_details.rb +449 -0
  61. data/lib/2018-03-31/generated/azure_mgmt_consumption/reservations_summaries.rb +465 -0
  62. data/lib/2018-03-31/generated/azure_mgmt_consumption/tags_operations.rb +113 -0
  63. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details.rb +577 -0
  64. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_billing_account.rb +599 -0
  65. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_department.rb +592 -0
  66. data/lib/2018-03-31/generated/azure_mgmt_consumption/usage_details_by_enrollment_account.rb +599 -0
  67. data/lib/2018-05-31/generated/azure_mgmt_consumption.rb +49 -0
  68. data/lib/2018-05-31/generated/azure_mgmt_consumption/consumption_management_client.rb +144 -0
  69. data/lib/2018-05-31/generated/azure_mgmt_consumption/forecasts.rb +122 -0
  70. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  71. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  72. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  73. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  74. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  75. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  76. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  77. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  78. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  79. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  80. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  81. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  82. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  83. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  84. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  85. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  86. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/usage_detail.rb +403 -0
  87. data/lib/2018-05-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  88. data/lib/2018-05-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  89. data/lib/2018-05-31/generated/azure_mgmt_consumption/operations.rb +216 -0
  90. data/lib/2018-05-31/generated/azure_mgmt_consumption/price_sheet.rb +262 -0
  91. data/lib/2018-05-31/generated/azure_mgmt_consumption/usage_details.rb +2289 -0
  92. data/lib/2018-06-30/generated/azure_mgmt_consumption.rb +85 -0
  93. data/lib/2018-06-30/generated/azure_mgmt_consumption/balances.rb +210 -0
  94. data/lib/2018-06-30/generated/azure_mgmt_consumption/budgets.rb +993 -0
  95. data/lib/2018-06-30/generated/azure_mgmt_consumption/consumption_management_client.rb +176 -0
  96. data/lib/2018-06-30/generated/azure_mgmt_consumption/cost_tags.rb +233 -0
  97. data/lib/2018-06-30/generated/azure_mgmt_consumption/forecasts.rb +122 -0
  98. data/lib/2018-06-30/generated/azure_mgmt_consumption/marketplaces.rb +2058 -0
  99. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance.rb +281 -0
  100. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance_properties_adjustment_details_item.rb +60 -0
  101. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/balance_properties_new_purchases_details_item.rb +60 -0
  102. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/billing_frequency.rb +17 -0
  103. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/bound.rb +16 -0
  104. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  105. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  106. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  107. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  108. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/charge_type.rb +16 -0
  109. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/cost_tag.rb +90 -0
  110. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/cost_tag_properties.rb +46 -0
  111. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  112. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  113. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  114. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  115. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/filters.rb +134 -0
  116. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecast.rb +163 -0
  117. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecast_properties_confidence_levels_item.rb +72 -0
  118. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/forecasts_list_result.rb +56 -0
  119. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/grain.rb +17 -0
  120. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  121. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  122. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/meter_details.rb +146 -0
  123. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  124. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  125. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  126. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  127. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  128. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +146 -0
  129. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  130. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  131. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/query_options.rb +45 -0
  132. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_detail.rb +187 -0
  133. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  134. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_recommendation.rb +224 -0
  135. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_recommendations_list_result.rb +101 -0
  136. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +100 -0
  137. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/reservation_summary.rb +205 -0
  138. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  139. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/resource_attributes.rb +59 -0
  140. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/tag.rb +46 -0
  141. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/tags_result.rb +90 -0
  142. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  143. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/usage_detail.rb +415 -0
  144. data/lib/2018-06-30/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  145. data/lib/2018-06-30/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  146. data/lib/2018-06-30/generated/azure_mgmt_consumption/operations.rb +216 -0
  147. data/lib/2018-06-30/generated/azure_mgmt_consumption/price_sheet.rb +262 -0
  148. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservation_recommendations.rb +226 -0
  149. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservations_details.rb +449 -0
  150. data/lib/2018-06-30/generated/azure_mgmt_consumption/reservations_summaries.rb +465 -0
  151. data/lib/2018-06-30/generated/azure_mgmt_consumption/tags.rb +113 -0
  152. data/lib/2018-06-30/generated/azure_mgmt_consumption/usage_details.rb +2289 -0
  153. data/lib/azure_mgmt_consumption.rb +4 -1
  154. data/lib/profiles/latest/modules/consumption_profile_module.rb +160 -78
  155. data/lib/version.rb +1 -1
  156. metadata +150 -4
@@ -0,0 +1,113 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Consumption::Mgmt::V2018_03_31
7
+ #
8
+ # Consumption management client provides access to consumption resources for
9
+ # Azure Enterprise Subscriptions.
10
+ #
11
+ class TagsOperations
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the TagsOperations class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [ConsumptionManagementClient] reference to the ConsumptionManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Get all available tag keys for a billing account.
27
+ #
28
+ # @param billing_account_id [String] BillingAccount ID
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Tags] operation results.
33
+ #
34
+ def get(billing_account_id, custom_headers:nil)
35
+ response = get_async(billing_account_id, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Get all available tag keys for a billing account.
41
+ #
42
+ # @param billing_account_id [String] BillingAccount ID
43
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
44
+ # will be added to the HTTP request.
45
+ #
46
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
+ #
48
+ def get_with_http_info(billing_account_id, custom_headers:nil)
49
+ get_async(billing_account_id, custom_headers:custom_headers).value!
50
+ end
51
+
52
+ #
53
+ # Get all available tag keys for a billing account.
54
+ #
55
+ # @param billing_account_id [String] BillingAccount ID
56
+ # @param [Hash{String => String}] A hash of custom headers that will be added
57
+ # to the HTTP request.
58
+ #
59
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
60
+ #
61
+ def get_async(billing_account_id, custom_headers:nil)
62
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
63
+ fail ArgumentError, 'billing_account_id is nil' if billing_account_id.nil?
64
+
65
+
66
+ request_headers = {}
67
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
68
+
69
+ # Set Headers
70
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
+ path_template = 'providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags'
73
+
74
+ request_url = @base_url || @client.base_url
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ path_params: {'billingAccountId' => billing_account_id},
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::Consumption::Mgmt::V2018_03_31::Models::Tags.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ end
113
+ end
@@ -0,0 +1,577 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Consumption::Mgmt::V2018_03_31
7
+ #
8
+ # Consumption management client provides access to consumption resources for
9
+ # Azure Enterprise Subscriptions.
10
+ #
11
+ class UsageDetails
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the UsageDetails class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [ConsumptionManagementClient] reference to the ConsumptionManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Lists the usage details for a scope by current billing period. Usage details
27
+ # are available via this API only for May 1, 2014 or later.
28
+ #
29
+ # @param expand [String] May be used to expand the
30
+ # properties/additionalProperties or properties/meterDetails within a list of
31
+ # usage details. By default, these fields are not included when listing usage
32
+ # details.
33
+ # @param filter [String] May be used to filter usageDetails by
34
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
35
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
36
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
37
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
38
+ # string where key and value is separated by a colon (:).
39
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
40
+ # returned a partial result. If a previous response contains a nextLink
41
+ # element, the value of the nextLink element will include a skiptoken parameter
42
+ # that specifies a starting point to use for subsequent calls.
43
+ # @param top [Integer] May be used to limit the number of results to the most
44
+ # recent N usageDetails.
45
+ # @param query_options [QueryOptions] Additional parameters for the operation
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [Array<UsageDetail>] operation results.
50
+ #
51
+ def list(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
52
+ first_page = list_as_lazy(expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
53
+ first_page.get_all_items
54
+ end
55
+
56
+ #
57
+ # Lists the usage details for a scope by current billing period. Usage details
58
+ # are available via this API only for May 1, 2014 or later.
59
+ #
60
+ # @param expand [String] May be used to expand the
61
+ # properties/additionalProperties or properties/meterDetails within a list of
62
+ # usage details. By default, these fields are not included when listing usage
63
+ # details.
64
+ # @param filter [String] May be used to filter usageDetails by
65
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
66
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
67
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
68
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
69
+ # string where key and value is separated by a colon (:).
70
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
71
+ # returned a partial result. If a previous response contains a nextLink
72
+ # element, the value of the nextLink element will include a skiptoken parameter
73
+ # that specifies a starting point to use for subsequent calls.
74
+ # @param top [Integer] May be used to limit the number of results to the most
75
+ # recent N usageDetails.
76
+ # @param query_options [QueryOptions] Additional parameters for the operation
77
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
78
+ # will be added to the HTTP request.
79
+ #
80
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
81
+ #
82
+ def list_with_http_info(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
83
+ list_async(expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
84
+ end
85
+
86
+ #
87
+ # Lists the usage details for a scope by current billing period. Usage details
88
+ # are available via this API only for May 1, 2014 or later.
89
+ #
90
+ # @param expand [String] May be used to expand the
91
+ # properties/additionalProperties or properties/meterDetails within a list of
92
+ # usage details. By default, these fields are not included when listing usage
93
+ # details.
94
+ # @param filter [String] May be used to filter usageDetails by
95
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
96
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
97
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
98
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
99
+ # string where key and value is separated by a colon (:).
100
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
101
+ # returned a partial result. If a previous response contains a nextLink
102
+ # element, the value of the nextLink element will include a skiptoken parameter
103
+ # that specifies a starting point to use for subsequent calls.
104
+ # @param top [Integer] May be used to limit the number of results to the most
105
+ # recent N usageDetails.
106
+ # @param query_options [QueryOptions] Additional parameters for the operation
107
+ # @param [Hash{String => String}] A hash of custom headers that will be added
108
+ # to the HTTP request.
109
+ #
110
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
111
+ #
112
+ def list_async(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
113
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
114
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
115
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
116
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
117
+
118
+ apply = nil
119
+ unless query_options.nil?
120
+ apply = query_options.Apply
121
+ end
122
+
123
+ request_headers = {}
124
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
125
+
126
+ # Set Headers
127
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
128
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
129
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails'
130
+
131
+ request_url = @base_url || @client.base_url
132
+
133
+ options = {
134
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
135
+ path_params: {'subscriptionId' => @client.subscription_id},
136
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
137
+ headers: request_headers.merge(custom_headers || {}),
138
+ base_url: request_url
139
+ }
140
+ promise = @client.make_request_async(:get, path_template, options)
141
+
142
+ promise = promise.then do |result|
143
+ http_response = result.response
144
+ status_code = http_response.status
145
+ response_content = http_response.body
146
+ unless status_code == 200
147
+ error_model = JSON.load(response_content)
148
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
149
+ end
150
+
151
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
152
+ # Deserialize Response
153
+ if status_code == 200
154
+ begin
155
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
156
+ result_mapper = Azure::Consumption::Mgmt::V2018_03_31::Models::UsageDetailsListResult.mapper()
157
+ result.body = @client.deserialize(result_mapper, parsed_response)
158
+ rescue Exception => e
159
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
160
+ end
161
+ end
162
+
163
+ result
164
+ end
165
+
166
+ promise.execute
167
+ end
168
+
169
+ #
170
+ # Lists the usage details for a scope by billing period. Usage details are
171
+ # available via this API only for May 1, 2014 or later.
172
+ #
173
+ # @param billing_period_name [String] Billing Period Name.
174
+ # @param expand [String] May be used to expand the
175
+ # properties/additionalProperties or properties/meterDetails within a list of
176
+ # usage details. By default, these fields are not included when listing usage
177
+ # details.
178
+ # @param filter [String] May be used to filter usageDetails by
179
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
180
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
181
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
182
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
183
+ # where key and value is separated by a colon (:).
184
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
185
+ # returned a partial result. If a previous response contains a nextLink
186
+ # element, the value of the nextLink element will include a skiptoken parameter
187
+ # that specifies a starting point to use for subsequent calls.
188
+ # @param top [Integer] May be used to limit the number of results to the most
189
+ # recent N usageDetails.
190
+ # @param query_options [QueryOptions] Additional parameters for the operation
191
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
192
+ # will be added to the HTTP request.
193
+ #
194
+ # @return [Array<UsageDetail>] operation results.
195
+ #
196
+ def list_by_billing_period(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
197
+ first_page = list_by_billing_period_as_lazy(billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers)
198
+ first_page.get_all_items
199
+ end
200
+
201
+ #
202
+ # Lists the usage details for a scope by billing period. Usage details are
203
+ # available via this API only for May 1, 2014 or later.
204
+ #
205
+ # @param billing_period_name [String] Billing Period Name.
206
+ # @param expand [String] May be used to expand the
207
+ # properties/additionalProperties or properties/meterDetails within a list of
208
+ # usage details. By default, these fields are not included when listing usage
209
+ # details.
210
+ # @param filter [String] May be used to filter usageDetails by
211
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
212
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
213
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
214
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
215
+ # where key and value is separated by a colon (:).
216
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
217
+ # returned a partial result. If a previous response contains a nextLink
218
+ # element, the value of the nextLink element will include a skiptoken parameter
219
+ # that specifies a starting point to use for subsequent calls.
220
+ # @param top [Integer] May be used to limit the number of results to the most
221
+ # recent N usageDetails.
222
+ # @param query_options [QueryOptions] Additional parameters for the operation
223
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
224
+ # will be added to the HTTP request.
225
+ #
226
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
227
+ #
228
+ def list_by_billing_period_with_http_info(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
229
+ list_by_billing_period_async(billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
230
+ end
231
+
232
+ #
233
+ # Lists the usage details for a scope by billing period. Usage details are
234
+ # available via this API only for May 1, 2014 or later.
235
+ #
236
+ # @param billing_period_name [String] Billing Period Name.
237
+ # @param expand [String] May be used to expand the
238
+ # properties/additionalProperties or properties/meterDetails within a list of
239
+ # usage details. By default, these fields are not included when listing usage
240
+ # details.
241
+ # @param filter [String] May be used to filter usageDetails by
242
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
243
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
244
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
245
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
246
+ # where key and value is separated by a colon (:).
247
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
248
+ # returned a partial result. If a previous response contains a nextLink
249
+ # element, the value of the nextLink element will include a skiptoken parameter
250
+ # that specifies a starting point to use for subsequent calls.
251
+ # @param top [Integer] May be used to limit the number of results to the most
252
+ # recent N usageDetails.
253
+ # @param query_options [QueryOptions] Additional parameters for the operation
254
+ # @param [Hash{String => String}] A hash of custom headers that will be added
255
+ # to the HTTP request.
256
+ #
257
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
258
+ #
259
+ def list_by_billing_period_async(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
260
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
261
+ fail ArgumentError, 'billing_period_name is nil' if billing_period_name.nil?
262
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMaximum': '1000'" if !top.nil? && top > 1000
263
+ fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1
264
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
265
+
266
+ apply = nil
267
+ unless query_options.nil?
268
+ apply = query_options.Apply
269
+ end
270
+
271
+ request_headers = {}
272
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
273
+
274
+ # Set Headers
275
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
276
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
277
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails'
278
+
279
+ request_url = @base_url || @client.base_url
280
+
281
+ options = {
282
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
283
+ path_params: {'subscriptionId' => @client.subscription_id,'billingPeriodName' => billing_period_name},
284
+ query_params: {'$expand' => expand,'$filter' => filter,'$skiptoken' => skiptoken,'$top' => top,'api-version' => @client.api_version,'$apply' => apply},
285
+ headers: request_headers.merge(custom_headers || {}),
286
+ base_url: request_url
287
+ }
288
+ promise = @client.make_request_async(:get, path_template, options)
289
+
290
+ promise = promise.then do |result|
291
+ http_response = result.response
292
+ status_code = http_response.status
293
+ response_content = http_response.body
294
+ unless status_code == 200
295
+ error_model = JSON.load(response_content)
296
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
297
+ end
298
+
299
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
300
+ # Deserialize Response
301
+ if status_code == 200
302
+ begin
303
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
304
+ result_mapper = Azure::Consumption::Mgmt::V2018_03_31::Models::UsageDetailsListResult.mapper()
305
+ result.body = @client.deserialize(result_mapper, parsed_response)
306
+ rescue Exception => e
307
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
308
+ end
309
+ end
310
+
311
+ result
312
+ end
313
+
314
+ promise.execute
315
+ end
316
+
317
+ #
318
+ # Lists the usage details for a scope by current billing period. Usage details
319
+ # are available via this API only for May 1, 2014 or later.
320
+ #
321
+ # @param next_page_link [String] The NextLink from the previous successful call
322
+ # to List operation.
323
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
324
+ # will be added to the HTTP request.
325
+ #
326
+ # @return [UsageDetailsListResult] operation results.
327
+ #
328
+ def list_next(next_page_link, custom_headers:nil)
329
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
330
+ response.body unless response.nil?
331
+ end
332
+
333
+ #
334
+ # Lists the usage details for a scope by current billing period. Usage details
335
+ # are available via this API only for May 1, 2014 or later.
336
+ #
337
+ # @param next_page_link [String] The NextLink from the previous successful call
338
+ # to List operation.
339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
340
+ # will be added to the HTTP request.
341
+ #
342
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
343
+ #
344
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
345
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
346
+ end
347
+
348
+ #
349
+ # Lists the usage details for a scope by current billing period. Usage details
350
+ # are available via this API only for May 1, 2014 or later.
351
+ #
352
+ # @param next_page_link [String] The NextLink from the previous successful call
353
+ # to List operation.
354
+ # @param [Hash{String => String}] A hash of custom headers that will be added
355
+ # to the HTTP request.
356
+ #
357
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
358
+ #
359
+ def list_next_async(next_page_link, custom_headers:nil)
360
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
361
+
362
+
363
+ request_headers = {}
364
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
365
+
366
+ # Set Headers
367
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
368
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
369
+ path_template = '{nextLink}'
370
+
371
+ request_url = @base_url || @client.base_url
372
+
373
+ options = {
374
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
375
+ skip_encoding_path_params: {'nextLink' => next_page_link},
376
+ headers: request_headers.merge(custom_headers || {}),
377
+ base_url: request_url
378
+ }
379
+ promise = @client.make_request_async(:get, path_template, options)
380
+
381
+ promise = promise.then do |result|
382
+ http_response = result.response
383
+ status_code = http_response.status
384
+ response_content = http_response.body
385
+ unless status_code == 200
386
+ error_model = JSON.load(response_content)
387
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
388
+ end
389
+
390
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
391
+ # Deserialize Response
392
+ if status_code == 200
393
+ begin
394
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
395
+ result_mapper = Azure::Consumption::Mgmt::V2018_03_31::Models::UsageDetailsListResult.mapper()
396
+ result.body = @client.deserialize(result_mapper, parsed_response)
397
+ rescue Exception => e
398
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
399
+ end
400
+ end
401
+
402
+ result
403
+ end
404
+
405
+ promise.execute
406
+ end
407
+
408
+ #
409
+ # Lists the usage details for a scope by billing period. Usage details are
410
+ # available via this API only for May 1, 2014 or later.
411
+ #
412
+ # @param next_page_link [String] The NextLink from the previous successful call
413
+ # to List operation.
414
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
415
+ # will be added to the HTTP request.
416
+ #
417
+ # @return [UsageDetailsListResult] operation results.
418
+ #
419
+ def list_by_billing_period_next(next_page_link, custom_headers:nil)
420
+ response = list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
421
+ response.body unless response.nil?
422
+ end
423
+
424
+ #
425
+ # Lists the usage details for a scope by billing period. Usage details are
426
+ # available via this API only for May 1, 2014 or later.
427
+ #
428
+ # @param next_page_link [String] The NextLink from the previous successful call
429
+ # to List operation.
430
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
431
+ # will be added to the HTTP request.
432
+ #
433
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
434
+ #
435
+ def list_by_billing_period_next_with_http_info(next_page_link, custom_headers:nil)
436
+ list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers).value!
437
+ end
438
+
439
+ #
440
+ # Lists the usage details for a scope by billing period. Usage details are
441
+ # available via this API only for May 1, 2014 or later.
442
+ #
443
+ # @param next_page_link [String] The NextLink from the previous successful call
444
+ # to List operation.
445
+ # @param [Hash{String => String}] A hash of custom headers that will be added
446
+ # to the HTTP request.
447
+ #
448
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
449
+ #
450
+ def list_by_billing_period_next_async(next_page_link, custom_headers:nil)
451
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
452
+
453
+
454
+ request_headers = {}
455
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
456
+
457
+ # Set Headers
458
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
459
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
460
+ path_template = '{nextLink}'
461
+
462
+ request_url = @base_url || @client.base_url
463
+
464
+ options = {
465
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
466
+ skip_encoding_path_params: {'nextLink' => next_page_link},
467
+ headers: request_headers.merge(custom_headers || {}),
468
+ base_url: request_url
469
+ }
470
+ promise = @client.make_request_async(:get, path_template, options)
471
+
472
+ promise = promise.then do |result|
473
+ http_response = result.response
474
+ status_code = http_response.status
475
+ response_content = http_response.body
476
+ unless status_code == 200
477
+ error_model = JSON.load(response_content)
478
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
479
+ end
480
+
481
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
482
+ # Deserialize Response
483
+ if status_code == 200
484
+ begin
485
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
486
+ result_mapper = Azure::Consumption::Mgmt::V2018_03_31::Models::UsageDetailsListResult.mapper()
487
+ result.body = @client.deserialize(result_mapper, parsed_response)
488
+ rescue Exception => e
489
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
490
+ end
491
+ end
492
+
493
+ result
494
+ end
495
+
496
+ promise.execute
497
+ end
498
+
499
+ #
500
+ # Lists the usage details for a scope by current billing period. Usage details
501
+ # are available via this API only for May 1, 2014 or later.
502
+ #
503
+ # @param expand [String] May be used to expand the
504
+ # properties/additionalProperties or properties/meterDetails within a list of
505
+ # usage details. By default, these fields are not included when listing usage
506
+ # details.
507
+ # @param filter [String] May be used to filter usageDetails by
508
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
509
+ # properties/resourceGroup, properties/instanceName, properties/instanceId or
510
+ # tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does
511
+ # not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair
512
+ # string where key and value is separated by a colon (:).
513
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
514
+ # returned a partial result. If a previous response contains a nextLink
515
+ # element, the value of the nextLink element will include a skiptoken parameter
516
+ # that specifies a starting point to use for subsequent calls.
517
+ # @param top [Integer] May be used to limit the number of results to the most
518
+ # recent N usageDetails.
519
+ # @param query_options [QueryOptions] Additional parameters for the operation
520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
521
+ # will be added to the HTTP request.
522
+ #
523
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
524
+ # response.
525
+ #
526
+ def list_as_lazy(expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
527
+ response = list_async(expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
528
+ unless response.nil?
529
+ page = response.body
530
+ page.next_method = Proc.new do |next_page_link|
531
+ list_next_async(next_page_link, custom_headers:custom_headers)
532
+ end
533
+ page
534
+ end
535
+ end
536
+
537
+ #
538
+ # Lists the usage details for a scope by billing period. Usage details are
539
+ # available via this API only for May 1, 2014 or later.
540
+ #
541
+ # @param billing_period_name [String] Billing Period Name.
542
+ # @param expand [String] May be used to expand the
543
+ # properties/additionalProperties or properties/meterDetails within a list of
544
+ # usage details. By default, these fields are not included when listing usage
545
+ # details.
546
+ # @param filter [String] May be used to filter usageDetails by
547
+ # properties/usageEnd (Utc time), properties/usageStart (Utc time),
548
+ # properties/resourceGroup, properties/instanceName or properties/instanceId.
549
+ # The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
550
+ # currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string
551
+ # where key and value is separated by a colon (:).
552
+ # @param skiptoken [String] Skiptoken is only used if a previous operation
553
+ # returned a partial result. If a previous response contains a nextLink
554
+ # element, the value of the nextLink element will include a skiptoken parameter
555
+ # that specifies a starting point to use for subsequent calls.
556
+ # @param top [Integer] May be used to limit the number of results to the most
557
+ # recent N usageDetails.
558
+ # @param query_options [QueryOptions] Additional parameters for the operation
559
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
560
+ # will be added to the HTTP request.
561
+ #
562
+ # @return [UsageDetailsListResult] which provide lazy access to pages of the
563
+ # response.
564
+ #
565
+ def list_by_billing_period_as_lazy(billing_period_name, expand:nil, filter:nil, skiptoken:nil, top:nil, query_options:nil, custom_headers:nil)
566
+ response = list_by_billing_period_async(billing_period_name, expand:expand, filter:filter, skiptoken:skiptoken, top:top, query_options:query_options, custom_headers:custom_headers).value!
567
+ unless response.nil?
568
+ page = response.body
569
+ page.next_method = Proc.new do |next_page_link|
570
+ list_by_billing_period_next_async(next_page_link, custom_headers:custom_headers)
571
+ end
572
+ page
573
+ end
574
+ end
575
+
576
+ end
577
+ end