azure_mgmt_sql 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  3. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  4. data/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +18 -16
  5. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +219 -0
  6. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_instance_administrators.rb +26 -39
  7. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +15 -1
  8. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy_list_result.rb +100 -0
  9. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +2 -2
  10. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb +15 -1
  11. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb +15 -1
  12. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb +15 -1
  13. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy_list_result.rb +100 -0
  14. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb +214 -0
  15. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  16. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +2 -2
  17. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  18. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/models/managed_instance_vulnerability_assessment.rb +2 -2
  19. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/models/server_vulnerability_assessment.rb +2 -2
  20. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  21. data/lib/profiles/latest/modules/sql_profile_module.rb +56 -48
  22. data/lib/version.rb +1 -1
  23. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1694f6c41bf640466ed233b22788f88dd7d07e76ce58833784ae8c919d47046
4
- data.tar.gz: 1339bbc4efdc0eb53c3e66ef033043018b6a431c3be3db9ef6db723c18bc5d60
3
+ metadata.gz: b500aedd91c3dfbb21f65cbb574b81e75ed3cca3a6ac5c69591f06495d92cde9
4
+ data.tar.gz: 426347624926d0a8a6444cdb8eb57c34297968fe285fec5a2154955b32ecc98d
5
5
  SHA512:
6
- metadata.gz: 6a1d7dbaf0f5fb99eb85970718c975ad6fee61775fb621a4244f992640d6fd9f6894bc4c13f248946b2d5d90e024ceb420596a5d65bc385edb416c9cf0b31ee4
7
- data.tar.gz: e2a3ede1a8bc1661abf170811a2732641b0eeb54f533656d812e4b489ae7ccfd0745d37a707e3f069875acc5bc3ed9e3b1454040e775dc05215ed734ff5cfce6
6
+ metadata.gz: a4ce55e116949989ab80714548997bb13b221c6c977330d43511c92ff361600c740e6cd96c8c6975fc437fe968ae39c544c4e760615ed0f117bef12e2f9824e1
7
+ data.tar.gz: d1bb1b21abab8bfea1a69820c2e0672db4704f8e340933ee0fa0670c94be0eb6fc8b3fbefecbfa04bb48872f76be81ad152a629829b440732400b82be3d3ea55
@@ -281,7 +281,7 @@ module Azure::SQL::Mgmt::V2014_04_01
281
281
  #
282
282
  def add_telemetry
283
283
  sdk_information = 'azure_mgmt_sql'
284
- sdk_information = "#{sdk_information}/0.18.0"
284
+ sdk_information = "#{sdk_information}/0.19.0"
285
285
  add_user_agent_information(sdk_information)
286
286
  end
287
287
  end
@@ -194,7 +194,7 @@ module Azure::SQL::Mgmt::V2015_05_01_preview
194
194
  #
195
195
  def add_telemetry
196
196
  sdk_information = 'azure_mgmt_sql'
197
- sdk_information = "#{sdk_information}/0.18.0"
197
+ sdk_information = "#{sdk_information}/0.19.0"
198
198
  add_user_agent_information(sdk_information)
199
199
  end
200
200
  end
@@ -55,46 +55,48 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
55
55
  autoload :SqlManagementClient, '2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb'
56
56
 
57
57
  module Models
58
- autoload :JobStepListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb'
59
- autoload :RestorePointListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb'
58
+ autoload :JobExecutionTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb'
59
+ autoload :LogicalServerSecurityAlertPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/logical_server_security_alert_policy_list_result.rb'
60
+ autoload :AutomaticTuningServerOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb'
61
+ autoload :ManagedDatabaseSecurityAlertPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_security_alert_policy_list_result.rb'
62
+ autoload :ServerBlobAuditingPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy_list_result.rb'
60
63
  autoload :JobAgentListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb'
61
- autoload :SensitivityLabelListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_list_result.rb'
64
+ autoload :DatabaseBlobAuditingPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy_list_result.rb'
62
65
  autoload :JobAgentUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb'
63
66
  autoload :Resource, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb'
64
- autoload :RestorableDroppedManagedDatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/restorable_dropped_managed_database_list_result.rb'
65
- autoload :ManagedDatabaseSecurityAlertPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_security_alert_policy_list_result.rb'
67
+ autoload :LongTermRetentionBackupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb'
68
+ autoload :ManagedDatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb'
66
69
  autoload :JobCredentialListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb'
67
70
  autoload :Sku, '2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb'
68
- autoload :JobExecutionTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb'
71
+ autoload :ManagedServerSecurityAlertPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_server_security_alert_policy_list_result.rb'
69
72
  autoload :DatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb'
70
- autoload :ResourceMoveDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb'
73
+ autoload :CreateDatabaseRestorePointDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb'
71
74
  autoload :ImportExportDatabaseDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb'
72
75
  autoload :JobExecutionListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb'
73
76
  autoload :DatabaseVulnerabilityAssessmentRuleBaselineItem, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb'
74
77
  autoload :JobSchedule, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb'
75
78
  autoload :VulnerabilityAssessmentRecurringScansProperties, '2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb'
76
- autoload :ManagedDatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb'
79
+ autoload :RestorePointListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb'
77
80
  autoload :DatabaseVulnerabilityAssessmentListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_list_result.rb'
78
81
  autoload :JobListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb'
79
- autoload :ManagedInstanceAdministratorListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_instance_administrator_list_result.rb'
82
+ autoload :ServerDnsAliasListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb'
80
83
  autoload :JobStepAction, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb'
81
84
  autoload :JobVersionListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb'
82
85
  autoload :DatabaseOperationListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb'
83
86
  autoload :JobStepOutput, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb'
84
87
  autoload :DatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb'
85
88
  autoload :JobStepExecutionOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb'
86
- autoload :ServerDnsAliasListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb'
87
- autoload :ManagedDatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb'
88
- autoload :CreateDatabaseRestorePointDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb'
89
89
  autoload :CompleteDatabaseRestoreDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb'
90
- autoload :LogicalServerSecurityAlertPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/logical_server_security_alert_policy_list_result.rb'
90
+ autoload :RestorableDroppedManagedDatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/restorable_dropped_managed_database_list_result.rb'
91
+ autoload :JobStepListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb'
92
+ autoload :ManagedDatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb'
91
93
  autoload :JobTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb'
92
- autoload :AutomaticTuningServerOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb'
93
94
  autoload :ManagedBackupShortTermRetentionPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_backup_short_term_retention_policy_list_result.rb'
95
+ autoload :ManagedInstanceAdministratorListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_instance_administrator_list_result.rb'
94
96
  autoload :ServerDnsAliasAcquisition, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb'
95
97
  autoload :JobTargetGroupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb'
96
- autoload :ManagedServerSecurityAlertPolicyListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_server_security_alert_policy_list_result.rb'
97
- autoload :LongTermRetentionBackupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb'
98
+ autoload :ResourceMoveDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb'
99
+ autoload :SensitivityLabelListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_list_result.rb'
98
100
  autoload :ProxyResource, '2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb'
99
101
  autoload :ExtendedDatabaseBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb'
100
102
  autoload :ExtendedServerBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb'
@@ -258,5 +258,224 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
258
258
  promise.execute
259
259
  end
260
260
 
261
+ #
262
+ # Lists auditing settings of a database.
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group that
265
+ # contains the resource. You can obtain this value from the Azure Resource
266
+ # Manager API or the portal.
267
+ # @param server_name [String] The name of the server.
268
+ # @param database_name [String] The name of the database.
269
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
+ # will be added to the HTTP request.
271
+ #
272
+ # @return [Array<DatabaseBlobAuditingPolicy>] operation results.
273
+ #
274
+ def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil)
275
+ first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:custom_headers)
276
+ first_page.get_all_items
277
+ end
278
+
279
+ #
280
+ # Lists auditing settings of a database.
281
+ #
282
+ # @param resource_group_name [String] The name of the resource group that
283
+ # contains the resource. You can obtain this value from the Azure Resource
284
+ # Manager API or the portal.
285
+ # @param server_name [String] The name of the server.
286
+ # @param database_name [String] The name of the database.
287
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
288
+ # will be added to the HTTP request.
289
+ #
290
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
291
+ #
292
+ def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
293
+ list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
294
+ end
295
+
296
+ #
297
+ # Lists auditing settings of a database.
298
+ #
299
+ # @param resource_group_name [String] The name of the resource group that
300
+ # contains the resource. You can obtain this value from the Azure Resource
301
+ # Manager API or the portal.
302
+ # @param server_name [String] The name of the server.
303
+ # @param database_name [String] The name of the database.
304
+ # @param [Hash{String => String}] A hash of custom headers that will be added
305
+ # to the HTTP request.
306
+ #
307
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
308
+ #
309
+ def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil)
310
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
311
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
312
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
313
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
314
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
315
+
316
+
317
+ request_headers = {}
318
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
319
+
320
+ # Set Headers
321
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
322
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
323
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings'
324
+
325
+ request_url = @base_url || @client.base_url
326
+
327
+ options = {
328
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
329
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id},
330
+ query_params: {'api-version' => @client.api_version},
331
+ headers: request_headers.merge(custom_headers || {}),
332
+ base_url: request_url
333
+ }
334
+ promise = @client.make_request_async(:get, path_template, options)
335
+
336
+ promise = promise.then do |result|
337
+ http_response = result.response
338
+ status_code = http_response.status
339
+ response_content = http_response.body
340
+ unless status_code == 200
341
+ error_model = JSON.load(response_content)
342
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
343
+ end
344
+
345
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
346
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
347
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
348
+ # Deserialize Response
349
+ if status_code == 200
350
+ begin
351
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
352
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicyListResult.mapper()
353
+ result.body = @client.deserialize(result_mapper, parsed_response)
354
+ rescue Exception => e
355
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
356
+ end
357
+ end
358
+
359
+ result
360
+ end
361
+
362
+ promise.execute
363
+ end
364
+
365
+ #
366
+ # Lists auditing settings of a database.
367
+ #
368
+ # @param next_page_link [String] The NextLink from the previous successful call
369
+ # to List operation.
370
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
371
+ # will be added to the HTTP request.
372
+ #
373
+ # @return [DatabaseBlobAuditingPolicyListResult] operation results.
374
+ #
375
+ def list_by_database_next(next_page_link, custom_headers:nil)
376
+ response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
377
+ response.body unless response.nil?
378
+ end
379
+
380
+ #
381
+ # Lists auditing settings of a database.
382
+ #
383
+ # @param next_page_link [String] The NextLink from the previous successful call
384
+ # to List operation.
385
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
386
+ # will be added to the HTTP request.
387
+ #
388
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
389
+ #
390
+ def list_by_database_next_with_http_info(next_page_link, custom_headers:nil)
391
+ list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
392
+ end
393
+
394
+ #
395
+ # Lists auditing settings of a database.
396
+ #
397
+ # @param next_page_link [String] The NextLink from the previous successful call
398
+ # to List operation.
399
+ # @param [Hash{String => String}] A hash of custom headers that will be added
400
+ # to the HTTP request.
401
+ #
402
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
403
+ #
404
+ def list_by_database_next_async(next_page_link, custom_headers:nil)
405
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
406
+
407
+
408
+ request_headers = {}
409
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
410
+
411
+ # Set Headers
412
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
413
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
414
+ path_template = '{nextLink}'
415
+
416
+ request_url = @base_url || @client.base_url
417
+
418
+ options = {
419
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
420
+ skip_encoding_path_params: {'nextLink' => next_page_link},
421
+ headers: request_headers.merge(custom_headers || {}),
422
+ base_url: request_url
423
+ }
424
+ promise = @client.make_request_async(:get, path_template, options)
425
+
426
+ promise = promise.then do |result|
427
+ http_response = result.response
428
+ status_code = http_response.status
429
+ response_content = http_response.body
430
+ unless status_code == 200
431
+ error_model = JSON.load(response_content)
432
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
433
+ end
434
+
435
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
436
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
437
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
438
+ # Deserialize Response
439
+ if status_code == 200
440
+ begin
441
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
442
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicyListResult.mapper()
443
+ result.body = @client.deserialize(result_mapper, parsed_response)
444
+ rescue Exception => e
445
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
446
+ end
447
+ end
448
+
449
+ result
450
+ end
451
+
452
+ promise.execute
453
+ end
454
+
455
+ #
456
+ # Lists auditing settings of a database.
457
+ #
458
+ # @param resource_group_name [String] The name of the resource group that
459
+ # contains the resource. You can obtain this value from the Azure Resource
460
+ # Manager API or the portal.
461
+ # @param server_name [String] The name of the server.
462
+ # @param database_name [String] The name of the database.
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [DatabaseBlobAuditingPolicyListResult] which provide lazy access to
467
+ # pages of the response.
468
+ #
469
+ def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:nil)
470
+ response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
471
+ unless response.nil?
472
+ page = response.body
473
+ page.next_method = Proc.new do |next_page_link|
474
+ list_by_database_next_async(next_page_link, custom_headers:custom_headers)
475
+ end
476
+ page
477
+ end
478
+ end
479
+
261
480
  end
262
481
  end
@@ -131,14 +131,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
131
131
  # contains the resource. You can obtain this value from the Azure Resource
132
132
  # Manager API or the portal.
133
133
  # @param managed_instance_name [String] The name of the managed instance.
134
- # @param administrator_name [String] The administrator name.
135
134
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
135
  # will be added to the HTTP request.
137
136
  #
138
137
  # @return [ManagedInstanceAdministrator] operation results.
139
138
  #
140
- def get(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
141
- response = get_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:custom_headers).value!
139
+ def get(resource_group_name, managed_instance_name, custom_headers:nil)
140
+ response = get_async(resource_group_name, managed_instance_name, custom_headers:custom_headers).value!
142
141
  response.body unless response.nil?
143
142
  end
144
143
 
@@ -149,14 +148,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
149
148
  # contains the resource. You can obtain this value from the Azure Resource
150
149
  # Manager API or the portal.
151
150
  # @param managed_instance_name [String] The name of the managed instance.
152
- # @param administrator_name [String] The administrator name.
153
151
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
152
  # will be added to the HTTP request.
155
153
  #
156
154
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
155
  #
158
- def get_with_http_info(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
159
- get_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:custom_headers).value!
156
+ def get_with_http_info(resource_group_name, managed_instance_name, custom_headers:nil)
157
+ get_async(resource_group_name, managed_instance_name, custom_headers:custom_headers).value!
160
158
  end
161
159
 
162
160
  #
@@ -166,16 +164,15 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
166
164
  # contains the resource. You can obtain this value from the Azure Resource
167
165
  # Manager API or the portal.
168
166
  # @param managed_instance_name [String] The name of the managed instance.
169
- # @param administrator_name [String] The administrator name.
170
167
  # @param [Hash{String => String}] A hash of custom headers that will be added
171
168
  # to the HTTP request.
172
169
  #
173
170
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
174
171
  #
175
- def get_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
172
+ def get_async(resource_group_name, managed_instance_name, custom_headers:nil)
176
173
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
177
174
  fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil?
178
- fail ArgumentError, 'administrator_name is nil' if administrator_name.nil?
175
+ administrator_name = 'ActiveDirectory'
179
176
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
180
177
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
181
178
 
@@ -235,7 +232,6 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
235
232
  # contains the resource. You can obtain this value from the Azure Resource
236
233
  # Manager API or the portal.
237
234
  # @param managed_instance_name [String] The name of the managed instance.
238
- # @param administrator_name [String] The requested administrator name.
239
235
  # @param parameters [ManagedInstanceAdministrator] The requested administrator
240
236
  # parameters.
241
237
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -243,8 +239,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
243
239
  #
244
240
  # @return [ManagedInstanceAdministrator] operation results.
245
241
  #
246
- def create_or_update(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:nil)
247
- response = create_or_update_async(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:custom_headers).value!
242
+ def create_or_update(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
243
+ response = create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers:custom_headers).value!
248
244
  response.body unless response.nil?
249
245
  end
250
246
 
@@ -253,7 +249,6 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
253
249
  # contains the resource. You can obtain this value from the Azure Resource
254
250
  # Manager API or the portal.
255
251
  # @param managed_instance_name [String] The name of the managed instance.
256
- # @param administrator_name [String] The requested administrator name.
257
252
  # @param parameters [ManagedInstanceAdministrator] The requested administrator
258
253
  # parameters.
259
254
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -262,9 +257,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
262
257
  # @return [Concurrent::Promise] promise which provides async access to http
263
258
  # response.
264
259
  #
265
- def create_or_update_async(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:nil)
260
+ def create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
266
261
  # Send request
267
- promise = begin_create_or_update_async(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:custom_headers)
262
+ promise = begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers:custom_headers)
268
263
 
269
264
  promise = promise.then do |response|
270
265
  # Defining deserialization method.
@@ -287,12 +282,11 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
287
282
  # contains the resource. You can obtain this value from the Azure Resource
288
283
  # Manager API or the portal.
289
284
  # @param managed_instance_name [String] The name of the managed instance.
290
- # @param administrator_name [String] The administrator name.
291
285
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
292
286
  # will be added to the HTTP request.
293
287
  #
294
- def delete(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
295
- response = delete_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:custom_headers).value!
288
+ def delete(resource_group_name, managed_instance_name, custom_headers:nil)
289
+ response = delete_async(resource_group_name, managed_instance_name, custom_headers:custom_headers).value!
296
290
  nil
297
291
  end
298
292
 
@@ -301,16 +295,15 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
301
295
  # contains the resource. You can obtain this value from the Azure Resource
302
296
  # Manager API or the portal.
303
297
  # @param managed_instance_name [String] The name of the managed instance.
304
- # @param administrator_name [String] The administrator name.
305
298
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
299
  # will be added to the HTTP request.
307
300
  #
308
301
  # @return [Concurrent::Promise] promise which provides async access to http
309
302
  # response.
310
303
  #
311
- def delete_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
304
+ def delete_async(resource_group_name, managed_instance_name, custom_headers:nil)
312
305
  # Send request
313
- promise = begin_delete_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:custom_headers)
306
+ promise = begin_delete_async(resource_group_name, managed_instance_name, custom_headers:custom_headers)
314
307
 
315
308
  promise = promise.then do |response|
316
309
  # Defining deserialization method.
@@ -331,7 +324,6 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
331
324
  # contains the resource. You can obtain this value from the Azure Resource
332
325
  # Manager API or the portal.
333
326
  # @param managed_instance_name [String] The name of the managed instance.
334
- # @param administrator_name [String] The requested administrator name.
335
327
  # @param parameters [ManagedInstanceAdministrator] The requested administrator
336
328
  # parameters.
337
329
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -339,8 +331,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
339
331
  #
340
332
  # @return [ManagedInstanceAdministrator] operation results.
341
333
  #
342
- def begin_create_or_update(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:nil)
343
- response = begin_create_or_update_async(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:custom_headers).value!
334
+ def begin_create_or_update(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
335
+ response = begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers:custom_headers).value!
344
336
  response.body unless response.nil?
345
337
  end
346
338
 
@@ -351,7 +343,6 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
351
343
  # contains the resource. You can obtain this value from the Azure Resource
352
344
  # Manager API or the portal.
353
345
  # @param managed_instance_name [String] The name of the managed instance.
354
- # @param administrator_name [String] The requested administrator name.
355
346
  # @param parameters [ManagedInstanceAdministrator] The requested administrator
356
347
  # parameters.
357
348
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -359,8 +350,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
359
350
  #
360
351
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
361
352
  #
362
- def begin_create_or_update_with_http_info(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:nil)
363
- begin_create_or_update_async(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:custom_headers).value!
353
+ def begin_create_or_update_with_http_info(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
354
+ begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers:custom_headers).value!
364
355
  end
365
356
 
366
357
  #
@@ -370,7 +361,6 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
370
361
  # contains the resource. You can obtain this value from the Azure Resource
371
362
  # Manager API or the portal.
372
363
  # @param managed_instance_name [String] The name of the managed instance.
373
- # @param administrator_name [String] The requested administrator name.
374
364
  # @param parameters [ManagedInstanceAdministrator] The requested administrator
375
365
  # parameters.
376
366
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -378,10 +368,10 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
378
368
  #
379
369
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
380
370
  #
381
- def begin_create_or_update_async(resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers:nil)
371
+ def begin_create_or_update_async(resource_group_name, managed_instance_name, parameters, custom_headers:nil)
382
372
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
383
373
  fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil?
384
- fail ArgumentError, 'administrator_name is nil' if administrator_name.nil?
374
+ administrator_name = 'ActiveDirectory'
385
375
  fail ArgumentError, 'parameters is nil' if parameters.nil?
386
376
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
387
377
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -459,13 +449,12 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
459
449
  # contains the resource. You can obtain this value from the Azure Resource
460
450
  # Manager API or the portal.
461
451
  # @param managed_instance_name [String] The name of the managed instance.
462
- # @param administrator_name [String] The administrator name.
463
452
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
453
  # will be added to the HTTP request.
465
454
  #
466
455
  #
467
- def begin_delete(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
468
- response = begin_delete_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:custom_headers).value!
456
+ def begin_delete(resource_group_name, managed_instance_name, custom_headers:nil)
457
+ response = begin_delete_async(resource_group_name, managed_instance_name, custom_headers:custom_headers).value!
469
458
  nil
470
459
  end
471
460
 
@@ -476,14 +465,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
476
465
  # contains the resource. You can obtain this value from the Azure Resource
477
466
  # Manager API or the portal.
478
467
  # @param managed_instance_name [String] The name of the managed instance.
479
- # @param administrator_name [String] The administrator name.
480
468
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
481
469
  # will be added to the HTTP request.
482
470
  #
483
471
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
484
472
  #
485
- def begin_delete_with_http_info(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
486
- begin_delete_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:custom_headers).value!
473
+ def begin_delete_with_http_info(resource_group_name, managed_instance_name, custom_headers:nil)
474
+ begin_delete_async(resource_group_name, managed_instance_name, custom_headers:custom_headers).value!
487
475
  end
488
476
 
489
477
  #
@@ -493,16 +481,15 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
493
481
  # contains the resource. You can obtain this value from the Azure Resource
494
482
  # Manager API or the portal.
495
483
  # @param managed_instance_name [String] The name of the managed instance.
496
- # @param administrator_name [String] The administrator name.
497
484
  # @param [Hash{String => String}] A hash of custom headers that will be added
498
485
  # to the HTTP request.
499
486
  #
500
487
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
501
488
  #
502
- def begin_delete_async(resource_group_name, managed_instance_name, administrator_name, custom_headers:nil)
489
+ def begin_delete_async(resource_group_name, managed_instance_name, custom_headers:nil)
503
490
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
504
491
  fail ArgumentError, 'managed_instance_name is nil' if managed_instance_name.nil?
505
- fail ArgumentError, 'administrator_name is nil' if administrator_name.nil?
492
+ administrator_name = 'ActiveDirectory'
506
493
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
507
494
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
508
495