azure_mgmt_sql 0.17.3 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +6 -0
  3. data/lib/2014-04-01/generated/azure_mgmt_sql/backup_long_term_retention_vaults.rb +6 -0
  4. data/lib/2014-04-01/generated/azure_mgmt_sql/capabilities.rb +2 -0
  5. data/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_policies.rb +4 -0
  6. data/lib/2014-04-01/generated/azure_mgmt_sql/data_masking_rules.rb +4 -0
  7. data/lib/2014-04-01/generated/azure_mgmt_sql/database_advisors.rb +6 -0
  8. data/lib/2014-04-01/generated/azure_mgmt_sql/database_connection_policies.rb +4 -0
  9. data/lib/2014-04-01/generated/azure_mgmt_sql/database_table_auditing_policies.rb +6 -0
  10. data/lib/2014-04-01/generated/azure_mgmt_sql/database_threat_detection_policies.rb +4 -0
  11. data/lib/2014-04-01/generated/azure_mgmt_sql/database_usages.rb +2 -0
  12. data/lib/2014-04-01/generated/azure_mgmt_sql/databases.rb +32 -0
  13. data/lib/2014-04-01/generated/azure_mgmt_sql/disaster_recovery_configurations.rb +12 -0
  14. data/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_activities.rb +2 -0
  15. data/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pool_database_activities.rb +2 -0
  16. data/lib/2014-04-01/generated/azure_mgmt_sql/elastic_pools.rb +14 -0
  17. data/lib/2014-04-01/generated/azure_mgmt_sql/extensions.rb +2 -0
  18. data/lib/2014-04-01/generated/azure_mgmt_sql/firewall_rules.rb +8 -0
  19. data/lib/2014-04-01/generated/azure_mgmt_sql/geo_backup_policies.rb +6 -0
  20. data/lib/2014-04-01/generated/azure_mgmt_sql/operations.rb +2 -0
  21. data/lib/2014-04-01/generated/azure_mgmt_sql/queries.rb +2 -0
  22. data/lib/2014-04-01/generated/azure_mgmt_sql/query_statistics.rb +2 -0
  23. data/lib/2014-04-01/generated/azure_mgmt_sql/query_texts.rb +2 -0
  24. data/lib/2014-04-01/generated/azure_mgmt_sql/recommended_elastic_pools.rb +6 -0
  25. data/lib/2014-04-01/generated/azure_mgmt_sql/recoverable_databases.rb +4 -0
  26. data/lib/2014-04-01/generated/azure_mgmt_sql/replication_links.rb +10 -0
  27. data/lib/2014-04-01/generated/azure_mgmt_sql/restorable_dropped_databases.rb +4 -0
  28. data/lib/2014-04-01/generated/azure_mgmt_sql/restore_points.rb +2 -0
  29. data/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb +8 -0
  30. data/lib/2014-04-01/generated/azure_mgmt_sql/server_azure_adadministrators.rb +8 -0
  31. data/lib/2014-04-01/generated/azure_mgmt_sql/server_communication_links.rb +8 -0
  32. data/lib/2014-04-01/generated/azure_mgmt_sql/server_connection_policies.rb +4 -0
  33. data/lib/2014-04-01/generated/azure_mgmt_sql/server_table_auditing_policies.rb +6 -0
  34. data/lib/2014-04-01/generated/azure_mgmt_sql/server_usages.rb +2 -0
  35. data/lib/2014-04-01/generated/azure_mgmt_sql/servers.rb +14 -0
  36. data/lib/2014-04-01/generated/azure_mgmt_sql/service_objectives.rb +4 -0
  37. data/lib/2014-04-01/generated/azure_mgmt_sql/service_tier_advisors.rb +4 -0
  38. data/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  39. data/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_activities.rb +2 -0
  40. data/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryption_configurations.rb +2 -0
  41. data/lib/2014-04-01/generated/azure_mgmt_sql/transparent_data_encryptions.rb +4 -0
  42. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_advisors.rb +6 -0
  43. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb +4 -0
  44. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +4 -0
  45. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_recommended_actions.rb +6 -0
  46. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/encryption_protectors.rb +140 -0
  47. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/failover_groups.rb +16 -0
  48. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb +12 -0
  49. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb +16 -210
  50. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +2 -2
  51. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/encryption_protector.rb +1 -0
  52. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb +7 -11
  53. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/operations.rb +4 -0
  54. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_advisors.rb +6 -0
  55. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/server_keys.rb +10 -0
  56. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/servers.rb +16 -0
  57. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  58. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/subscription_usages.rb +6 -0
  59. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_agents.rb +16 -0
  60. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_groups.rb +30 -0
  61. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sync_members.rb +18 -0
  62. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_clusters.rb +14 -0
  63. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/virtual_network_rules.rb +10 -0
  64. data/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +26 -23
  65. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +6 -0
  66. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb +2 -0
  67. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +4 -0
  68. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb +6 -0
  69. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb +6 -0
  70. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb +10 -0
  71. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb +24 -0
  72. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb +4 -0
  73. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb +4 -0
  74. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb +12 -0
  75. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb +10 -0
  76. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb +16 -0
  77. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb +6 -0
  78. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb +16 -0
  79. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb +10 -0
  80. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb +10 -0
  81. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb +6 -0
  82. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb +10 -0
  83. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb +1086 -92
  84. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_backup_short_term_retention_policies.rb +10 -0
  85. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_database_security_alert_policies.rb +8 -0
  86. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb +14 -0
  87. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_instance_administrators.rb +663 -0
  88. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_restorable_dropped_database_backup_short_term_retention_policies.rb +10 -0
  89. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_server_security_alert_policies.rb +8 -0
  90. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +2 -2
  91. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb +2 -2
  92. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb +2 -2
  93. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_instance_administrator.rb +109 -0
  94. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_instance_administrator_list_result.rb +101 -0
  95. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb +2 -2
  96. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb +7 -11
  97. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/restorable_dropped_managed_databases.rb +6 -0
  98. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb +8 -0
  99. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sensitivity_labels.rb +18 -0
  100. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb +4 -0
  101. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb +4 -0
  102. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb +12 -0
  103. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb +8 -0
  104. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +5 -1
  105. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/backup_short_term_retention_policies.rb +10 -0
  106. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/capabilities.rb +2 -0
  107. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_operations.rb +6 -0
  108. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb +10 -0
  109. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/databases.rb +158 -134
  110. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pool_operations.rb +6 -0
  111. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb +12 -0
  112. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/instance_failover_groups.rb +14 -0
  113. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessment_rule_baselines.rb +6 -0
  114. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessment_scans.rb +10 -0
  115. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_database_vulnerability_assessments.rb +10 -0
  116. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_encryption_protectors.rb +140 -0
  117. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_keys.rb +10 -0
  118. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb +2 -0
  119. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database.rb +48 -5
  120. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_status.rb +1 -0
  121. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_update.rb +48 -5
  122. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sku.rb +7 -11
  123. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/recoverable_managed_databases.rb +6 -0
  124. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  125. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/tde_certificates.rb +2 -0
  126. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_columns.rb +6 -0
  127. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_schemas.rb +6 -0
  128. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_security_alert_policies.rb +8 -0
  129. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/database_tables.rb +6 -0
  130. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/instance_pools.rb +16 -0
  131. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_database_columns.rb +6 -0
  132. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_database_schemas.rb +6 -0
  133. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_database_sensitivity_labels.rb +18 -0
  134. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_database_tables.rb +6 -0
  135. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/managed_instance_vulnerability_assessments.rb +10 -0
  136. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/models/sku.rb +7 -11
  137. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/server_vulnerability_assessments.rb +10 -0
  138. data/lib/2018-06-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +1 -1
  139. data/lib/azure_mgmt_sql.rb +1 -1
  140. data/lib/profiles/latest/modules/sql_profile_module.rb +67 -57
  141. data/lib/version.rb +1 -1
  142. metadata +8 -5
@@ -153,6 +153,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
153
153
  end
154
154
 
155
155
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
156
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
157
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
156
158
  # Deserialize Response
157
159
  if status_code == 200
158
160
  begin
@@ -267,6 +269,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
267
269
  end
268
270
 
269
271
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
272
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
273
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
270
274
  # Deserialize Response
271
275
  if status_code == 200
272
276
  begin
@@ -355,6 +359,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
355
359
  end
356
360
 
357
361
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
362
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
363
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
358
364
  # Deserialize Response
359
365
  if status_code == 200
360
366
  begin
@@ -117,6 +117,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
117
117
  end
118
118
 
119
119
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
121
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
120
122
  # Deserialize Response
121
123
  if status_code == 200
122
124
  begin
@@ -231,6 +233,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
231
233
  end
232
234
 
233
235
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
236
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
237
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
234
238
  # Deserialize Response
235
239
  if status_code == 200
236
240
  begin
@@ -337,6 +341,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
337
341
  end
338
342
 
339
343
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
344
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
345
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
340
346
  # Deserialize Response
341
347
  if status_code == 200
342
348
  begin
@@ -447,6 +453,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
447
453
  end
448
454
 
449
455
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
456
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
457
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
450
458
  # Deserialize Response
451
459
  if status_code == 200
452
460
  begin
@@ -568,6 +576,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
568
576
  end
569
577
 
570
578
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
579
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
580
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
571
581
  # Deserialize Response
572
582
  if status_code == 200
573
583
  begin
@@ -687,6 +697,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
687
697
  end
688
698
 
689
699
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
700
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
701
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
690
702
 
691
703
  result
692
704
  end
@@ -765,6 +777,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
765
777
  end
766
778
 
767
779
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
780
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
781
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
768
782
  # Deserialize Response
769
783
  if status_code == 200
770
784
  begin
@@ -853,6 +867,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
853
867
  end
854
868
 
855
869
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
870
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
871
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
856
872
  # Deserialize Response
857
873
  if status_code == 200
858
874
  begin
@@ -153,6 +153,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
153
153
  end
154
154
 
155
155
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
156
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
157
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
156
158
  # Deserialize Response
157
159
  if status_code == 200
158
160
  begin
@@ -303,6 +305,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
303
305
  end
304
306
 
305
307
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
308
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
309
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
306
310
  # Deserialize Response
307
311
  if status_code == 200
308
312
  begin
@@ -421,6 +425,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
421
425
  end
422
426
 
423
427
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
428
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
429
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
424
430
  # Deserialize Response
425
431
  if status_code == 200
426
432
  begin
@@ -509,6 +515,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
509
515
  end
510
516
 
511
517
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
518
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
519
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
512
520
  # Deserialize Response
513
521
  if status_code == 200
514
522
  begin
@@ -597,6 +605,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
597
605
  end
598
606
 
599
607
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
608
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
609
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
600
610
  # Deserialize Response
601
611
  if status_code == 200
602
612
  begin
@@ -109,6 +109,8 @@ module Azure::SQL::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
@@ -215,6 +217,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
215
217
  end
216
218
 
217
219
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
220
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
221
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
218
222
  # Deserialize Response
219
223
  if status_code == 200
220
224
  begin
@@ -332,6 +336,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
332
336
  end
333
337
 
334
338
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
339
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
340
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
335
341
  # Deserialize Response
336
342
  if status_code == 200
337
343
  begin
@@ -447,6 +453,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
447
453
  end
448
454
 
449
455
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
456
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
457
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
450
458
 
451
459
  result
452
460
  end
@@ -525,6 +533,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
525
533
  end
526
534
 
527
535
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
536
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
537
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
528
538
  # Deserialize Response
529
539
  if status_code == 200
530
540
  begin
@@ -113,6 +113,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
113
113
  end
114
114
 
115
115
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
116
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
117
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
116
118
  # Deserialize Response
117
119
  if status_code == 200
118
120
  begin
@@ -223,6 +225,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
223
225
  end
224
226
 
225
227
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
228
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
229
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
226
230
  # Deserialize Response
227
231
  if status_code == 200
228
232
  begin
@@ -311,6 +315,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
311
315
  end
312
316
 
313
317
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
318
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
319
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
314
320
  # Deserialize Response
315
321
  if status_code == 200
316
322
  begin
@@ -109,6 +109,8 @@ module Azure::SQL::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
@@ -215,6 +217,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
215
217
  end
216
218
 
217
219
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
220
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
221
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
218
222
  # Deserialize Response
219
223
  if status_code == 200
220
224
  begin
@@ -332,6 +336,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
332
336
  end
333
337
 
334
338
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
339
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
340
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
335
341
  # Deserialize Response
336
342
  if status_code == 200
337
343
  begin
@@ -447,6 +453,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
447
453
  end
448
454
 
449
455
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
456
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
457
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
450
458
 
451
459
  result
452
460
  end
@@ -525,6 +533,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
525
533
  end
526
534
 
527
535
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
536
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
537
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
528
538
  # Deserialize Response
529
539
  if status_code == 200
530
540
  begin
@@ -27,6 +27,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
27
27
  #
28
28
  # Gets a long term retention backup.
29
29
  #
30
+ # @param resource_group_name [String] The name of the resource group that
31
+ # contains the resource. You can obtain this value from the Azure Resource
32
+ # Manager API or the portal.
30
33
  # @param location_name [String] The location of the database.
31
34
  # @param long_term_retention_server_name [String] The name of the server
32
35
  # @param long_term_retention_database_name [String] The name of the database
@@ -36,14 +39,17 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
36
39
  #
37
40
  # @return [LongTermRetentionBackup] operation results.
38
41
  #
39
- def get(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
40
- response = get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
42
+ def get_by_resource_group(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
43
+ response = get_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
41
44
  response.body unless response.nil?
42
45
  end
43
46
 
44
47
  #
45
48
  # Gets a long term retention backup.
46
49
  #
50
+ # @param resource_group_name [String] The name of the resource group that
51
+ # contains the resource. You can obtain this value from the Azure Resource
52
+ # Manager API or the portal.
47
53
  # @param location_name [String] The location of the database.
48
54
  # @param long_term_retention_server_name [String] The name of the server
49
55
  # @param long_term_retention_database_name [String] The name of the database
@@ -53,13 +59,16 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
53
59
  #
54
60
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
61
  #
56
- def get_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
57
- get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
62
+ def get_by_resource_group_with_http_info(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
63
+ get_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
58
64
  end
59
65
 
60
66
  #
61
67
  # Gets a long term retention backup.
62
68
  #
69
+ # @param resource_group_name [String] The name of the resource group that
70
+ # contains the resource. You can obtain this value from the Azure Resource
71
+ # Manager API or the portal.
63
72
  # @param location_name [String] The location of the database.
64
73
  # @param long_term_retention_server_name [String] The name of the server
65
74
  # @param long_term_retention_database_name [String] The name of the database
@@ -69,7 +78,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
69
78
  #
70
79
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
80
  #
72
- def get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
81
+ def get_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
82
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
83
  fail ArgumentError, 'location_name is nil' if location_name.nil?
74
84
  fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
75
85
  fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
@@ -84,13 +94,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
84
94
  # Set Headers
85
95
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
96
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'
97
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'
88
98
 
89
99
  request_url = @base_url || @client.base_url
90
100
 
91
101
  options = {
92
102
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
- path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id},
103
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id},
94
104
  query_params: {'api-version' => @client.api_version},
95
105
  headers: request_headers.merge(custom_headers || {}),
96
106
  base_url: request_url
@@ -107,6 +117,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
107
117
  end
108
118
 
109
119
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
121
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
122
  # Deserialize Response
111
123
  if status_code == 200
112
124
  begin
@@ -127,6 +139,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
127
139
  #
128
140
  # Deletes a long term retention backup.
129
141
  #
142
+ # @param resource_group_name [String] The name of the resource group that
143
+ # contains the resource. You can obtain this value from the Azure Resource
144
+ # Manager API or the portal.
130
145
  # @param location_name [String] The location of the database
131
146
  # @param long_term_retention_server_name [String] The name of the server
132
147
  # @param long_term_retention_database_name [String] The name of the database
@@ -134,12 +149,15 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
134
149
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
150
  # will be added to the HTTP request.
136
151
  #
137
- def delete(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
138
- response = delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
152
+ def delete_by_resource_group(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
153
+ response = delete_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
139
154
  nil
140
155
  end
141
156
 
142
157
  #
158
+ # @param resource_group_name [String] The name of the resource group that
159
+ # contains the resource. You can obtain this value from the Azure Resource
160
+ # Manager API or the portal.
143
161
  # @param location_name [String] The location of the database
144
162
  # @param long_term_retention_server_name [String] The name of the server
145
163
  # @param long_term_retention_database_name [String] The name of the database
@@ -150,9 +168,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
150
168
  # @return [Concurrent::Promise] promise which provides async access to http
151
169
  # response.
152
170
  #
153
- def delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
171
+ def delete_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
154
172
  # Send request
155
- promise = begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers)
173
+ promise = begin_delete_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers)
156
174
 
157
175
  promise = promise.then do |response|
158
176
  # Defining deserialization method.
@@ -169,6 +187,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
169
187
  #
170
188
  # Lists all long term retention backups for a database.
171
189
  #
190
+ # @param resource_group_name [String] The name of the resource group that
191
+ # contains the resource. You can obtain this value from the Azure Resource
192
+ # Manager API or the portal.
172
193
  # @param location_name [String] The location of the database
173
194
  # @param long_term_retention_server_name [String] The name of the server
174
195
  # @param long_term_retention_database_name [String] The name of the database
@@ -182,14 +203,17 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
182
203
  #
183
204
  # @return [Array<LongTermRetentionBackup>] operation results.
184
205
  #
185
- def list_by_database(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
186
- first_page = list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
206
+ def list_by_resource_group_database(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
207
+ first_page = list_by_resource_group_database_as_lazy(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
187
208
  first_page.get_all_items
188
209
  end
189
210
 
190
211
  #
191
212
  # Lists all long term retention backups for a database.
192
213
  #
214
+ # @param resource_group_name [String] The name of the resource group that
215
+ # contains the resource. You can obtain this value from the Azure Resource
216
+ # Manager API or the portal.
193
217
  # @param location_name [String] The location of the database
194
218
  # @param long_term_retention_server_name [String] The name of the server
195
219
  # @param long_term_retention_database_name [String] The name of the database
@@ -203,13 +227,16 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
203
227
  #
204
228
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
205
229
  #
206
- def list_by_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
207
- list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
230
+ def list_by_resource_group_database_with_http_info(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
231
+ list_by_resource_group_database_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
208
232
  end
209
233
 
210
234
  #
211
235
  # Lists all long term retention backups for a database.
212
236
  #
237
+ # @param resource_group_name [String] The name of the resource group that
238
+ # contains the resource. You can obtain this value from the Azure Resource
239
+ # Manager API or the portal.
213
240
  # @param location_name [String] The location of the database
214
241
  # @param long_term_retention_server_name [String] The name of the server
215
242
  # @param long_term_retention_database_name [String] The name of the database
@@ -223,7 +250,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
223
250
  #
224
251
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
225
252
  #
226
- def list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
253
+ def list_by_resource_group_database_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
254
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
227
255
  fail ArgumentError, 'location_name is nil' if location_name.nil?
228
256
  fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
229
257
  fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
@@ -237,13 +265,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
237
265
  # Set Headers
238
266
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
239
267
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
240
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'
268
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'
241
269
 
242
270
  request_url = @base_url || @client.base_url
243
271
 
244
272
  options = {
245
273
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
246
- path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'subscriptionId' => @client.subscription_id},
274
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'subscriptionId' => @client.subscription_id},
247
275
  query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
248
276
  headers: request_headers.merge(custom_headers || {}),
249
277
  base_url: request_url
@@ -260,6 +288,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
260
288
  end
261
289
 
262
290
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
291
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
292
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
263
293
  # Deserialize Response
264
294
  if status_code == 200
265
295
  begin
@@ -280,6 +310,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
280
310
  #
281
311
  # Lists the long term retention backups for a given location.
282
312
  #
313
+ # @param resource_group_name [String] The name of the resource group that
314
+ # contains the resource. You can obtain this value from the Azure Resource
315
+ # Manager API or the portal.
283
316
  # @param location_name [String] The location of the database
284
317
  # @param only_latest_per_database [Boolean] Whether or not to only get the
285
318
  # latest backup for each database.
@@ -291,14 +324,17 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
291
324
  #
292
325
  # @return [Array<LongTermRetentionBackup>] operation results.
293
326
  #
294
- def list_by_location(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
295
- first_page = list_by_location_as_lazy(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
327
+ def list_by_resource_group_location(resource_group_name, location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
328
+ first_page = list_by_resource_group_location_as_lazy(resource_group_name, location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
296
329
  first_page.get_all_items
297
330
  end
298
331
 
299
332
  #
300
333
  # Lists the long term retention backups for a given location.
301
334
  #
335
+ # @param resource_group_name [String] The name of the resource group that
336
+ # contains the resource. You can obtain this value from the Azure Resource
337
+ # Manager API or the portal.
302
338
  # @param location_name [String] The location of the database
303
339
  # @param only_latest_per_database [Boolean] Whether or not to only get the
304
340
  # latest backup for each database.
@@ -310,13 +346,16 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
310
346
  #
311
347
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
312
348
  #
313
- def list_by_location_with_http_info(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
314
- list_by_location_async(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
349
+ def list_by_resource_group_location_with_http_info(resource_group_name, location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
350
+ list_by_resource_group_location_async(resource_group_name, location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
315
351
  end
316
352
 
317
353
  #
318
354
  # Lists the long term retention backups for a given location.
319
355
  #
356
+ # @param resource_group_name [String] The name of the resource group that
357
+ # contains the resource. You can obtain this value from the Azure Resource
358
+ # Manager API or the portal.
320
359
  # @param location_name [String] The location of the database
321
360
  # @param only_latest_per_database [Boolean] Whether or not to only get the
322
361
  # latest backup for each database.
@@ -328,7 +367,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
328
367
  #
329
368
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
330
369
  #
331
- def list_by_location_async(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
370
+ def list_by_resource_group_location_async(resource_group_name, location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
371
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
332
372
  fail ArgumentError, 'location_name is nil' if location_name.nil?
333
373
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
334
374
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -340,13 +380,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
340
380
  # Set Headers
341
381
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
342
382
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
343
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'
383
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'
344
384
 
345
385
  request_url = @base_url || @client.base_url
346
386
 
347
387
  options = {
348
388
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
349
- path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id},
389
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'subscriptionId' => @client.subscription_id},
350
390
  query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
351
391
  headers: request_headers.merge(custom_headers || {}),
352
392
  base_url: request_url
@@ -363,6 +403,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
363
403
  end
364
404
 
365
405
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
406
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
407
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
366
408
  # Deserialize Response
367
409
  if status_code == 200
368
410
  begin
@@ -383,6 +425,9 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
383
425
  #
384
426
  # Lists the long term retention backups for a given server.
385
427
  #
428
+ # @param resource_group_name [String] The name of the resource group that
429
+ # contains the resource. You can obtain this value from the Azure Resource
430
+ # Manager API or the portal.
386
431
  # @param location_name [String] The location of the database
387
432
  # @param long_term_retention_server_name [String] The name of the server
388
433
  # @param only_latest_per_database [Boolean] Whether or not to only get the
@@ -395,14 +440,17 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
395
440
  #
396
441
  # @return [Array<LongTermRetentionBackup>] operation results.
397
442
  #
398
- def list_by_server(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
399
- first_page = list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
443
+ def list_by_resource_group_server(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
444
+ first_page = list_by_resource_group_server_as_lazy(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
400
445
  first_page.get_all_items
401
446
  end
402
447
 
403
448
  #
404
449
  # Lists the long term retention backups for a given server.
405
450
  #
451
+ # @param resource_group_name [String] The name of the resource group that
452
+ # contains the resource. You can obtain this value from the Azure Resource
453
+ # Manager API or the portal.
406
454
  # @param location_name [String] The location of the database
407
455
  # @param long_term_retention_server_name [String] The name of the server
408
456
  # @param only_latest_per_database [Boolean] Whether or not to only get the
@@ -415,13 +463,16 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
415
463
  #
416
464
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
417
465
  #
418
- def list_by_server_with_http_info(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
419
- list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
466
+ def list_by_resource_group_server_with_http_info(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
467
+ list_by_resource_group_server_async(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
420
468
  end
421
469
 
422
470
  #
423
471
  # Lists the long term retention backups for a given server.
424
472
  #
473
+ # @param resource_group_name [String] The name of the resource group that
474
+ # contains the resource. You can obtain this value from the Azure Resource
475
+ # Manager API or the portal.
425
476
  # @param location_name [String] The location of the database
426
477
  # @param long_term_retention_server_name [String] The name of the server
427
478
  # @param only_latest_per_database [Boolean] Whether or not to only get the
@@ -434,7 +485,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
434
485
  #
435
486
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
436
487
  #
437
- def list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
488
+ def list_by_resource_group_server_async(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
489
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
438
490
  fail ArgumentError, 'location_name is nil' if location_name.nil?
439
491
  fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
440
492
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -447,13 +499,13 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
447
499
  # Set Headers
448
500
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
449
501
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
450
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'
502
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'
451
503
 
452
504
  request_url = @base_url || @client.base_url
453
505
 
454
506
  options = {
455
507
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
456
- path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'subscriptionId' => @client.subscription_id},
508
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'subscriptionId' => @client.subscription_id},
457
509
  query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
458
510
  headers: request_headers.merge(custom_headers || {}),
459
511
  base_url: request_url
@@ -470,6 +522,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
470
522
  end
471
523
 
472
524
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
525
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
526
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
473
527
  # Deserialize Response
474
528
  if status_code == 200
475
529
  begin
@@ -488,25 +542,26 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
488
542
  end
489
543
 
490
544
  #
491
- # Deletes a long term retention backup.
545
+ # Gets a long term retention backup.
492
546
  #
493
- # @param location_name [String] The location of the database
547
+ # @param location_name [String] The location of the database.
494
548
  # @param long_term_retention_server_name [String] The name of the server
495
549
  # @param long_term_retention_database_name [String] The name of the database
496
550
  # @param backup_name [String] The backup name.
497
551
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
498
552
  # will be added to the HTTP request.
499
553
  #
554
+ # @return [LongTermRetentionBackup] operation results.
500
555
  #
501
- def begin_delete(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
502
- response = begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
503
- nil
556
+ def get(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
557
+ response = get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
558
+ response.body unless response.nil?
504
559
  end
505
560
 
506
561
  #
507
- # Deletes a long term retention backup.
562
+ # Gets a long term retention backup.
508
563
  #
509
- # @param location_name [String] The location of the database
564
+ # @param location_name [String] The location of the database.
510
565
  # @param long_term_retention_server_name [String] The name of the server
511
566
  # @param long_term_retention_database_name [String] The name of the database
512
567
  # @param backup_name [String] The backup name.
@@ -515,14 +570,14 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
515
570
  #
516
571
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
517
572
  #
518
- def begin_delete_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
519
- begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
573
+ def get_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
574
+ get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
520
575
  end
521
576
 
522
577
  #
523
- # Deletes a long term retention backup.
578
+ # Gets a long term retention backup.
524
579
  #
525
- # @param location_name [String] The location of the database
580
+ # @param location_name [String] The location of the database.
526
581
  # @param long_term_retention_server_name [String] The name of the server
527
582
  # @param long_term_retention_database_name [String] The name of the database
528
583
  # @param backup_name [String] The backup name.
@@ -531,7 +586,7 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
531
586
  #
532
587
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
533
588
  #
534
- def begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
589
+ def get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
535
590
  fail ArgumentError, 'location_name is nil' if location_name.nil?
536
591
  fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
537
592
  fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
@@ -557,18 +612,30 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
557
612
  headers: request_headers.merge(custom_headers || {}),
558
613
  base_url: request_url
559
614
  }
560
- promise = @client.make_request_async(:delete, path_template, options)
615
+ promise = @client.make_request_async(:get, path_template, options)
561
616
 
562
617
  promise = promise.then do |result|
563
618
  http_response = result.response
564
619
  status_code = http_response.status
565
620
  response_content = http_response.body
566
- unless status_code == 200 || status_code == 202
621
+ unless status_code == 200
567
622
  error_model = JSON.load(response_content)
568
623
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
569
624
  end
570
625
 
571
626
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
627
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
628
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
629
+ # Deserialize Response
630
+ if status_code == 200
631
+ begin
632
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
633
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup.mapper()
634
+ result.body = @client.deserialize(result_mapper, parsed_response)
635
+ rescue Exception => e
636
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
637
+ end
638
+ end
572
639
 
573
640
  result
574
641
  end
@@ -576,47 +643,111 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
576
643
  promise.execute
577
644
  end
578
645
 
646
+ #
647
+ # Deletes a long term retention backup.
648
+ #
649
+ # @param location_name [String] The location of the database
650
+ # @param long_term_retention_server_name [String] The name of the server
651
+ # @param long_term_retention_database_name [String] The name of the database
652
+ # @param backup_name [String] The backup name.
653
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
654
+ # will be added to the HTTP request.
655
+ #
656
+ def delete(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
657
+ response = delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
658
+ nil
659
+ end
660
+
661
+ #
662
+ # @param location_name [String] The location of the database
663
+ # @param long_term_retention_server_name [String] The name of the server
664
+ # @param long_term_retention_database_name [String] The name of the database
665
+ # @param backup_name [String] The backup name.
666
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
667
+ # will be added to the HTTP request.
668
+ #
669
+ # @return [Concurrent::Promise] promise which provides async access to http
670
+ # response.
671
+ #
672
+ def delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
673
+ # Send request
674
+ promise = begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers)
675
+
676
+ promise = promise.then do |response|
677
+ # Defining deserialization method.
678
+ deserialize_method = lambda do |parsed_response|
679
+ end
680
+
681
+ # Waiting for response.
682
+ @client.get_long_running_operation_result(response, deserialize_method)
683
+ end
684
+
685
+ promise
686
+ end
687
+
579
688
  #
580
689
  # Lists all long term retention backups for a database.
581
690
  #
582
- # @param next_page_link [String] The NextLink from the previous successful call
583
- # to List operation.
691
+ # @param location_name [String] The location of the database
692
+ # @param long_term_retention_server_name [String] The name of the server
693
+ # @param long_term_retention_database_name [String] The name of the database
694
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
695
+ # latest backup for each database.
696
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
697
+ # against just live databases, just deleted databases, or all databases.
698
+ # Possible values include: 'All', 'Live', 'Deleted'
584
699
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
585
700
  # will be added to the HTTP request.
586
701
  #
587
- # @return [LongTermRetentionBackupListResult] operation results.
702
+ # @return [Array<LongTermRetentionBackup>] operation results.
588
703
  #
589
- def list_by_database_next(next_page_link, custom_headers:nil)
590
- response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
591
- response.body unless response.nil?
704
+ def list_by_database(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
705
+ first_page = list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
706
+ first_page.get_all_items
592
707
  end
593
708
 
594
709
  #
595
710
  # Lists all long term retention backups for a database.
596
711
  #
597
- # @param next_page_link [String] The NextLink from the previous successful call
598
- # to List operation.
712
+ # @param location_name [String] The location of the database
713
+ # @param long_term_retention_server_name [String] The name of the server
714
+ # @param long_term_retention_database_name [String] The name of the database
715
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
716
+ # latest backup for each database.
717
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
718
+ # against just live databases, just deleted databases, or all databases.
719
+ # Possible values include: 'All', 'Live', 'Deleted'
599
720
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
721
  # will be added to the HTTP request.
601
722
  #
602
723
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
603
724
  #
604
- def list_by_database_next_with_http_info(next_page_link, custom_headers:nil)
605
- list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
725
+ def list_by_database_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
726
+ list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
606
727
  end
607
728
 
608
729
  #
609
730
  # Lists all long term retention backups for a database.
610
731
  #
611
- # @param next_page_link [String] The NextLink from the previous successful call
612
- # to List operation.
732
+ # @param location_name [String] The location of the database
733
+ # @param long_term_retention_server_name [String] The name of the server
734
+ # @param long_term_retention_database_name [String] The name of the database
735
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
736
+ # latest backup for each database.
737
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
738
+ # against just live databases, just deleted databases, or all databases.
739
+ # Possible values include: 'All', 'Live', 'Deleted'
613
740
  # @param [Hash{String => String}] A hash of custom headers that will be added
614
741
  # to the HTTP request.
615
742
  #
616
743
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
617
744
  #
618
- def list_by_database_next_async(next_page_link, custom_headers:nil)
619
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
745
+ def list_by_database_async(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
746
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
747
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
748
+ fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
749
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
750
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
620
751
 
621
752
 
622
753
  request_headers = {}
@@ -625,13 +756,14 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
625
756
  # Set Headers
626
757
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
627
758
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
628
- path_template = '{nextLink}'
759
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups'
629
760
 
630
761
  request_url = @base_url || @client.base_url
631
762
 
632
763
  options = {
633
764
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
634
- skip_encoding_path_params: {'nextLink' => next_page_link},
765
+ path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'subscriptionId' => @client.subscription_id},
766
+ query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
635
767
  headers: request_headers.merge(custom_headers || {}),
636
768
  base_url: request_url
637
769
  }
@@ -647,6 +779,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
647
779
  end
648
780
 
649
781
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
782
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
783
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
650
784
  # Deserialize Response
651
785
  if status_code == 200
652
786
  begin
@@ -667,44 +801,58 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
667
801
  #
668
802
  # Lists the long term retention backups for a given location.
669
803
  #
670
- # @param next_page_link [String] The NextLink from the previous successful call
671
- # to List operation.
804
+ # @param location_name [String] The location of the database
805
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
806
+ # latest backup for each database.
807
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
808
+ # against just live databases, just deleted databases, or all databases.
809
+ # Possible values include: 'All', 'Live', 'Deleted'
672
810
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
673
811
  # will be added to the HTTP request.
674
812
  #
675
- # @return [LongTermRetentionBackupListResult] operation results.
813
+ # @return [Array<LongTermRetentionBackup>] operation results.
676
814
  #
677
- def list_by_location_next(next_page_link, custom_headers:nil)
678
- response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
679
- response.body unless response.nil?
815
+ def list_by_location(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
816
+ first_page = list_by_location_as_lazy(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
817
+ first_page.get_all_items
680
818
  end
681
819
 
682
820
  #
683
821
  # Lists the long term retention backups for a given location.
684
822
  #
685
- # @param next_page_link [String] The NextLink from the previous successful call
686
- # to List operation.
823
+ # @param location_name [String] The location of the database
824
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
825
+ # latest backup for each database.
826
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
827
+ # against just live databases, just deleted databases, or all databases.
828
+ # Possible values include: 'All', 'Live', 'Deleted'
687
829
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
688
830
  # will be added to the HTTP request.
689
831
  #
690
832
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
691
833
  #
692
- def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
693
- list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
834
+ def list_by_location_with_http_info(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
835
+ list_by_location_async(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
694
836
  end
695
837
 
696
838
  #
697
839
  # Lists the long term retention backups for a given location.
698
840
  #
699
- # @param next_page_link [String] The NextLink from the previous successful call
700
- # to List operation.
841
+ # @param location_name [String] The location of the database
842
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
843
+ # latest backup for each database.
844
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
845
+ # against just live databases, just deleted databases, or all databases.
846
+ # Possible values include: 'All', 'Live', 'Deleted'
701
847
  # @param [Hash{String => String}] A hash of custom headers that will be added
702
848
  # to the HTTP request.
703
849
  #
704
850
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
705
851
  #
706
- def list_by_location_next_async(next_page_link, custom_headers:nil)
707
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
852
+ def list_by_location_async(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
853
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
854
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
855
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
708
856
 
709
857
 
710
858
  request_headers = {}
@@ -713,13 +861,14 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
713
861
  # Set Headers
714
862
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
715
863
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
716
- path_template = '{nextLink}'
864
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'
717
865
 
718
866
  request_url = @base_url || @client.base_url
719
867
 
720
868
  options = {
721
869
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
722
- skip_encoding_path_params: {'nextLink' => next_page_link},
870
+ path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id},
871
+ query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
723
872
  headers: request_headers.merge(custom_headers || {}),
724
873
  base_url: request_url
725
874
  }
@@ -735,6 +884,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
735
884
  end
736
885
 
737
886
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
887
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
888
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
738
889
  # Deserialize Response
739
890
  if status_code == 200
740
891
  begin
@@ -755,44 +906,795 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
755
906
  #
756
907
  # Lists the long term retention backups for a given server.
757
908
  #
758
- # @param next_page_link [String] The NextLink from the previous successful call
759
- # to List operation.
909
+ # @param location_name [String] The location of the database
910
+ # @param long_term_retention_server_name [String] The name of the server
911
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
912
+ # latest backup for each database.
913
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
914
+ # against just live databases, just deleted databases, or all databases.
915
+ # Possible values include: 'All', 'Live', 'Deleted'
760
916
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
761
917
  # will be added to the HTTP request.
762
918
  #
763
- # @return [LongTermRetentionBackupListResult] operation results.
919
+ # @return [Array<LongTermRetentionBackup>] operation results.
764
920
  #
765
- def list_by_server_next(next_page_link, custom_headers:nil)
766
- response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value!
767
- response.body unless response.nil?
921
+ def list_by_server(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
922
+ first_page = list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers)
923
+ first_page.get_all_items
768
924
  end
769
925
 
770
926
  #
771
927
  # Lists the long term retention backups for a given server.
772
928
  #
773
- # @param next_page_link [String] The NextLink from the previous successful call
774
- # to List operation.
929
+ # @param location_name [String] The location of the database
930
+ # @param long_term_retention_server_name [String] The name of the server
931
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
932
+ # latest backup for each database.
933
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
934
+ # against just live databases, just deleted databases, or all databases.
935
+ # Possible values include: 'All', 'Live', 'Deleted'
775
936
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
776
937
  # will be added to the HTTP request.
777
938
  #
778
939
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
779
940
  #
780
- def list_by_server_next_with_http_info(next_page_link, custom_headers:nil)
781
- list_by_server_next_async(next_page_link, custom_headers:custom_headers).value!
941
+ def list_by_server_with_http_info(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
942
+ list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
782
943
  end
783
944
 
784
945
  #
785
946
  # Lists the long term retention backups for a given server.
786
947
  #
787
- # @param next_page_link [String] The NextLink from the previous successful call
788
- # to List operation.
948
+ # @param location_name [String] The location of the database
949
+ # @param long_term_retention_server_name [String] The name of the server
950
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
951
+ # latest backup for each database.
952
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
953
+ # against just live databases, just deleted databases, or all databases.
954
+ # Possible values include: 'All', 'Live', 'Deleted'
789
955
  # @param [Hash{String => String}] A hash of custom headers that will be added
790
956
  # to the HTTP request.
791
957
  #
792
958
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
793
959
  #
794
- def list_by_server_next_async(next_page_link, custom_headers:nil)
795
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
960
+ def list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
961
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
962
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
963
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
964
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
965
+
966
+
967
+ request_headers = {}
968
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
969
+
970
+ # Set Headers
971
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
972
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
973
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups'
974
+
975
+ request_url = @base_url || @client.base_url
976
+
977
+ options = {
978
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
979
+ path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'subscriptionId' => @client.subscription_id},
980
+ query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
981
+ headers: request_headers.merge(custom_headers || {}),
982
+ base_url: request_url
983
+ }
984
+ promise = @client.make_request_async(:get, path_template, options)
985
+
986
+ promise = promise.then do |result|
987
+ http_response = result.response
988
+ status_code = http_response.status
989
+ response_content = http_response.body
990
+ unless status_code == 200
991
+ error_model = JSON.load(response_content)
992
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
993
+ end
994
+
995
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
996
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
997
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
998
+ # Deserialize Response
999
+ if status_code == 200
1000
+ begin
1001
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1002
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
1003
+ result.body = @client.deserialize(result_mapper, parsed_response)
1004
+ rescue Exception => e
1005
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1006
+ end
1007
+ end
1008
+
1009
+ result
1010
+ end
1011
+
1012
+ promise.execute
1013
+ end
1014
+
1015
+ #
1016
+ # Deletes a long term retention backup.
1017
+ #
1018
+ # @param resource_group_name [String] The name of the resource group that
1019
+ # contains the resource. You can obtain this value from the Azure Resource
1020
+ # Manager API or the portal.
1021
+ # @param location_name [String] The location of the database
1022
+ # @param long_term_retention_server_name [String] The name of the server
1023
+ # @param long_term_retention_database_name [String] The name of the database
1024
+ # @param backup_name [String] The backup name.
1025
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1026
+ # will be added to the HTTP request.
1027
+ #
1028
+ #
1029
+ def begin_delete_by_resource_group(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
1030
+ response = begin_delete_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
1031
+ nil
1032
+ end
1033
+
1034
+ #
1035
+ # Deletes a long term retention backup.
1036
+ #
1037
+ # @param resource_group_name [String] The name of the resource group that
1038
+ # contains the resource. You can obtain this value from the Azure Resource
1039
+ # Manager API or the portal.
1040
+ # @param location_name [String] The location of the database
1041
+ # @param long_term_retention_server_name [String] The name of the server
1042
+ # @param long_term_retention_database_name [String] The name of the database
1043
+ # @param backup_name [String] The backup name.
1044
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1045
+ # will be added to the HTTP request.
1046
+ #
1047
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1048
+ #
1049
+ def begin_delete_by_resource_group_with_http_info(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
1050
+ begin_delete_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
1051
+ end
1052
+
1053
+ #
1054
+ # Deletes a long term retention backup.
1055
+ #
1056
+ # @param resource_group_name [String] The name of the resource group that
1057
+ # contains the resource. You can obtain this value from the Azure Resource
1058
+ # Manager API or the portal.
1059
+ # @param location_name [String] The location of the database
1060
+ # @param long_term_retention_server_name [String] The name of the server
1061
+ # @param long_term_retention_database_name [String] The name of the database
1062
+ # @param backup_name [String] The backup name.
1063
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1064
+ # to the HTTP request.
1065
+ #
1066
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1067
+ #
1068
+ def begin_delete_by_resource_group_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
1069
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1070
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
1071
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
1072
+ fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
1073
+ fail ArgumentError, 'backup_name is nil' if backup_name.nil?
1074
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1075
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1076
+
1077
+
1078
+ request_headers = {}
1079
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1080
+
1081
+ # Set Headers
1082
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1083
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1084
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'
1085
+
1086
+ request_url = @base_url || @client.base_url
1087
+
1088
+ options = {
1089
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1090
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id},
1091
+ query_params: {'api-version' => @client.api_version},
1092
+ headers: request_headers.merge(custom_headers || {}),
1093
+ base_url: request_url
1094
+ }
1095
+ promise = @client.make_request_async(:delete, path_template, options)
1096
+
1097
+ promise = promise.then do |result|
1098
+ http_response = result.response
1099
+ status_code = http_response.status
1100
+ response_content = http_response.body
1101
+ unless status_code == 200 || status_code == 202
1102
+ error_model = JSON.load(response_content)
1103
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1104
+ end
1105
+
1106
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1107
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1108
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1109
+
1110
+ result
1111
+ end
1112
+
1113
+ promise.execute
1114
+ end
1115
+
1116
+ #
1117
+ # Deletes a long term retention backup.
1118
+ #
1119
+ # @param location_name [String] The location of the database
1120
+ # @param long_term_retention_server_name [String] The name of the server
1121
+ # @param long_term_retention_database_name [String] The name of the database
1122
+ # @param backup_name [String] The backup name.
1123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1124
+ # will be added to the HTTP request.
1125
+ #
1126
+ #
1127
+ def begin_delete(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
1128
+ response = begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
1129
+ nil
1130
+ end
1131
+
1132
+ #
1133
+ # Deletes a long term retention backup.
1134
+ #
1135
+ # @param location_name [String] The location of the database
1136
+ # @param long_term_retention_server_name [String] The name of the server
1137
+ # @param long_term_retention_database_name [String] The name of the database
1138
+ # @param backup_name [String] The backup name.
1139
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1140
+ # will be added to the HTTP request.
1141
+ #
1142
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1143
+ #
1144
+ def begin_delete_with_http_info(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
1145
+ begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:custom_headers).value!
1146
+ end
1147
+
1148
+ #
1149
+ # Deletes a long term retention backup.
1150
+ #
1151
+ # @param location_name [String] The location of the database
1152
+ # @param long_term_retention_server_name [String] The name of the server
1153
+ # @param long_term_retention_database_name [String] The name of the database
1154
+ # @param backup_name [String] The backup name.
1155
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1156
+ # to the HTTP request.
1157
+ #
1158
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1159
+ #
1160
+ def begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
1161
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
1162
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
1163
+ fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
1164
+ fail ArgumentError, 'backup_name is nil' if backup_name.nil?
1165
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1166
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1167
+
1168
+
1169
+ request_headers = {}
1170
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1171
+
1172
+ # Set Headers
1173
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1174
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1175
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'
1176
+
1177
+ request_url = @base_url || @client.base_url
1178
+
1179
+ options = {
1180
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1181
+ path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id},
1182
+ query_params: {'api-version' => @client.api_version},
1183
+ headers: request_headers.merge(custom_headers || {}),
1184
+ base_url: request_url
1185
+ }
1186
+ promise = @client.make_request_async(:delete, path_template, options)
1187
+
1188
+ promise = promise.then do |result|
1189
+ http_response = result.response
1190
+ status_code = http_response.status
1191
+ response_content = http_response.body
1192
+ unless status_code == 200 || status_code == 202
1193
+ error_model = JSON.load(response_content)
1194
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1195
+ end
1196
+
1197
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1198
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1199
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1200
+
1201
+ result
1202
+ end
1203
+
1204
+ promise.execute
1205
+ end
1206
+
1207
+ #
1208
+ # Lists all long term retention backups for a database.
1209
+ #
1210
+ # @param next_page_link [String] The NextLink from the previous successful call
1211
+ # to List operation.
1212
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1213
+ # will be added to the HTTP request.
1214
+ #
1215
+ # @return [LongTermRetentionBackupListResult] operation results.
1216
+ #
1217
+ def list_by_resource_group_database_next(next_page_link, custom_headers:nil)
1218
+ response = list_by_resource_group_database_next_async(next_page_link, custom_headers:custom_headers).value!
1219
+ response.body unless response.nil?
1220
+ end
1221
+
1222
+ #
1223
+ # Lists all long term retention backups for a database.
1224
+ #
1225
+ # @param next_page_link [String] The NextLink from the previous successful call
1226
+ # to List operation.
1227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1228
+ # will be added to the HTTP request.
1229
+ #
1230
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1231
+ #
1232
+ def list_by_resource_group_database_next_with_http_info(next_page_link, custom_headers:nil)
1233
+ list_by_resource_group_database_next_async(next_page_link, custom_headers:custom_headers).value!
1234
+ end
1235
+
1236
+ #
1237
+ # Lists all long term retention backups for a database.
1238
+ #
1239
+ # @param next_page_link [String] The NextLink from the previous successful call
1240
+ # to List operation.
1241
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1242
+ # to the HTTP request.
1243
+ #
1244
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1245
+ #
1246
+ def list_by_resource_group_database_next_async(next_page_link, custom_headers:nil)
1247
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1248
+
1249
+
1250
+ request_headers = {}
1251
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1252
+
1253
+ # Set Headers
1254
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1255
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1256
+ path_template = '{nextLink}'
1257
+
1258
+ request_url = @base_url || @client.base_url
1259
+
1260
+ options = {
1261
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1262
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1263
+ headers: request_headers.merge(custom_headers || {}),
1264
+ base_url: request_url
1265
+ }
1266
+ promise = @client.make_request_async(:get, path_template, options)
1267
+
1268
+ promise = promise.then do |result|
1269
+ http_response = result.response
1270
+ status_code = http_response.status
1271
+ response_content = http_response.body
1272
+ unless status_code == 200
1273
+ error_model = JSON.load(response_content)
1274
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1275
+ end
1276
+
1277
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1278
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1279
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1280
+ # Deserialize Response
1281
+ if status_code == 200
1282
+ begin
1283
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1284
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
1285
+ result.body = @client.deserialize(result_mapper, parsed_response)
1286
+ rescue Exception => e
1287
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1288
+ end
1289
+ end
1290
+
1291
+ result
1292
+ end
1293
+
1294
+ promise.execute
1295
+ end
1296
+
1297
+ #
1298
+ # Lists the long term retention backups for a given location.
1299
+ #
1300
+ # @param next_page_link [String] The NextLink from the previous successful call
1301
+ # to List operation.
1302
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1303
+ # will be added to the HTTP request.
1304
+ #
1305
+ # @return [LongTermRetentionBackupListResult] operation results.
1306
+ #
1307
+ def list_by_resource_group_location_next(next_page_link, custom_headers:nil)
1308
+ response = list_by_resource_group_location_next_async(next_page_link, custom_headers:custom_headers).value!
1309
+ response.body unless response.nil?
1310
+ end
1311
+
1312
+ #
1313
+ # Lists the long term retention backups for a given location.
1314
+ #
1315
+ # @param next_page_link [String] The NextLink from the previous successful call
1316
+ # to List operation.
1317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1318
+ # will be added to the HTTP request.
1319
+ #
1320
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1321
+ #
1322
+ def list_by_resource_group_location_next_with_http_info(next_page_link, custom_headers:nil)
1323
+ list_by_resource_group_location_next_async(next_page_link, custom_headers:custom_headers).value!
1324
+ end
1325
+
1326
+ #
1327
+ # Lists the long term retention backups for a given location.
1328
+ #
1329
+ # @param next_page_link [String] The NextLink from the previous successful call
1330
+ # to List operation.
1331
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1332
+ # to the HTTP request.
1333
+ #
1334
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1335
+ #
1336
+ def list_by_resource_group_location_next_async(next_page_link, custom_headers:nil)
1337
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1338
+
1339
+
1340
+ request_headers = {}
1341
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1342
+
1343
+ # Set Headers
1344
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1345
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1346
+ path_template = '{nextLink}'
1347
+
1348
+ request_url = @base_url || @client.base_url
1349
+
1350
+ options = {
1351
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1352
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1353
+ headers: request_headers.merge(custom_headers || {}),
1354
+ base_url: request_url
1355
+ }
1356
+ promise = @client.make_request_async(:get, path_template, options)
1357
+
1358
+ promise = promise.then do |result|
1359
+ http_response = result.response
1360
+ status_code = http_response.status
1361
+ response_content = http_response.body
1362
+ unless status_code == 200
1363
+ error_model = JSON.load(response_content)
1364
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1365
+ end
1366
+
1367
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1368
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1369
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1370
+ # Deserialize Response
1371
+ if status_code == 200
1372
+ begin
1373
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1374
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
1375
+ result.body = @client.deserialize(result_mapper, parsed_response)
1376
+ rescue Exception => e
1377
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1378
+ end
1379
+ end
1380
+
1381
+ result
1382
+ end
1383
+
1384
+ promise.execute
1385
+ end
1386
+
1387
+ #
1388
+ # Lists the long term retention backups for a given server.
1389
+ #
1390
+ # @param next_page_link [String] The NextLink from the previous successful call
1391
+ # to List operation.
1392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1393
+ # will be added to the HTTP request.
1394
+ #
1395
+ # @return [LongTermRetentionBackupListResult] operation results.
1396
+ #
1397
+ def list_by_resource_group_server_next(next_page_link, custom_headers:nil)
1398
+ response = list_by_resource_group_server_next_async(next_page_link, custom_headers:custom_headers).value!
1399
+ response.body unless response.nil?
1400
+ end
1401
+
1402
+ #
1403
+ # Lists the long term retention backups for a given server.
1404
+ #
1405
+ # @param next_page_link [String] The NextLink from the previous successful call
1406
+ # to List operation.
1407
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1408
+ # will be added to the HTTP request.
1409
+ #
1410
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1411
+ #
1412
+ def list_by_resource_group_server_next_with_http_info(next_page_link, custom_headers:nil)
1413
+ list_by_resource_group_server_next_async(next_page_link, custom_headers:custom_headers).value!
1414
+ end
1415
+
1416
+ #
1417
+ # Lists the long term retention backups for a given server.
1418
+ #
1419
+ # @param next_page_link [String] The NextLink from the previous successful call
1420
+ # to List operation.
1421
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1422
+ # to the HTTP request.
1423
+ #
1424
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1425
+ #
1426
+ def list_by_resource_group_server_next_async(next_page_link, custom_headers:nil)
1427
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1428
+
1429
+
1430
+ request_headers = {}
1431
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1432
+
1433
+ # Set Headers
1434
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1435
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1436
+ path_template = '{nextLink}'
1437
+
1438
+ request_url = @base_url || @client.base_url
1439
+
1440
+ options = {
1441
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1442
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1443
+ headers: request_headers.merge(custom_headers || {}),
1444
+ base_url: request_url
1445
+ }
1446
+ promise = @client.make_request_async(:get, path_template, options)
1447
+
1448
+ promise = promise.then do |result|
1449
+ http_response = result.response
1450
+ status_code = http_response.status
1451
+ response_content = http_response.body
1452
+ unless status_code == 200
1453
+ error_model = JSON.load(response_content)
1454
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1455
+ end
1456
+
1457
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1458
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1459
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1460
+ # Deserialize Response
1461
+ if status_code == 200
1462
+ begin
1463
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1464
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
1465
+ result.body = @client.deserialize(result_mapper, parsed_response)
1466
+ rescue Exception => e
1467
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1468
+ end
1469
+ end
1470
+
1471
+ result
1472
+ end
1473
+
1474
+ promise.execute
1475
+ end
1476
+
1477
+ #
1478
+ # Lists all long term retention backups for a database.
1479
+ #
1480
+ # @param next_page_link [String] The NextLink from the previous successful call
1481
+ # to List operation.
1482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1483
+ # will be added to the HTTP request.
1484
+ #
1485
+ # @return [LongTermRetentionBackupListResult] operation results.
1486
+ #
1487
+ def list_by_database_next(next_page_link, custom_headers:nil)
1488
+ response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
1489
+ response.body unless response.nil?
1490
+ end
1491
+
1492
+ #
1493
+ # Lists all long term retention backups for a database.
1494
+ #
1495
+ # @param next_page_link [String] The NextLink from the previous successful call
1496
+ # to List operation.
1497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1498
+ # will be added to the HTTP request.
1499
+ #
1500
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1501
+ #
1502
+ def list_by_database_next_with_http_info(next_page_link, custom_headers:nil)
1503
+ list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
1504
+ end
1505
+
1506
+ #
1507
+ # Lists all long term retention backups for a database.
1508
+ #
1509
+ # @param next_page_link [String] The NextLink from the previous successful call
1510
+ # to List operation.
1511
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1512
+ # to the HTTP request.
1513
+ #
1514
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1515
+ #
1516
+ def list_by_database_next_async(next_page_link, custom_headers:nil)
1517
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1518
+
1519
+
1520
+ request_headers = {}
1521
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1522
+
1523
+ # Set Headers
1524
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1525
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1526
+ path_template = '{nextLink}'
1527
+
1528
+ request_url = @base_url || @client.base_url
1529
+
1530
+ options = {
1531
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1532
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1533
+ headers: request_headers.merge(custom_headers || {}),
1534
+ base_url: request_url
1535
+ }
1536
+ promise = @client.make_request_async(:get, path_template, options)
1537
+
1538
+ promise = promise.then do |result|
1539
+ http_response = result.response
1540
+ status_code = http_response.status
1541
+ response_content = http_response.body
1542
+ unless status_code == 200
1543
+ error_model = JSON.load(response_content)
1544
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1545
+ end
1546
+
1547
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1548
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1549
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1550
+ # Deserialize Response
1551
+ if status_code == 200
1552
+ begin
1553
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1554
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
1555
+ result.body = @client.deserialize(result_mapper, parsed_response)
1556
+ rescue Exception => e
1557
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1558
+ end
1559
+ end
1560
+
1561
+ result
1562
+ end
1563
+
1564
+ promise.execute
1565
+ end
1566
+
1567
+ #
1568
+ # Lists the long term retention backups for a given location.
1569
+ #
1570
+ # @param next_page_link [String] The NextLink from the previous successful call
1571
+ # to List operation.
1572
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1573
+ # will be added to the HTTP request.
1574
+ #
1575
+ # @return [LongTermRetentionBackupListResult] operation results.
1576
+ #
1577
+ def list_by_location_next(next_page_link, custom_headers:nil)
1578
+ response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
1579
+ response.body unless response.nil?
1580
+ end
1581
+
1582
+ #
1583
+ # Lists the long term retention backups for a given location.
1584
+ #
1585
+ # @param next_page_link [String] The NextLink from the previous successful call
1586
+ # to List operation.
1587
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1588
+ # will be added to the HTTP request.
1589
+ #
1590
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1591
+ #
1592
+ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
1593
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
1594
+ end
1595
+
1596
+ #
1597
+ # Lists the long term retention backups for a given location.
1598
+ #
1599
+ # @param next_page_link [String] The NextLink from the previous successful call
1600
+ # to List operation.
1601
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1602
+ # to the HTTP request.
1603
+ #
1604
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1605
+ #
1606
+ def list_by_location_next_async(next_page_link, custom_headers:nil)
1607
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1608
+
1609
+
1610
+ request_headers = {}
1611
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1612
+
1613
+ # Set Headers
1614
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1615
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1616
+ path_template = '{nextLink}'
1617
+
1618
+ request_url = @base_url || @client.base_url
1619
+
1620
+ options = {
1621
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1622
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1623
+ headers: request_headers.merge(custom_headers || {}),
1624
+ base_url: request_url
1625
+ }
1626
+ promise = @client.make_request_async(:get, path_template, options)
1627
+
1628
+ promise = promise.then do |result|
1629
+ http_response = result.response
1630
+ status_code = http_response.status
1631
+ response_content = http_response.body
1632
+ unless status_code == 200
1633
+ error_model = JSON.load(response_content)
1634
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1635
+ end
1636
+
1637
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1638
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1639
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1640
+ # Deserialize Response
1641
+ if status_code == 200
1642
+ begin
1643
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1644
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
1645
+ result.body = @client.deserialize(result_mapper, parsed_response)
1646
+ rescue Exception => e
1647
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1648
+ end
1649
+ end
1650
+
1651
+ result
1652
+ end
1653
+
1654
+ promise.execute
1655
+ end
1656
+
1657
+ #
1658
+ # Lists the long term retention backups for a given server.
1659
+ #
1660
+ # @param next_page_link [String] The NextLink from the previous successful call
1661
+ # to List operation.
1662
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1663
+ # will be added to the HTTP request.
1664
+ #
1665
+ # @return [LongTermRetentionBackupListResult] operation results.
1666
+ #
1667
+ def list_by_server_next(next_page_link, custom_headers:nil)
1668
+ response = list_by_server_next_async(next_page_link, custom_headers:custom_headers).value!
1669
+ response.body unless response.nil?
1670
+ end
1671
+
1672
+ #
1673
+ # Lists the long term retention backups for a given server.
1674
+ #
1675
+ # @param next_page_link [String] The NextLink from the previous successful call
1676
+ # to List operation.
1677
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1678
+ # will be added to the HTTP request.
1679
+ #
1680
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1681
+ #
1682
+ def list_by_server_next_with_http_info(next_page_link, custom_headers:nil)
1683
+ list_by_server_next_async(next_page_link, custom_headers:custom_headers).value!
1684
+ end
1685
+
1686
+ #
1687
+ # Lists the long term retention backups for a given server.
1688
+ #
1689
+ # @param next_page_link [String] The NextLink from the previous successful call
1690
+ # to List operation.
1691
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1692
+ # to the HTTP request.
1693
+ #
1694
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1695
+ #
1696
+ def list_by_server_next_async(next_page_link, custom_headers:nil)
1697
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
796
1698
 
797
1699
 
798
1700
  request_headers = {}
@@ -823,6 +1725,8 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
823
1725
  end
824
1726
 
825
1727
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1728
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1729
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
826
1730
  # Deserialize Response
827
1731
  if status_code == 200
828
1732
  begin
@@ -840,6 +1744,96 @@ module Azure::SQL::Mgmt::V2017_03_01_preview
840
1744
  promise.execute
841
1745
  end
842
1746
 
1747
+ #
1748
+ # Lists all long term retention backups for a database.
1749
+ #
1750
+ # @param resource_group_name [String] The name of the resource group that
1751
+ # contains the resource. You can obtain this value from the Azure Resource
1752
+ # Manager API or the portal.
1753
+ # @param location_name [String] The location of the database
1754
+ # @param long_term_retention_server_name [String] The name of the server
1755
+ # @param long_term_retention_database_name [String] The name of the database
1756
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
1757
+ # latest backup for each database.
1758
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
1759
+ # against just live databases, just deleted databases, or all databases.
1760
+ # Possible values include: 'All', 'Live', 'Deleted'
1761
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1762
+ # will be added to the HTTP request.
1763
+ #
1764
+ # @return [LongTermRetentionBackupListResult] which provide lazy access to
1765
+ # pages of the response.
1766
+ #
1767
+ def list_by_resource_group_database_as_lazy(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
1768
+ response = list_by_resource_group_database_async(resource_group_name, location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
1769
+ unless response.nil?
1770
+ page = response.body
1771
+ page.next_method = Proc.new do |next_page_link|
1772
+ list_by_resource_group_database_next_async(next_page_link, custom_headers:custom_headers)
1773
+ end
1774
+ page
1775
+ end
1776
+ end
1777
+
1778
+ #
1779
+ # Lists the long term retention backups for a given location.
1780
+ #
1781
+ # @param resource_group_name [String] The name of the resource group that
1782
+ # contains the resource. You can obtain this value from the Azure Resource
1783
+ # Manager API or the portal.
1784
+ # @param location_name [String] The location of the database
1785
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
1786
+ # latest backup for each database.
1787
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
1788
+ # against just live databases, just deleted databases, or all databases.
1789
+ # Possible values include: 'All', 'Live', 'Deleted'
1790
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1791
+ # will be added to the HTTP request.
1792
+ #
1793
+ # @return [LongTermRetentionBackupListResult] which provide lazy access to
1794
+ # pages of the response.
1795
+ #
1796
+ def list_by_resource_group_location_as_lazy(resource_group_name, location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
1797
+ response = list_by_resource_group_location_async(resource_group_name, location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
1798
+ unless response.nil?
1799
+ page = response.body
1800
+ page.next_method = Proc.new do |next_page_link|
1801
+ list_by_resource_group_location_next_async(next_page_link, custom_headers:custom_headers)
1802
+ end
1803
+ page
1804
+ end
1805
+ end
1806
+
1807
+ #
1808
+ # Lists the long term retention backups for a given server.
1809
+ #
1810
+ # @param resource_group_name [String] The name of the resource group that
1811
+ # contains the resource. You can obtain this value from the Azure Resource
1812
+ # Manager API or the portal.
1813
+ # @param location_name [String] The location of the database
1814
+ # @param long_term_retention_server_name [String] The name of the server
1815
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
1816
+ # latest backup for each database.
1817
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
1818
+ # against just live databases, just deleted databases, or all databases.
1819
+ # Possible values include: 'All', 'Live', 'Deleted'
1820
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1821
+ # will be added to the HTTP request.
1822
+ #
1823
+ # @return [LongTermRetentionBackupListResult] which provide lazy access to
1824
+ # pages of the response.
1825
+ #
1826
+ def list_by_resource_group_server_as_lazy(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
1827
+ response = list_by_resource_group_server_async(resource_group_name, location_name, long_term_retention_server_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
1828
+ unless response.nil?
1829
+ page = response.body
1830
+ page.next_method = Proc.new do |next_page_link|
1831
+ list_by_resource_group_server_next_async(next_page_link, custom_headers:custom_headers)
1832
+ end
1833
+ page
1834
+ end
1835
+ end
1836
+
843
1837
  #
844
1838
  # Lists all long term retention backups for a database.
845
1839
  #