azure_mgmt_sqlvirtualmachine 0.17.0 → 0.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine.rb +15 -10
  3. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/availability_group_listeners.rb +10 -0
  4. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/additional_features_server_configurations.rb +0 -11
  5. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/availability_group_listener.rb +1 -1
  6. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/availability_group_listener_list_result.rb +1 -1
  7. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/load_balancer_configuration.rb +1 -1
  8. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/operation_list_result.rb +1 -1
  9. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_management_mode.rb +17 -0
  10. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_server_license_type.rb +1 -0
  11. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_storage_update_settings.rb +11 -0
  12. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine.rb +27 -5
  13. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group.rb +3 -3
  14. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_group_list_result.rb +1 -1
  15. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_virtual_machine_list_result.rb +1 -1
  16. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sql_vm_group_image_sku.rb +16 -0
  17. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/sqlstorage_settings.rb +65 -0
  18. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/storage_configuration_settings.rb +95 -0
  19. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/models/storage_workload_type.rb +17 -0
  20. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/operations.rb +4 -0
  21. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_groups.rb +16 -0
  22. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machine_management_client.rb +1 -1
  23. data/lib/2017-03-01-preview/generated/azure_mgmt_sqlvirtualmachine/sql_virtual_machines.rb +329 -95
  24. data/lib/profiles/latest/modules/sqlvirtualmachine_profile_module.rb +53 -33
  25. data/lib/version.rb +1 -1
  26. metadata +10 -5
@@ -0,0 +1,17 @@
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::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for StorageWorkloadType
10
+ #
11
+ module StorageWorkloadType
12
+ GENERAL = "GENERAL"
13
+ OLTP = "OLTP"
14
+ DW = "DW"
15
+ end
16
+ end
17
+ end
@@ -90,6 +90,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
90
90
  end
91
91
 
92
92
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
93
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
94
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
93
95
  # Deserialize Response
94
96
  if status_code == 200
95
97
  begin
@@ -178,6 +180,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
178
180
  end
179
181
 
180
182
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
183
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
184
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
181
185
  # Deserialize Response
182
186
  if status_code == 200
183
187
  begin
@@ -109,6 +109,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
109
109
  end
110
110
 
111
111
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
112
114
  # Deserialize Response
113
115
  if status_code == 200
114
116
  begin
@@ -349,6 +351,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
349
351
  end
350
352
 
351
353
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
354
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
355
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
352
356
  # Deserialize Response
353
357
  if status_code == 200
354
358
  begin
@@ -433,6 +437,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
433
437
  end
434
438
 
435
439
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
440
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
441
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
436
442
  # Deserialize Response
437
443
  if status_code == 200
438
444
  begin
@@ -545,6 +551,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
545
551
  end
546
552
 
547
553
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
554
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
555
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
548
556
  # Deserialize Response
549
557
  if status_code == 200
550
558
  begin
@@ -655,6 +663,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
655
663
  end
656
664
 
657
665
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
666
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
667
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
658
668
 
659
669
  result
660
670
  end
@@ -760,6 +770,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
760
770
  end
761
771
 
762
772
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
773
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
774
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
763
775
  # Deserialize Response
764
776
  if status_code == 200
765
777
  begin
@@ -848,6 +860,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
848
860
  end
849
861
 
850
862
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
863
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
864
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
851
865
  # Deserialize Response
852
866
  if status_code == 200
853
867
  begin
@@ -936,6 +950,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
936
950
  end
937
951
 
938
952
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
953
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
954
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
939
955
  # Deserialize Response
940
956
  if status_code == 200
941
957
  begin
@@ -136,7 +136,7 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
136
136
  #
137
137
  def add_telemetry
138
138
  sdk_information = 'azure_mgmt_sqlvirtualmachine'
139
- sdk_information = "#{sdk_information}/0.17.0"
139
+ sdk_information = "#{sdk_information}/0.18.2"
140
140
  add_user_agent_information(sdk_information)
141
141
  end
142
142
  end
@@ -25,6 +25,195 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
25
25
  # @return [SqlVirtualMachineManagementClient] reference to the SqlVirtualMachineManagementClient
26
26
  attr_reader :client
27
27
 
28
+ #
29
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
30
+ #
31
+ # @param resource_group_name [String] Name of the resource group that contains
32
+ # the resource. You can obtain this value from the Azure Resource Manager API
33
+ # or the portal.
34
+ # @param sql_virtual_machine_group_name [String] Name of the SQL virtual
35
+ # machine group.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [Array<SqlVirtualMachine>] operation results.
40
+ #
41
+ def list_by_sql_vm_group(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
42
+ first_page = list_by_sql_vm_group_as_lazy(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers)
43
+ first_page.get_all_items
44
+ end
45
+
46
+ #
47
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
48
+ #
49
+ # @param resource_group_name [String] Name of the resource group that contains
50
+ # the resource. You can obtain this value from the Azure Resource Manager API
51
+ # or the portal.
52
+ # @param sql_virtual_machine_group_name [String] Name of the SQL virtual
53
+ # machine group.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def list_by_sql_vm_group_with_http_info(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
60
+ list_by_sql_vm_group_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
65
+ #
66
+ # @param resource_group_name [String] Name of the resource group that contains
67
+ # the resource. You can obtain this value from the Azure Resource Manager API
68
+ # or the portal.
69
+ # @param sql_virtual_machine_group_name [String] Name of the SQL virtual
70
+ # machine group.
71
+ # @param [Hash{String => String}] A hash of custom headers that will be added
72
+ # to the HTTP request.
73
+ #
74
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
75
+ #
76
+ def list_by_sql_vm_group_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
77
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
+ fail ArgumentError, 'sql_virtual_machine_group_name is nil' if sql_virtual_machine_group_name.nil?
79
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
80
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'resourceGroupName' => resource_group_name,'sqlVirtualMachineGroupName' => sql_virtual_machine_group_name,'subscriptionId' => @client.subscription_id},
96
+ query_params: {'api-version' => @client.api_version},
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:get, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::SqlVirtualMachineListResult.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Gets all SQL virtual machines in a subscription.
133
+ #
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
137
+ # @return [Array<SqlVirtualMachine>] operation results.
138
+ #
139
+ def list(custom_headers:nil)
140
+ first_page = list_as_lazy(custom_headers:custom_headers)
141
+ first_page.get_all_items
142
+ end
143
+
144
+ #
145
+ # Gets all SQL virtual machines in a subscription.
146
+ #
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
+ #
152
+ def list_with_http_info(custom_headers:nil)
153
+ list_async(custom_headers:custom_headers).value!
154
+ end
155
+
156
+ #
157
+ # Gets all SQL virtual machines in a subscription.
158
+ #
159
+ # @param [Hash{String => String}] A hash of custom headers that will be added
160
+ # to the HTTP request.
161
+ #
162
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
163
+ #
164
+ def list_async(custom_headers:nil)
165
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
166
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
167
+
168
+
169
+ request_headers = {}
170
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
171
+
172
+ # Set Headers
173
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
174
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
175
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'
176
+
177
+ request_url = @base_url || @client.base_url
178
+
179
+ options = {
180
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
181
+ path_params: {'subscriptionId' => @client.subscription_id},
182
+ query_params: {'api-version' => @client.api_version},
183
+ headers: request_headers.merge(custom_headers || {}),
184
+ base_url: request_url
185
+ }
186
+ promise = @client.make_request_async(:get, path_template, options)
187
+
188
+ promise = promise.then do |result|
189
+ http_response = result.response
190
+ status_code = http_response.status
191
+ response_content = http_response.body
192
+ unless status_code == 200
193
+ error_model = JSON.load(response_content)
194
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
195
+ end
196
+
197
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
198
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
199
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
200
+ # Deserialize Response
201
+ if status_code == 200
202
+ begin
203
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
204
+ result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::SqlVirtualMachineListResult.mapper()
205
+ result.body = @client.deserialize(result_mapper, parsed_response)
206
+ rescue Exception => e
207
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
208
+ end
209
+ end
210
+
211
+ result
212
+ end
213
+
214
+ promise.execute
215
+ end
216
+
28
217
  #
29
218
  # Gets a SQL virtual machine.
30
219
  #
@@ -109,6 +298,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
109
298
  end
110
299
 
111
300
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
301
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
302
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
112
303
  # Deserialize Response
113
304
  if status_code == 200
114
305
  begin
@@ -341,90 +532,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
341
532
  end
342
533
 
343
534
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
344
- # Deserialize Response
345
- if status_code == 200
346
- begin
347
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
348
- result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::SqlVirtualMachineListResult.mapper()
349
- result.body = @client.deserialize(result_mapper, parsed_response)
350
- rescue Exception => e
351
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
352
- end
353
- end
354
-
355
- result
356
- end
357
-
358
- promise.execute
359
- end
360
-
361
- #
362
- # Gets all SQL virtual machines in a subscription.
363
- #
364
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
365
- # will be added to the HTTP request.
366
- #
367
- # @return [Array<SqlVirtualMachine>] operation results.
368
- #
369
- def list(custom_headers:nil)
370
- first_page = list_as_lazy(custom_headers:custom_headers)
371
- first_page.get_all_items
372
- end
373
-
374
- #
375
- # Gets all SQL virtual machines in a subscription.
376
- #
377
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
378
- # will be added to the HTTP request.
379
- #
380
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
381
- #
382
- def list_with_http_info(custom_headers:nil)
383
- list_async(custom_headers:custom_headers).value!
384
- end
385
-
386
- #
387
- # Gets all SQL virtual machines in a subscription.
388
- #
389
- # @param [Hash{String => String}] A hash of custom headers that will be added
390
- # to the HTTP request.
391
- #
392
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
393
- #
394
- def list_async(custom_headers:nil)
395
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
396
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
397
-
398
-
399
- request_headers = {}
400
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
401
-
402
- # Set Headers
403
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
404
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
405
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines'
406
-
407
- request_url = @base_url || @client.base_url
408
-
409
- options = {
410
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
411
- path_params: {'subscriptionId' => @client.subscription_id},
412
- query_params: {'api-version' => @client.api_version},
413
- headers: request_headers.merge(custom_headers || {}),
414
- base_url: request_url
415
- }
416
- promise = @client.make_request_async(:get, path_template, options)
417
-
418
- promise = promise.then do |result|
419
- http_response = result.response
420
- status_code = http_response.status
421
- response_content = http_response.body
422
- unless status_code == 200
423
- error_model = JSON.load(response_content)
424
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
425
- end
426
-
427
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
535
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
536
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
428
537
  # Deserialize Response
429
538
  if status_code == 200
430
539
  begin
@@ -534,6 +643,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
534
643
  end
535
644
 
536
645
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
646
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
647
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
537
648
  # Deserialize Response
538
649
  if status_code == 200
539
650
  begin
@@ -641,6 +752,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
641
752
  end
642
753
 
643
754
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
755
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
756
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
644
757
 
645
758
  result
646
759
  end
@@ -740,6 +853,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
740
853
  end
741
854
 
742
855
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
856
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
857
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
743
858
  # Deserialize Response
744
859
  if status_code == 200
745
860
  begin
@@ -758,7 +873,7 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
758
873
  end
759
874
 
760
875
  #
761
- # Gets all SQL virtual machines in a resource group.
876
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
762
877
  #
763
878
  # @param next_page_link [String] The NextLink from the previous successful call
764
879
  # to List operation.
@@ -767,13 +882,13 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
767
882
  #
768
883
  # @return [SqlVirtualMachineListResult] operation results.
769
884
  #
770
- def list_by_resource_group_next(next_page_link, custom_headers:nil)
771
- response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
885
+ def list_by_sql_vm_group_next(next_page_link, custom_headers:nil)
886
+ response = list_by_sql_vm_group_next_async(next_page_link, custom_headers:custom_headers).value!
772
887
  response.body unless response.nil?
773
888
  end
774
889
 
775
890
  #
776
- # Gets all SQL virtual machines in a resource group.
891
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
777
892
  #
778
893
  # @param next_page_link [String] The NextLink from the previous successful call
779
894
  # to List operation.
@@ -782,12 +897,12 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
782
897
  #
783
898
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
784
899
  #
785
- def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
786
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
900
+ def list_by_sql_vm_group_next_with_http_info(next_page_link, custom_headers:nil)
901
+ list_by_sql_vm_group_next_async(next_page_link, custom_headers:custom_headers).value!
787
902
  end
788
903
 
789
904
  #
790
- # Gets all SQL virtual machines in a resource group.
905
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
791
906
  #
792
907
  # @param next_page_link [String] The NextLink from the previous successful call
793
908
  # to List operation.
@@ -796,7 +911,7 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
796
911
  #
797
912
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
798
913
  #
799
- def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
914
+ def list_by_sql_vm_group_next_async(next_page_link, custom_headers:nil)
800
915
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
801
916
 
802
917
 
@@ -828,6 +943,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
828
943
  end
829
944
 
830
945
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
946
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
947
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
831
948
  # Deserialize Response
832
949
  if status_code == 200
833
950
  begin
@@ -916,6 +1033,8 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
916
1033
  end
917
1034
 
918
1035
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1036
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1037
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
919
1038
  # Deserialize Response
920
1039
  if status_code == 200
921
1040
  begin
@@ -936,21 +1055,113 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
936
1055
  #
937
1056
  # Gets all SQL virtual machines in a resource group.
938
1057
  #
1058
+ # @param next_page_link [String] The NextLink from the previous successful call
1059
+ # to List operation.
1060
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1061
+ # will be added to the HTTP request.
1062
+ #
1063
+ # @return [SqlVirtualMachineListResult] operation results.
1064
+ #
1065
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1066
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1067
+ response.body unless response.nil?
1068
+ end
1069
+
1070
+ #
1071
+ # Gets all SQL virtual machines in a resource group.
1072
+ #
1073
+ # @param next_page_link [String] The NextLink from the previous successful call
1074
+ # to List operation.
1075
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1076
+ # will be added to the HTTP request.
1077
+ #
1078
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1079
+ #
1080
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1081
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1082
+ end
1083
+
1084
+ #
1085
+ # Gets all SQL virtual machines in a resource group.
1086
+ #
1087
+ # @param next_page_link [String] The NextLink from the previous successful call
1088
+ # to List operation.
1089
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1090
+ # to the HTTP request.
1091
+ #
1092
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1093
+ #
1094
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1095
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1096
+
1097
+
1098
+ request_headers = {}
1099
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1100
+
1101
+ # Set Headers
1102
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1103
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1104
+ path_template = '{nextLink}'
1105
+
1106
+ request_url = @base_url || @client.base_url
1107
+
1108
+ options = {
1109
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1110
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1111
+ headers: request_headers.merge(custom_headers || {}),
1112
+ base_url: request_url
1113
+ }
1114
+ promise = @client.make_request_async(:get, path_template, options)
1115
+
1116
+ promise = promise.then do |result|
1117
+ http_response = result.response
1118
+ status_code = http_response.status
1119
+ response_content = http_response.body
1120
+ unless status_code == 200
1121
+ error_model = JSON.load(response_content)
1122
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1123
+ end
1124
+
1125
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1126
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1127
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1128
+ # Deserialize Response
1129
+ if status_code == 200
1130
+ begin
1131
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1132
+ result_mapper = Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview::Models::SqlVirtualMachineListResult.mapper()
1133
+ result.body = @client.deserialize(result_mapper, parsed_response)
1134
+ rescue Exception => e
1135
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1136
+ end
1137
+ end
1138
+
1139
+ result
1140
+ end
1141
+
1142
+ promise.execute
1143
+ end
1144
+
1145
+ #
1146
+ # Gets the list of sql virtual machines in a SQL virtual machine group.
1147
+ #
939
1148
  # @param resource_group_name [String] Name of the resource group that contains
940
1149
  # the resource. You can obtain this value from the Azure Resource Manager API
941
1150
  # or the portal.
1151
+ # @param sql_virtual_machine_group_name [String] Name of the SQL virtual
1152
+ # machine group.
942
1153
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
1154
  # will be added to the HTTP request.
944
1155
  #
945
1156
  # @return [SqlVirtualMachineListResult] which provide lazy access to pages of
946
1157
  # the response.
947
1158
  #
948
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
949
- response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1159
+ def list_by_sql_vm_group_as_lazy(resource_group_name, sql_virtual_machine_group_name, custom_headers:nil)
1160
+ response = list_by_sql_vm_group_async(resource_group_name, sql_virtual_machine_group_name, custom_headers:custom_headers).value!
950
1161
  unless response.nil?
951
1162
  page = response.body
952
1163
  page.next_method = Proc.new do |next_page_link|
953
- list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1164
+ list_by_sql_vm_group_next_async(next_page_link, custom_headers:custom_headers)
954
1165
  end
955
1166
  page
956
1167
  end
@@ -976,5 +1187,28 @@ module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
976
1187
  end
977
1188
  end
978
1189
 
1190
+ #
1191
+ # Gets all SQL virtual machines in a resource group.
1192
+ #
1193
+ # @param resource_group_name [String] Name of the resource group that contains
1194
+ # the resource. You can obtain this value from the Azure Resource Manager API
1195
+ # or the portal.
1196
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1197
+ # will be added to the HTTP request.
1198
+ #
1199
+ # @return [SqlVirtualMachineListResult] which provide lazy access to pages of
1200
+ # the response.
1201
+ #
1202
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1203
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1204
+ unless response.nil?
1205
+ page = response.body
1206
+ page.next_method = Proc.new do |next_page_link|
1207
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1208
+ end
1209
+ page
1210
+ end
1211
+ end
1212
+
979
1213
  end
980
1214
  end