azure_mgmt_reservations 0.19.2 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-11-01/generated/azure_mgmt_reservations/reservations_management_client.rb +1 -1
  3. data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +1 -1
  4. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +1 -1
  5. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations.rb +15 -19
  6. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/auto_quota_increase.rb +0 -18
  7. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/{on_failure.rb → actions.rb} +6 -20
  8. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/auto_quota_increase_detail.rb +4 -4
  9. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit.rb +3 -76
  10. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit_base.rb +3 -76
  11. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_actions.rb +4 -5
  12. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_properties.rb +120 -0
  13. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_one_resource_submit_response.rb +3 -76
  14. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/{current_quota_limit_base_name.rb → resource_name.rb} +4 -4
  15. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request.rb +2 -2
  16. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/support_request_action.rb +0 -11
  17. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota.rb +692 -31
  18. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/{quota_requests.rb → quota_request_status.rb} +30 -74
  19. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +5 -13
  20. data/lib/profiles/latest/modules/reservations_profile_module.rb +47 -59
  21. data/lib/version.rb +1 -1
  22. metadata +6 -10
  23. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure_email_actions.rb +0 -55
  24. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure_phone_actions.rb +0 -55
  25. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request_name.rb +0 -59
  26. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_request.rb +0 -519
  27. data/lib/2019-07-19-preview/generated/azure_mgmt_reservations/quotas.rb +0 -269
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::Reservations::Mgmt
6
- VERSION = '0.19.2'
6
+ VERSION = '0.20.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_reservations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -204,37 +204,33 @@ files:
204
204
  - lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb
205
205
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations.rb
206
206
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/auto_quota_increase.rb
207
+ - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/actions.rb
207
208
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/aqi_settings.rb
208
209
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/auto_quota_increase_detail.rb
209
210
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/create_generic_quota_request_parameters.rb
210
211
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit.rb
211
212
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit_base.rb
212
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/current_quota_limit_base_name.rb
213
213
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_action.rb
214
214
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/email_actions.rb
215
215
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/exception_response.rb
216
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure.rb
217
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure_email_actions.rb
218
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/on_failure_phone_actions.rb
219
216
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/phone_action.rb
220
217
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_limits.rb
221
218
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_limits_response.rb
219
+ - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_properties.rb
222
220
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_details.rb
223
221
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_details_list.rb
224
222
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_one_resource_submit_response.rb
225
223
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_properties.rb
226
224
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_submit_response.rb
227
225
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/quota_request_submit_response201.rb
226
+ - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/resource_name.rb
228
227
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/service_error.rb
229
228
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/service_error_detail.rb
230
229
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request.rb
231
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/sub_request_name.rb
232
230
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/models/support_request_action.rb
233
231
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/module_definition.rb
234
232
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota.rb
235
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_request.rb
236
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_requests.rb
237
- - lib/2019-07-19-preview/generated/azure_mgmt_reservations/quotas.rb
233
+ - lib/2019-07-19-preview/generated/azure_mgmt_reservations/quota_request_status.rb
238
234
  - lib/2019-07-19-preview/generated/azure_mgmt_reservations/reservations_management_client.rb
239
235
  - lib/azure_mgmt_reservations.rb
240
236
  - lib/module_definition.rb
@@ -1,55 +0,0 @@
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::Reservations::Mgmt::V2019_07_19_preview
7
- module Models
8
- #
9
- # The email actions for auto quota increase.
10
- #
11
- class OnFailureEmailActions
12
-
13
- include MsRestAzure
14
-
15
- # @return [Array<EmailAction>] The list of email actions.
16
- attr_accessor :value
17
-
18
-
19
- #
20
- # Mapper for OnFailureEmailActions class as Ruby Hash.
21
- # This will be used for serialization/deserialization.
22
- #
23
- def self.mapper()
24
- {
25
- client_side_validation: true,
26
- required: false,
27
- serialized_name: 'OnFailure_emailActions',
28
- type: {
29
- name: 'Composite',
30
- class_name: 'OnFailureEmailActions',
31
- model_properties: {
32
- value: {
33
- client_side_validation: true,
34
- required: false,
35
- serialized_name: 'value',
36
- type: {
37
- name: 'Sequence',
38
- element: {
39
- client_side_validation: true,
40
- required: false,
41
- serialized_name: 'EmailActionElementType',
42
- type: {
43
- name: 'Composite',
44
- class_name: 'EmailAction'
45
- }
46
- }
47
- }
48
- }
49
- }
50
- }
51
- }
52
- end
53
- end
54
- end
55
- end
@@ -1,55 +0,0 @@
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::Reservations::Mgmt::V2019_07_19_preview
7
- module Models
8
- #
9
- # The phone actions for auto quota increase.
10
- #
11
- class OnFailurePhoneActions
12
-
13
- include MsRestAzure
14
-
15
- # @return [Array<PhoneAction>] The list of phone actions.
16
- attr_accessor :value
17
-
18
-
19
- #
20
- # Mapper for OnFailurePhoneActions class as Ruby Hash.
21
- # This will be used for serialization/deserialization.
22
- #
23
- def self.mapper()
24
- {
25
- client_side_validation: true,
26
- required: false,
27
- serialized_name: 'OnFailure_phoneActions',
28
- type: {
29
- name: 'Composite',
30
- class_name: 'OnFailurePhoneActions',
31
- model_properties: {
32
- value: {
33
- client_side_validation: true,
34
- required: false,
35
- serialized_name: 'value',
36
- type: {
37
- name: 'Sequence',
38
- element: {
39
- client_side_validation: true,
40
- required: false,
41
- serialized_name: 'PhoneActionElementType',
42
- type: {
43
- name: 'Composite',
44
- class_name: 'PhoneAction'
45
- }
46
- }
47
- }
48
- }
49
- }
50
- }
51
- }
52
- end
53
- end
54
- end
55
- end
@@ -1,59 +0,0 @@
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::Reservations::Mgmt::V2019_07_19_preview
7
- module Models
8
- #
9
- # The Resource name.
10
- #
11
- class SubRequestName
12
-
13
- include MsRestAzure
14
-
15
- # @return [String] Resource display name.
16
- attr_accessor :localized_value
17
-
18
- # @return [String] Resource name.
19
- attr_accessor :value
20
-
21
-
22
- #
23
- # Mapper for SubRequestName 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: 'SubRequest_name',
31
- type: {
32
- name: 'Composite',
33
- class_name: 'SubRequestName',
34
- model_properties: {
35
- localized_value: {
36
- client_side_validation: true,
37
- required: false,
38
- read_only: true,
39
- serialized_name: 'localizedValue',
40
- type: {
41
- name: 'String'
42
- }
43
- },
44
- value: {
45
- client_side_validation: true,
46
- required: false,
47
- read_only: true,
48
- serialized_name: 'value',
49
- type: {
50
- name: 'String'
51
- }
52
- }
53
- }
54
- }
55
- }
56
- end
57
- end
58
- end
59
- end
@@ -1,519 +0,0 @@
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::Reservations::Mgmt::V2019_07_19_preview
7
- #
8
- # Microsoft Azure Quota Resource Provider.
9
- #
10
- class QuotaRequest
11
- include MsRestAzure
12
-
13
- #
14
- # Creates and initializes a new instance of the QuotaRequest class.
15
- # @param client service class for accessing basic functionality.
16
- #
17
- def initialize(client)
18
- @client = client
19
- end
20
-
21
- # @return [ReservationsManagementClient] reference to the ReservationsManagementClient
22
- attr_reader :client
23
-
24
- #
25
- # Submits a Quota Request for a resource provider at the specified location for
26
- # the specific resource in the parameter.
27
- #
28
- # Submits Quota change request for a resource provider for the specified
29
- # location for the specific resource in the parameter. To use, first make a Get
30
- # request to get quota information. This information consists of a list of
31
- # resources and information regarding those resources. For all the resources in
32
- # that list which require an update to their quotas, update their limit fields
33
- # in the response from the Get request to their new values. Then, submit this
34
- # updated JSON object to this quota request API. This will update the quota to
35
- # the values specified. The location header in the response will be used to
36
- # track the status of the quota request. Please check the provisioningState
37
- # field in the response.
38
- #
39
- # @param subscription_id [String] Azure subscription id.
40
- # @param provider_id [String] Azure resource Provider id.
41
- # @param location [String] Azure region.
42
- # @param resource_name [String] The Resource name for the specific resource
43
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
44
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
45
- # @param if_match [String] ETag of the Entity. ETag should match the current
46
- # entity state from the header response of the GET request or it should be *
47
- # for unconditional update.
48
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
- # will be added to the HTTP request.
50
- #
51
- # @return [Object] operation results.
52
- #
53
- def create(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
54
- response = create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
55
- response.body unless response.nil?
56
- end
57
-
58
- #
59
- # @param subscription_id [String] Azure subscription id.
60
- # @param provider_id [String] Azure resource Provider id.
61
- # @param location [String] Azure region.
62
- # @param resource_name [String] The Resource name for the specific resource
63
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
64
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
65
- # @param if_match [String] ETag of the Entity. ETag should match the current
66
- # entity state from the header response of the GET request or it should be *
67
- # for unconditional update.
68
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
69
- # will be added to the HTTP request.
70
- #
71
- # @return [Concurrent::Promise] promise which provides async access to http
72
- # response.
73
- #
74
- def create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
75
- # Send request
76
- promise = begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers)
77
-
78
- promise = promise.then do |response|
79
- # Defining deserialization method.
80
- deserialize_method = lambda do |parsed_response|
81
- result_mapper = {
82
- client_side_validation: true,
83
- required: false,
84
- serialized_name: 'parsed_response',
85
- type: {
86
- name: 'Object'
87
- }
88
- }
89
- parsed_response = @client.deserialize(result_mapper, parsed_response)
90
- end
91
-
92
- # Waiting for response.
93
- @client.get_long_running_operation_result(response, deserialize_method)
94
- end
95
-
96
- promise
97
- end
98
-
99
- #
100
- # Submits a Quota Request for a resource provider at the specified location for
101
- # the specific resource in the parameter.
102
- #
103
- # Submits Quota change request for a resource provider for the specified
104
- # location for the specific resource in the parameter. To use, first make a Get
105
- # request to get quota information. This information consists of a list of
106
- # resources and information regarding those resources. For all the resources in
107
- # that list which require an update to their quotas, update their limit fields
108
- # in the response from the Get request to their new values. Then, submit this
109
- # updated JSON object to this quota request API. This will update the quota to
110
- # the values specified. The location header in the response will be used to
111
- # track the status of the quota request. Please check the provisioningState
112
- # field in the response.
113
- #
114
- # @param subscription_id [String] Azure subscription id.
115
- # @param provider_id [String] Azure resource Provider id.
116
- # @param location [String] Azure region.
117
- # @param resource_name [String] The Resource name for the specific resource
118
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
119
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
120
- # @param if_match [String] ETag of the Entity. ETag should match the current
121
- # entity state from the header response of the GET request or it should be *
122
- # for unconditional update.
123
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
124
- # will be added to the HTTP request.
125
- #
126
- # @return [Object] operation results.
127
- #
128
- def update(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
129
- response = update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
130
- response.body unless response.nil?
131
- end
132
-
133
- #
134
- # @param subscription_id [String] Azure subscription id.
135
- # @param provider_id [String] Azure resource Provider id.
136
- # @param location [String] Azure region.
137
- # @param resource_name [String] The Resource name for the specific resource
138
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
139
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
140
- # @param if_match [String] ETag of the Entity. ETag should match the current
141
- # entity state from the header response of the GET request or it should be *
142
- # for unconditional update.
143
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
- # will be added to the HTTP request.
145
- #
146
- # @return [Concurrent::Promise] promise which provides async access to http
147
- # response.
148
- #
149
- def update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
150
- # Send request
151
- promise = begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers)
152
-
153
- promise = promise.then do |response|
154
- # Defining deserialization method.
155
- deserialize_method = lambda do |parsed_response|
156
- result_mapper = {
157
- client_side_validation: true,
158
- required: false,
159
- serialized_name: 'parsed_response',
160
- type: {
161
- name: 'Object'
162
- }
163
- }
164
- parsed_response = @client.deserialize(result_mapper, parsed_response)
165
- end
166
-
167
- # Waiting for response.
168
- @client.get_long_running_operation_result(response, deserialize_method)
169
- end
170
-
171
- promise
172
- end
173
-
174
- #
175
- # Submits a Quota Request for a resource provider at the specified location for
176
- # the specific resource in the parameter.
177
- #
178
- # Submits Quota change request for a resource provider for the specified
179
- # location for the specific resource in the parameter. To use, first make a Get
180
- # request to get quota information. This information consists of a list of
181
- # resources and information regarding those resources. For all the resources in
182
- # that list which require an update to their quotas, update their limit fields
183
- # in the response from the Get request to their new values. Then, submit this
184
- # updated JSON object to this quota request API. This will update the quota to
185
- # the values specified. The location header in the response will be used to
186
- # track the status of the quota request. Please check the provisioningState
187
- # field in the response.
188
- #
189
- # @param subscription_id [String] Azure subscription id.
190
- # @param provider_id [String] Azure resource Provider id.
191
- # @param location [String] Azure region.
192
- # @param resource_name [String] The Resource name for the specific resource
193
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
194
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
195
- # @param if_match [String] ETag of the Entity. ETag should match the current
196
- # entity state from the header response of the GET request or it should be *
197
- # for unconditional update.
198
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
199
- # will be added to the HTTP request.
200
- #
201
- # @return [Object] operation results.
202
- #
203
- def begin_create(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
204
- response = begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
205
- response.body unless response.nil?
206
- end
207
-
208
- #
209
- # Submits a Quota Request for a resource provider at the specified location for
210
- # the specific resource in the parameter.
211
- #
212
- # Submits Quota change request for a resource provider for the specified
213
- # location for the specific resource in the parameter. To use, first make a Get
214
- # request to get quota information. This information consists of a list of
215
- # resources and information regarding those resources. For all the resources in
216
- # that list which require an update to their quotas, update their limit fields
217
- # in the response from the Get request to their new values. Then, submit this
218
- # updated JSON object to this quota request API. This will update the quota to
219
- # the values specified. The location header in the response will be used to
220
- # track the status of the quota request. Please check the provisioningState
221
- # field in the response.
222
- #
223
- # @param subscription_id [String] Azure subscription id.
224
- # @param provider_id [String] Azure resource Provider id.
225
- # @param location [String] Azure region.
226
- # @param resource_name [String] The Resource name for the specific resource
227
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
228
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
229
- # @param if_match [String] ETag of the Entity. ETag should match the current
230
- # entity state from the header response of the GET request or it should be *
231
- # for unconditional update.
232
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
233
- # will be added to the HTTP request.
234
- #
235
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
236
- #
237
- def begin_create_with_http_info(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
238
- begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
239
- end
240
-
241
- #
242
- # Submits a Quota Request for a resource provider at the specified location for
243
- # the specific resource in the parameter.
244
- #
245
- # Submits Quota change request for a resource provider for the specified
246
- # location for the specific resource in the parameter. To use, first make a Get
247
- # request to get quota information. This information consists of a list of
248
- # resources and information regarding those resources. For all the resources in
249
- # that list which require an update to their quotas, update their limit fields
250
- # in the response from the Get request to their new values. Then, submit this
251
- # updated JSON object to this quota request API. This will update the quota to
252
- # the values specified. The location header in the response will be used to
253
- # track the status of the quota request. Please check the provisioningState
254
- # field in the response.
255
- #
256
- # @param subscription_id [String] Azure subscription id.
257
- # @param provider_id [String] Azure resource Provider id.
258
- # @param location [String] Azure region.
259
- # @param resource_name [String] The Resource name for the specific resource
260
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
261
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
262
- # @param if_match [String] ETag of the Entity. ETag should match the current
263
- # entity state from the header response of the GET request or it should be *
264
- # for unconditional update.
265
- # @param [Hash{String => String}] A hash of custom headers that will be added
266
- # to the HTTP request.
267
- #
268
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
269
- #
270
- def begin_create_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
271
- fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
272
- fail ArgumentError, 'provider_id is nil' if provider_id.nil?
273
- fail ArgumentError, 'location is nil' if location.nil?
274
- fail ArgumentError, 'resource_name is nil' if resource_name.nil?
275
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
276
- fail ArgumentError, 'create_quota_request is nil' if create_quota_request.nil?
277
- fail ArgumentError, 'if_match is nil' if if_match.nil?
278
-
279
-
280
- request_headers = {}
281
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
282
-
283
- # Set Headers
284
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
285
- request_headers['If-Match'] = if_match unless if_match.nil?
286
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
287
-
288
- # Serialize Request
289
- request_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::CurrentQuotaLimitBase.mapper()
290
- request_content = @client.serialize(request_mapper, create_quota_request)
291
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
292
-
293
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}'
294
-
295
- request_url = @base_url || @client.base_url
296
-
297
- options = {
298
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
299
- path_params: {'subscriptionId' => subscription_id,'providerId' => provider_id,'location' => location,'resourceName' => resource_name},
300
- query_params: {'api-version' => @client.api_version},
301
- body: request_content,
302
- headers: request_headers.merge(custom_headers || {}),
303
- base_url: request_url
304
- }
305
- promise = @client.make_request_async(:put, path_template, options)
306
-
307
- promise = promise.then do |result|
308
- http_response = result.response
309
- status_code = http_response.status
310
- response_content = http_response.body
311
- unless status_code == 200 || status_code == 201
312
- error_model = JSON.load(response_content)
313
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
314
- end
315
-
316
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
317
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
318
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
319
- # Deserialize Response
320
- if status_code == 200
321
- begin
322
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
323
- result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestOneResourceSubmitResponse.mapper()
324
- result.body = @client.deserialize(result_mapper, parsed_response)
325
- rescue Exception => e
326
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
327
- end
328
- end
329
- # Deserialize Response
330
- if status_code == 201
331
- begin
332
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
333
- result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestSubmitResponse201.mapper()
334
- result.body = @client.deserialize(result_mapper, parsed_response)
335
- rescue Exception => e
336
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
337
- end
338
- end
339
-
340
- result
341
- end
342
-
343
- promise.execute
344
- end
345
-
346
- #
347
- # Submits a Quota Request for a resource provider at the specified location for
348
- # the specific resource in the parameter.
349
- #
350
- # Submits Quota change request for a resource provider for the specified
351
- # location for the specific resource in the parameter. To use, first make a Get
352
- # request to get quota information. This information consists of a list of
353
- # resources and information regarding those resources. For all the resources in
354
- # that list which require an update to their quotas, update their limit fields
355
- # in the response from the Get request to their new values. Then, submit this
356
- # updated JSON object to this quota request API. This will update the quota to
357
- # the values specified. The location header in the response will be used to
358
- # track the status of the quota request. Please check the provisioningState
359
- # field in the response.
360
- #
361
- # @param subscription_id [String] Azure subscription id.
362
- # @param provider_id [String] Azure resource Provider id.
363
- # @param location [String] Azure region.
364
- # @param resource_name [String] The Resource name for the specific resource
365
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
366
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
367
- # @param if_match [String] ETag of the Entity. ETag should match the current
368
- # entity state from the header response of the GET request or it should be *
369
- # for unconditional update.
370
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
371
- # will be added to the HTTP request.
372
- #
373
- # @return [Object] operation results.
374
- #
375
- def begin_update(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
376
- response = begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
377
- response.body unless response.nil?
378
- end
379
-
380
- #
381
- # Submits a Quota Request for a resource provider at the specified location for
382
- # the specific resource in the parameter.
383
- #
384
- # Submits Quota change request for a resource provider for the specified
385
- # location for the specific resource in the parameter. To use, first make a Get
386
- # request to get quota information. This information consists of a list of
387
- # resources and information regarding those resources. For all the resources in
388
- # that list which require an update to their quotas, update their limit fields
389
- # in the response from the Get request to their new values. Then, submit this
390
- # updated JSON object to this quota request API. This will update the quota to
391
- # the values specified. The location header in the response will be used to
392
- # track the status of the quota request. Please check the provisioningState
393
- # field in the response.
394
- #
395
- # @param subscription_id [String] Azure subscription id.
396
- # @param provider_id [String] Azure resource Provider id.
397
- # @param location [String] Azure region.
398
- # @param resource_name [String] The Resource name for the specific resource
399
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
400
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
401
- # @param if_match [String] ETag of the Entity. ETag should match the current
402
- # entity state from the header response of the GET request or it should be *
403
- # for unconditional update.
404
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
405
- # will be added to the HTTP request.
406
- #
407
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
408
- #
409
- def begin_update_with_http_info(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
410
- begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:custom_headers).value!
411
- end
412
-
413
- #
414
- # Submits a Quota Request for a resource provider at the specified location for
415
- # the specific resource in the parameter.
416
- #
417
- # Submits Quota change request for a resource provider for the specified
418
- # location for the specific resource in the parameter. To use, first make a Get
419
- # request to get quota information. This information consists of a list of
420
- # resources and information regarding those resources. For all the resources in
421
- # that list which require an update to their quotas, update their limit fields
422
- # in the response from the Get request to their new values. Then, submit this
423
- # updated JSON object to this quota request API. This will update the quota to
424
- # the values specified. The location header in the response will be used to
425
- # track the status of the quota request. Please check the provisioningState
426
- # field in the response.
427
- #
428
- # @param subscription_id [String] Azure subscription id.
429
- # @param provider_id [String] Azure resource Provider id.
430
- # @param location [String] Azure region.
431
- # @param resource_name [String] The Resource name for the specific resource
432
- # provider, such as SKU name for Microsoft.Compute, pool for Microsoft.Batch.
433
- # @param create_quota_request [CurrentQuotaLimitBase] Quota requests payload.
434
- # @param if_match [String] ETag of the Entity. ETag should match the current
435
- # entity state from the header response of the GET request or it should be *
436
- # for unconditional update.
437
- # @param [Hash{String => String}] A hash of custom headers that will be added
438
- # to the HTTP request.
439
- #
440
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
441
- #
442
- def begin_update_async(subscription_id, provider_id, location, resource_name, create_quota_request, if_match, custom_headers:nil)
443
- fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
444
- fail ArgumentError, 'provider_id is nil' if provider_id.nil?
445
- fail ArgumentError, 'location is nil' if location.nil?
446
- fail ArgumentError, 'resource_name is nil' if resource_name.nil?
447
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
448
- fail ArgumentError, 'create_quota_request is nil' if create_quota_request.nil?
449
- fail ArgumentError, 'if_match is nil' if if_match.nil?
450
-
451
-
452
- request_headers = {}
453
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
454
-
455
- # Set Headers
456
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
457
- request_headers['If-Match'] = if_match unless if_match.nil?
458
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
459
-
460
- # Serialize Request
461
- request_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::CurrentQuotaLimitBase.mapper()
462
- request_content = @client.serialize(request_mapper, create_quota_request)
463
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
464
-
465
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Capacity/resourceProviders/{providerId}/locations/{location}/serviceLimits/{resourceName}'
466
-
467
- request_url = @base_url || @client.base_url
468
-
469
- options = {
470
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
471
- path_params: {'subscriptionId' => subscription_id,'providerId' => provider_id,'location' => location,'resourceName' => resource_name},
472
- query_params: {'api-version' => @client.api_version},
473
- body: request_content,
474
- headers: request_headers.merge(custom_headers || {}),
475
- base_url: request_url
476
- }
477
- promise = @client.make_request_async(:patch, path_template, options)
478
-
479
- promise = promise.then do |result|
480
- http_response = result.response
481
- status_code = http_response.status
482
- response_content = http_response.body
483
- unless status_code == 200 || status_code == 201
484
- error_model = JSON.load(response_content)
485
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
486
- end
487
-
488
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
489
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
490
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
491
- # Deserialize Response
492
- if status_code == 200
493
- begin
494
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
495
- result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestOneResourceSubmitResponse.mapper()
496
- result.body = @client.deserialize(result_mapper, parsed_response)
497
- rescue Exception => e
498
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
499
- end
500
- end
501
- # Deserialize Response
502
- if status_code == 201
503
- begin
504
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
505
- result_mapper = Azure::Reservations::Mgmt::V2019_07_19_preview::Models::QuotaRequestSubmitResponse201.mapper()
506
- result.body = @client.deserialize(result_mapper, parsed_response)
507
- rescue Exception => e
508
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
509
- end
510
- end
511
-
512
- result
513
- end
514
-
515
- promise.execute
516
- end
517
-
518
- end
519
- end