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,171 @@
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
+ # A budget resource.
10
+ #
11
+ class Budget < ProxyResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [CategoryType] The category of the budget, whether the budget
16
+ # tracks cost or usage. Possible values include: 'Cost', 'Usage'
17
+ attr_accessor :category
18
+
19
+ # @return The total amount of cost to track with the budget
20
+ attr_accessor :amount
21
+
22
+ # @return [TimeGrainType] The time covered by a budget. Tracking of the
23
+ # amount will be reset based on the time grain. Possible values include:
24
+ # 'Monthly', 'Quarterly', 'Annually'
25
+ attr_accessor :time_grain
26
+
27
+ # @return [BudgetTimePeriod] Has start and end date of the budget. The
28
+ # start date must be first of the month and should be less than the end
29
+ # date. Budget start date must be on or after June 1, 2017. Future start
30
+ # date should not be more than three months. Past start date should be
31
+ # selected within the timegrain preiod. There are no restrictions on the
32
+ # end date.
33
+ attr_accessor :time_period
34
+
35
+ # @return [Filters] May be used to filter budgets by resource group,
36
+ # resource, or meter.
37
+ attr_accessor :filters
38
+
39
+ # @return [CurrentSpend] The current amount of cost which is being
40
+ # tracked for a budget.
41
+ attr_accessor :current_spend
42
+
43
+ # @return [Hash{String => Notification}] Dictionary of notifications
44
+ # associated with the budget. Budget can have up to five notifications.
45
+ attr_accessor :notifications
46
+
47
+
48
+ #
49
+ # Mapper for Budget class as Ruby Hash.
50
+ # This will be used for serialization/deserialization.
51
+ #
52
+ def self.mapper()
53
+ {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'Budget',
57
+ type: {
58
+ name: 'Composite',
59
+ class_name: 'Budget',
60
+ model_properties: {
61
+ id: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'id',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ name: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ read_only: true,
74
+ serialized_name: 'name',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ type: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ read_only: true,
83
+ serialized_name: 'type',
84
+ type: {
85
+ name: 'String'
86
+ }
87
+ },
88
+ e_tag: {
89
+ client_side_validation: true,
90
+ required: false,
91
+ serialized_name: 'eTag',
92
+ type: {
93
+ name: 'String'
94
+ }
95
+ },
96
+ category: {
97
+ client_side_validation: true,
98
+ required: true,
99
+ serialized_name: 'properties.category',
100
+ type: {
101
+ name: 'String'
102
+ }
103
+ },
104
+ amount: {
105
+ client_side_validation: true,
106
+ required: true,
107
+ serialized_name: 'properties.amount',
108
+ type: {
109
+ name: 'Number'
110
+ }
111
+ },
112
+ time_grain: {
113
+ client_side_validation: true,
114
+ required: true,
115
+ serialized_name: 'properties.timeGrain',
116
+ type: {
117
+ name: 'String'
118
+ }
119
+ },
120
+ time_period: {
121
+ client_side_validation: true,
122
+ required: true,
123
+ serialized_name: 'properties.timePeriod',
124
+ type: {
125
+ name: 'Composite',
126
+ class_name: 'BudgetTimePeriod'
127
+ }
128
+ },
129
+ filters: {
130
+ client_side_validation: true,
131
+ required: false,
132
+ serialized_name: 'properties.filters',
133
+ type: {
134
+ name: 'Composite',
135
+ class_name: 'Filters'
136
+ }
137
+ },
138
+ current_spend: {
139
+ client_side_validation: true,
140
+ required: false,
141
+ read_only: true,
142
+ serialized_name: 'properties.currentSpend',
143
+ type: {
144
+ name: 'Composite',
145
+ class_name: 'CurrentSpend'
146
+ }
147
+ },
148
+ notifications: {
149
+ client_side_validation: true,
150
+ required: false,
151
+ serialized_name: 'properties.notifications',
152
+ type: {
153
+ name: 'Dictionary',
154
+ value: {
155
+ client_side_validation: true,
156
+ required: false,
157
+ serialized_name: 'NotificationElementType',
158
+ type: {
159
+ name: 'Composite',
160
+ class_name: 'Notification'
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ end
169
+ end
170
+ end
171
+ end
@@ -0,0 +1,58 @@
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
+ # The start and end date for a budget.
10
+ #
11
+ class BudgetTimePeriod
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [DateTime] The start date for the budget.
16
+ attr_accessor :start_date
17
+
18
+ # @return [DateTime] The end date for the budget. If not provided, we
19
+ # default this to 10 years from the start date.
20
+ attr_accessor :end_date
21
+
22
+
23
+ #
24
+ # Mapper for BudgetTimePeriod class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'BudgetTimePeriod',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'BudgetTimePeriod',
35
+ model_properties: {
36
+ start_date: {
37
+ client_side_validation: true,
38
+ required: true,
39
+ serialized_name: 'startDate',
40
+ type: {
41
+ name: 'DateTime'
42
+ }
43
+ },
44
+ end_date: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'endDate',
48
+ type: {
49
+ name: 'DateTime'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,101 @@
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 budgets. It contains a list of available budgets in the
10
+ # scope provided.
11
+ #
12
+ class BudgetsListResult
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [Array<Budget>] The list of budgets.
18
+ attr_accessor :value
19
+
20
+ # @return [String] The link (url) to the next page of results.
21
+ attr_accessor :next_link
22
+
23
+ # return [Proc] with next page method call.
24
+ attr_accessor :next_method
25
+
26
+ #
27
+ # Gets the rest of the items for the request, enabling auto-pagination.
28
+ #
29
+ # @return [Array<Budget>] operation results.
30
+ #
31
+ def get_all_items
32
+ items = @value
33
+ page = self
34
+ while page.next_link != nil do
35
+ page = page.get_next_page
36
+ items.concat(page.value)
37
+ end
38
+ items
39
+ end
40
+
41
+ #
42
+ # Gets the next page of results.
43
+ #
44
+ # @return [BudgetsListResult] with next page content.
45
+ #
46
+ def get_next_page
47
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
48
+ unless response.nil?
49
+ @next_link = response.body.next_link
50
+ @value = response.body.value
51
+ self
52
+ end
53
+ end
54
+
55
+ #
56
+ # Mapper for BudgetsListResult class as Ruby Hash.
57
+ # This will be used for serialization/deserialization.
58
+ #
59
+ def self.mapper()
60
+ {
61
+ client_side_validation: true,
62
+ required: false,
63
+ serialized_name: 'BudgetsListResult',
64
+ type: {
65
+ name: 'Composite',
66
+ class_name: 'BudgetsListResult',
67
+ model_properties: {
68
+ value: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ read_only: true,
72
+ serialized_name: 'value',
73
+ type: {
74
+ name: 'Sequence',
75
+ element: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ serialized_name: 'BudgetElementType',
79
+ type: {
80
+ name: 'Composite',
81
+ class_name: 'Budget'
82
+ }
83
+ }
84
+ }
85
+ },
86
+ next_link: {
87
+ client_side_validation: true,
88
+ required: false,
89
+ read_only: true,
90
+ serialized_name: 'nextLink',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,16 @@
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
+ # Defines values for CategoryType
10
+ #
11
+ module CategoryType
12
+ Cost = "Cost"
13
+ Usage = "Usage"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,59 @@
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
+ # The current amount of cost which is being tracked for a budget.
10
+ #
11
+ class CurrentSpend
12
+
13
+ include MsRestAzure
14
+
15
+ # @return The total amount of cost which is being tracked by the budget.
16
+ attr_accessor :amount
17
+
18
+ # @return [String] The unit of measure for the budget amount.
19
+ attr_accessor :unit
20
+
21
+
22
+ #
23
+ # Mapper for CurrentSpend class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'CurrentSpend',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'CurrentSpend',
34
+ model_properties: {
35
+ amount: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ read_only: true,
39
+ serialized_name: 'amount',
40
+ type: {
41
+ name: 'Number'
42
+ }
43
+ },
44
+ unit: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'unit',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,16 @@
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
+ # Defines values for Datagrain
10
+ #
11
+ module Datagrain
12
+ DailyGrain = "daily"
13
+ MonthlyGrain = "monthly"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,59 @@
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
+ # The details of the error.
10
+ #
11
+ class ErrorDetails
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Error code.
16
+ attr_accessor :code
17
+
18
+ # @return [String] Error message indicating why the operation failed.
19
+ attr_accessor :message
20
+
21
+
22
+ #
23
+ # Mapper for ErrorDetails class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'ErrorDetails',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'ErrorDetails',
34
+ model_properties: {
35
+ code: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ read_only: true,
39
+ serialized_name: 'code',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ message: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'message',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end