azure_mgmt_consumption 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +4 -1
  3. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/operations.rb +15 -13
  4. data/lib/2017-04-24-preview/generated/azure_mgmt_consumption/usage_details.rb +15 -13
  5. data/lib/2017-11-30/generated/azure_mgmt_consumption.rb +12 -5
  6. data/lib/2017-11-30/generated/azure_mgmt_consumption/consumption_management_client.rb +12 -1
  7. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  8. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  9. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +56 -0
  10. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  11. data/lib/2017-11-30/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +57 -0
  12. data/lib/2017-11-30/generated/azure_mgmt_consumption/operations.rb +15 -13
  13. data/lib/2017-11-30/generated/azure_mgmt_consumption/reservations_details.rb +129 -0
  14. data/lib/2017-11-30/generated/azure_mgmt_consumption/reservations_summaries.rb +135 -0
  15. data/lib/2017-11-30/generated/azure_mgmt_consumption/usage_details.rb +15 -13
  16. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption.rb +42 -0
  17. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/budgets.rb +384 -0
  18. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/consumption_management_client.rb +138 -0
  19. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/budget.rb +160 -0
  20. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  21. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/budgets_list_result.rb +57 -0
  22. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  23. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  24. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  25. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/notification.rb +115 -0
  26. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  27. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  28. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  29. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  30. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  31. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  32. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  33. data/lib/2017-12-30-preview/generated/azure_mgmt_consumption/operations.rb +216 -0
  34. data/lib/2018-01-31/generated/azure_mgmt_consumption.rb +62 -0
  35. data/lib/2018-01-31/generated/azure_mgmt_consumption/budgets.rb +993 -0
  36. data/lib/2018-01-31/generated/azure_mgmt_consumption/consumption_management_client.rb +155 -0
  37. data/lib/2018-01-31/generated/azure_mgmt_consumption/marketplaces.rb +521 -0
  38. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budget.rb +171 -0
  39. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budget_time_period.rb +58 -0
  40. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/budgets_list_result.rb +101 -0
  41. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/category_type.rb +16 -0
  42. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/current_spend.rb +59 -0
  43. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/datagrain.rb +16 -0
  44. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/error_details.rb +59 -0
  45. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/error_response.rb +48 -0
  46. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/filters.rb +106 -0
  47. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/marketplace.rb +375 -0
  48. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/marketplaces_list_result.rb +101 -0
  49. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/meter_details.rb +122 -0
  50. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/notification.rb +139 -0
  51. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation.rb +59 -0
  52. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation_display.rb +72 -0
  53. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operation_list_result.rb +103 -0
  54. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/operator_type.rb +17 -0
  55. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/price_sheet_properties.rb +134 -0
  56. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/price_sheet_result.rb +112 -0
  57. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/proxy_resource.rb +84 -0
  58. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_details.rb +187 -0
  59. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_details_list_result.rb +100 -0
  60. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_summaries.rb +205 -0
  61. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/reservation_summaries_list_result.rb +101 -0
  62. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/resource.rb +91 -0
  63. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/time_grain_type.rb +17 -0
  64. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/usage_detail.rb +355 -0
  65. data/lib/2018-01-31/generated/azure_mgmt_consumption/models/usage_details_list_result.rb +101 -0
  66. data/lib/2018-01-31/generated/azure_mgmt_consumption/module_definition.rb +9 -0
  67. data/lib/2018-01-31/generated/azure_mgmt_consumption/operations.rb +216 -0
  68. data/lib/2018-01-31/generated/azure_mgmt_consumption/price_sheet.rb +246 -0
  69. data/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_details.rb +449 -0
  70. data/lib/2018-01-31/generated/azure_mgmt_consumption/reservations_summaries.rb +465 -0
  71. data/lib/2018-01-31/generated/azure_mgmt_consumption/usage_details.rb +553 -0
  72. data/lib/azure_mgmt_consumption.rb +2 -0
  73. data/lib/profiles/latest/consumption_latest_profile_client.rb +28 -9
  74. data/lib/profiles/latest/consumption_module_definition.rb +0 -1
  75. data/lib/profiles/latest/modules/consumption_profile_module.rb +153 -48
  76. data/lib/version.rb +1 -1
  77. metadata +65 -2
@@ -0,0 +1,187 @@
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_01_31
7
+ module Models
8
+ #
9
+ # reservation details resource.
10
+ #
11
+ class ReservationDetails < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The reservation order ID is the identifier for a
16
+ # reservation purchase. Each reservation order ID represents a single
17
+ # purchase transaction. A reservation order contains reservations. The
18
+ # reservation order specifies the VM size and region for the
19
+ # reservations.
20
+ attr_accessor :reservation_order_id
21
+
22
+ # @return [String] The reservation ID is the identifier of a reservation
23
+ # within a reservation order. Each reservation is the grouping for
24
+ # applying the benefit scope and also specifies the number of instances
25
+ # to which the reservation benefit can be applied to.
26
+ attr_accessor :reservation_id
27
+
28
+ # @return [String] This is the ARM Sku name. It can be used to join with
29
+ # the servicetype field in additoinalinfo in usage records.
30
+ attr_accessor :sku_name
31
+
32
+ # @return This is the total hours reserved for the day. E.g. if
33
+ # reservation for 1 instance was made on 1 PM, this will be 11 hours for
34
+ # that day and 24 hours from subsequent days.
35
+ attr_accessor :reserved_hours
36
+
37
+ # @return [DateTime] The date on which consumption occurred.
38
+ attr_accessor :usage_date
39
+
40
+ # @return This is the total hours used by the instance.
41
+ attr_accessor :used_hours
42
+
43
+ # @return [String] This identifier is the name of the resource or the
44
+ # fully qualified Resource ID.
45
+ attr_accessor :instance_id
46
+
47
+ # @return This is the total count of instances that are reserved for the
48
+ # reservationid.
49
+ attr_accessor :total_reserved_quantity
50
+
51
+
52
+ #
53
+ # Mapper for ReservationDetails class as Ruby Hash.
54
+ # This will be used for serialization/deserialization.
55
+ #
56
+ def self.mapper()
57
+ {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'ReservationDetails',
61
+ type: {
62
+ name: 'Composite',
63
+ class_name: 'ReservationDetails',
64
+ model_properties: {
65
+ id: {
66
+ client_side_validation: true,
67
+ required: false,
68
+ read_only: true,
69
+ serialized_name: 'id',
70
+ type: {
71
+ name: 'String'
72
+ }
73
+ },
74
+ name: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ read_only: true,
78
+ serialized_name: 'name',
79
+ type: {
80
+ name: 'String'
81
+ }
82
+ },
83
+ type: {
84
+ client_side_validation: true,
85
+ required: false,
86
+ read_only: true,
87
+ serialized_name: 'type',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ },
92
+ tags: {
93
+ client_side_validation: true,
94
+ required: false,
95
+ read_only: true,
96
+ serialized_name: 'tags',
97
+ type: {
98
+ name: 'Dictionary',
99
+ value: {
100
+ client_side_validation: true,
101
+ required: false,
102
+ serialized_name: 'StringElementType',
103
+ type: {
104
+ name: 'String'
105
+ }
106
+ }
107
+ }
108
+ },
109
+ reservation_order_id: {
110
+ client_side_validation: true,
111
+ required: false,
112
+ read_only: true,
113
+ serialized_name: 'properties.reservationOrderId',
114
+ type: {
115
+ name: 'String'
116
+ }
117
+ },
118
+ reservation_id: {
119
+ client_side_validation: true,
120
+ required: false,
121
+ read_only: true,
122
+ serialized_name: 'properties.reservationId',
123
+ type: {
124
+ name: 'String'
125
+ }
126
+ },
127
+ sku_name: {
128
+ client_side_validation: true,
129
+ required: false,
130
+ read_only: true,
131
+ serialized_name: 'properties.skuName',
132
+ type: {
133
+ name: 'String'
134
+ }
135
+ },
136
+ reserved_hours: {
137
+ client_side_validation: true,
138
+ required: false,
139
+ read_only: true,
140
+ serialized_name: 'properties.reservedHours',
141
+ type: {
142
+ name: 'Number'
143
+ }
144
+ },
145
+ usage_date: {
146
+ client_side_validation: true,
147
+ required: false,
148
+ read_only: true,
149
+ serialized_name: 'properties.usageDate',
150
+ type: {
151
+ name: 'DateTime'
152
+ }
153
+ },
154
+ used_hours: {
155
+ client_side_validation: true,
156
+ required: false,
157
+ read_only: true,
158
+ serialized_name: 'properties.usedHours',
159
+ type: {
160
+ name: 'Number'
161
+ }
162
+ },
163
+ instance_id: {
164
+ client_side_validation: true,
165
+ required: false,
166
+ read_only: true,
167
+ serialized_name: 'properties.instanceId',
168
+ type: {
169
+ name: 'String'
170
+ }
171
+ },
172
+ total_reserved_quantity: {
173
+ client_side_validation: true,
174
+ required: false,
175
+ read_only: true,
176
+ serialized_name: 'properties.totalReservedQuantity',
177
+ type: {
178
+ name: 'Number'
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ end
185
+ end
186
+ end
187
+ end
@@ -0,0 +1,100 @@
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_01_31
7
+ module Models
8
+ #
9
+ # Result of listing reservation details.
10
+ #
11
+ class ReservationDetailsListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<ReservationDetails>] The list of reservation details.
17
+ attr_accessor :value
18
+
19
+ # @return [String] The link (url) to the next page of results.
20
+ attr_accessor :next_link
21
+
22
+ # return [Proc] with next page method call.
23
+ attr_accessor :next_method
24
+
25
+ #
26
+ # Gets the rest of the items for the request, enabling auto-pagination.
27
+ #
28
+ # @return [Array<ReservationDetails>] operation results.
29
+ #
30
+ def get_all_items
31
+ items = @value
32
+ page = self
33
+ while page.next_link != nil do
34
+ page = page.get_next_page
35
+ items.concat(page.value)
36
+ end
37
+ items
38
+ end
39
+
40
+ #
41
+ # Gets the next page of results.
42
+ #
43
+ # @return [ReservationDetailsListResult] with next page content.
44
+ #
45
+ def get_next_page
46
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
47
+ unless response.nil?
48
+ @next_link = response.body.next_link
49
+ @value = response.body.value
50
+ self
51
+ end
52
+ end
53
+
54
+ #
55
+ # Mapper for ReservationDetailsListResult class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'ReservationDetailsListResult',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'ReservationDetailsListResult',
66
+ model_properties: {
67
+ value: {
68
+ client_side_validation: true,
69
+ required: false,
70
+ read_only: true,
71
+ serialized_name: 'value',
72
+ type: {
73
+ name: 'Sequence',
74
+ element: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ serialized_name: 'ReservationDetailsElementType',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'ReservationDetails'
81
+ }
82
+ }
83
+ }
84
+ },
85
+ next_link: {
86
+ client_side_validation: true,
87
+ required: false,
88
+ read_only: true,
89
+ serialized_name: 'nextLink',
90
+ type: {
91
+ name: 'String'
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,205 @@
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_01_31
7
+ module Models
8
+ #
9
+ # reservation summaries resource.
10
+ #
11
+ class ReservationSummaries < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The reservation order ID is the identifier for a
16
+ # reservation purchase. Each reservation order ID represents a single
17
+ # purchase transaction. A reservation order contains reservations. The
18
+ # reservation order specifies the VM size and region for the
19
+ # reservations.
20
+ attr_accessor :reservation_order_id
21
+
22
+ # @return [String] The reservation ID is the identifier of a reservation
23
+ # within a reservation order. Each reservation is the grouping for
24
+ # applying the benefit scope and also specifies the number of instances
25
+ # to which the reservation benefit can be applied to.
26
+ attr_accessor :reservation_id
27
+
28
+ # @return [String] This is the ARM Sku name. It can be used to join with
29
+ # the servicetype field in additoinalinfo in usage records.
30
+ attr_accessor :sku_name
31
+
32
+ # @return This is the total hours reserved. E.g. if reservation for 1
33
+ # instance was made on 1 PM, this will be 11 hours for that day and 24
34
+ # hours from subsequent days
35
+ attr_accessor :reserved_hours
36
+
37
+ # @return [DateTime] Data corresponding to the utilization record. If the
38
+ # grain of data is monthly, it will be first day of month.
39
+ attr_accessor :usage_date
40
+
41
+ # @return Total used hours by the reservation
42
+ attr_accessor :used_hours
43
+
44
+ # @return This is the minimum hourly utilization in the usage time (day
45
+ # or month). E.g. if usage record corresponds to 12/10/2017 and on that
46
+ # for hour 4 and 5, utilization was 10%, this field will return 10% for
47
+ # that day
48
+ attr_accessor :min_utilization_percentage
49
+
50
+ # @return This is average utilization for the entire time range. (day or
51
+ # month depending on the grain)
52
+ attr_accessor :avg_utilization_percentage
53
+
54
+ # @return This is the maximum hourly utilization in the usage time (day
55
+ # or month). E.g. if usage record corresponds to 12/10/2017 and on that
56
+ # for hour 4 and 5, utilization was 100%, this field will return 100% for
57
+ # that day.
58
+ attr_accessor :max_utilization_percentage
59
+
60
+
61
+ #
62
+ # Mapper for ReservationSummaries class as Ruby Hash.
63
+ # This will be used for serialization/deserialization.
64
+ #
65
+ def self.mapper()
66
+ {
67
+ client_side_validation: true,
68
+ required: false,
69
+ serialized_name: 'ReservationSummaries',
70
+ type: {
71
+ name: 'Composite',
72
+ class_name: 'ReservationSummaries',
73
+ model_properties: {
74
+ id: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ read_only: true,
78
+ serialized_name: 'id',
79
+ type: {
80
+ name: 'String'
81
+ }
82
+ },
83
+ name: {
84
+ client_side_validation: true,
85
+ required: false,
86
+ read_only: true,
87
+ serialized_name: 'name',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ },
92
+ type: {
93
+ client_side_validation: true,
94
+ required: false,
95
+ read_only: true,
96
+ serialized_name: 'type',
97
+ type: {
98
+ name: 'String'
99
+ }
100
+ },
101
+ tags: {
102
+ client_side_validation: true,
103
+ required: false,
104
+ read_only: true,
105
+ serialized_name: 'tags',
106
+ type: {
107
+ name: 'Dictionary',
108
+ value: {
109
+ client_side_validation: true,
110
+ required: false,
111
+ serialized_name: 'StringElementType',
112
+ type: {
113
+ name: 'String'
114
+ }
115
+ }
116
+ }
117
+ },
118
+ reservation_order_id: {
119
+ client_side_validation: true,
120
+ required: false,
121
+ read_only: true,
122
+ serialized_name: 'properties.reservationOrderId',
123
+ type: {
124
+ name: 'String'
125
+ }
126
+ },
127
+ reservation_id: {
128
+ client_side_validation: true,
129
+ required: false,
130
+ read_only: true,
131
+ serialized_name: 'properties.reservationId',
132
+ type: {
133
+ name: 'String'
134
+ }
135
+ },
136
+ sku_name: {
137
+ client_side_validation: true,
138
+ required: false,
139
+ read_only: true,
140
+ serialized_name: 'properties.skuName',
141
+ type: {
142
+ name: 'String'
143
+ }
144
+ },
145
+ reserved_hours: {
146
+ client_side_validation: true,
147
+ required: false,
148
+ read_only: true,
149
+ serialized_name: 'properties.reservedHours',
150
+ type: {
151
+ name: 'Number'
152
+ }
153
+ },
154
+ usage_date: {
155
+ client_side_validation: true,
156
+ required: false,
157
+ read_only: true,
158
+ serialized_name: 'properties.usageDate',
159
+ type: {
160
+ name: 'DateTime'
161
+ }
162
+ },
163
+ used_hours: {
164
+ client_side_validation: true,
165
+ required: false,
166
+ read_only: true,
167
+ serialized_name: 'properties.usedHours',
168
+ type: {
169
+ name: 'Number'
170
+ }
171
+ },
172
+ min_utilization_percentage: {
173
+ client_side_validation: true,
174
+ required: false,
175
+ read_only: true,
176
+ serialized_name: 'properties.minUtilizationPercentage',
177
+ type: {
178
+ name: 'Number'
179
+ }
180
+ },
181
+ avg_utilization_percentage: {
182
+ client_side_validation: true,
183
+ required: false,
184
+ read_only: true,
185
+ serialized_name: 'properties.avgUtilizationPercentage',
186
+ type: {
187
+ name: 'Number'
188
+ }
189
+ },
190
+ max_utilization_percentage: {
191
+ client_side_validation: true,
192
+ required: false,
193
+ read_only: true,
194
+ serialized_name: 'properties.maxUtilizationPercentage',
195
+ type: {
196
+ name: 'Number'
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ end
203
+ end
204
+ end
205
+ end