azure_mgmt_sql 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2014-04-01/generated/azure_mgmt_sql.rb +62 -61
  3. data/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb +8 -8
  4. data/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb +8 -8
  5. data/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb +8 -8
  6. data/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb +11 -11
  7. data/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb +454 -0
  8. data/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +22 -17
  9. data/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb +43 -25
  10. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb +246 -0
  11. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +6 -12
  12. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb +666 -0
  13. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb +986 -0
  14. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb +21 -0
  15. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb +18 -0
  16. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb +16 -0
  17. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb +17 -0
  18. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb +91 -0
  19. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb +110 -0
  20. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +72 -2
  21. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb +86 -0
  22. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb +55 -0
  23. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb +100 -0
  24. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb +206 -0
  25. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb +100 -0
  26. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb +161 -0
  27. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb +61 -0
  28. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb +70 -0
  29. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb +97 -0
  30. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +20 -6
  31. data/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +88 -11
  32. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +402 -0
  33. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb +134 -0
  34. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +258 -0
  35. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb +4 -4
  36. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb +400 -0
  37. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb +356 -0
  38. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb +4 -4
  39. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb +258 -0
  40. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb +290 -0
  41. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb +816 -0
  42. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb +571 -0
  43. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb +1101 -0
  44. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb +415 -0
  45. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb +927 -0
  46. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb +697 -0
  47. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb +571 -0
  48. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb +358 -0
  49. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb +570 -0
  50. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb +925 -0
  51. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb +963 -0
  52. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb +110 -0
  53. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb +16 -0
  54. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb +47 -0
  55. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +1 -0
  56. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb +74 -0
  57. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb +9 -9
  58. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +238 -0
  59. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +36 -0
  60. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{status.rb → database_status.rb} +2 -2
  61. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb +9 -9
  62. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +100 -0
  63. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb +84 -0
  64. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb +56 -0
  65. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb +238 -0
  66. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb +238 -0
  67. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb +99 -0
  68. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb +122 -0
  69. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb +100 -0
  70. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb +19 -0
  71. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb +54 -0
  72. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb +85 -0
  73. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb +100 -0
  74. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb +224 -0
  75. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb +24 -0
  76. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb +100 -0
  77. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb +73 -0
  78. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb +100 -0
  79. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb +98 -0
  80. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb +16 -0
  81. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb +135 -0
  82. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb +73 -0
  83. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb +15 -0
  84. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb +15 -0
  85. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb +100 -0
  86. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb +100 -0
  87. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb +127 -0
  88. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb +15 -0
  89. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb +121 -0
  90. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb +82 -0
  91. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb +100 -0
  92. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb +16 -0
  93. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb +19 -0
  94. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb +62 -0
  95. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb +100 -0
  96. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb +134 -0
  97. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{database_restore_point_list_result.rb → long_term_retention_backup_list_result.rb} +9 -9
  98. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb +17 -0
  99. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb +242 -0
  100. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb +17 -0
  101. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb +100 -0
  102. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb +19 -0
  103. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb +210 -0
  104. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb +19 -0
  105. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{database_restore_point.rb → restore_point.rb} +6 -5
  106. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb +68 -0
  107. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_policy_state.rb +17 -0
  108. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label.rb +84 -0
  109. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_list_result.rb +100 -0
  110. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_source.rb +16 -0
  111. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb +226 -0
  112. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb +166 -0
  113. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{arm_sku.rb → sku.rb} +16 -11
  114. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb +16 -0
  115. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb +80 -0
  116. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/{database_restore_points.rb → restore_points.rb} +93 -111
  117. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sensitivity_labels.rb +612 -0
  118. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb +4 -4
  119. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb +290 -0
  120. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb +4 -4
  121. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb +290 -0
  122. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +100 -9
  123. data/lib/2017-10-01-preview/generated/azure_mgmt_sql.rb +104 -0
  124. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/backup_short_term_retention_policies.rb +684 -0
  125. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/capabilities.rb +128 -0
  126. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_operations.rb +338 -0
  127. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb +621 -0
  128. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/databases.rb +1566 -0
  129. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pool_operations.rb +338 -0
  130. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb +815 -0
  131. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/instance_failover_groups.rb +983 -0
  132. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb +175 -0
  133. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy.rb +74 -0
  134. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy_list_result.rb +101 -0
  135. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/capability_group.rb +17 -0
  136. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/capability_status.rb +18 -0
  137. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb +16 -0
  138. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +24 -0
  139. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database.rb +482 -0
  140. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_license_type.rb +16 -0
  141. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb +100 -0
  142. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +233 -0
  143. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb +100 -0
  144. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_read_scale.rb +16 -0
  145. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_status.rb +32 -0
  146. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_update.rb +425 -0
  147. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +100 -0
  148. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_scans_export.rb +76 -0
  149. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/edition_capability.rb +107 -0
  150. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool.rb +187 -0
  151. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +107 -0
  152. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_license_type.rb +16 -0
  153. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb +100 -0
  154. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation.rb +231 -0
  155. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation_list_result.rb +100 -0
  156. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_performance_level_capability.rb +108 -0
  157. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_performance_level_capability.rb +86 -0
  158. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_settings.rb +57 -0
  159. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_performance_level_capability.rb +200 -0
  160. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_state.rb +17 -0
  161. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_update.rb +116 -0
  162. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group.rb +156 -0
  163. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_list_result.rb +100 -0
  164. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_only_endpoint.rb +48 -0
  165. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_write_endpoint.rb +62 -0
  166. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_replication_role.rb +16 -0
  167. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/license_type_capability.rb +72 -0
  168. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/location_capabilities.rb +116 -0
  169. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_capability.rb +61 -0
  170. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_unit.rb +19 -0
  171. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_edition_capability.rb +94 -0
  172. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_family_capability.rb +161 -0
  173. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_pair_info.rb +57 -0
  174. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_vcores_capability.rb +84 -0
  175. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_version_capability.rb +94 -0
  176. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/management_operation_state.rb +20 -0
  177. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_capability.rb +61 -0
  178. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_range_capability.rb +113 -0
  179. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_unit.rb +18 -0
  180. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/partner_region_info.rb +60 -0
  181. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_capability.rb +60 -0
  182. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_unit.rb +16 -0
  183. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb +62 -0
  184. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb +16 -0
  185. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb +16 -0
  186. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/resource.rb +71 -0
  187. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb +46 -0
  188. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sample_name.rb +17 -0
  189. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/server_version_capability.rb +116 -0
  190. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/service_objective_capability.rb +166 -0
  191. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sku.rb +97 -0
  192. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/tde_certificate.rb +84 -0
  193. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb +92 -0
  194. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb +80 -0
  195. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_error.rb +59 -0
  196. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record.rb +169 -0
  197. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record_list_result.rb +102 -0
  198. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_state.rb +18 -0
  199. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_trigger_type.rb +16 -0
  200. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/module_definition.rb +9 -0
  201. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +171 -0
  202. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/tde_certificates.rb +175 -0
  203. data/lib/azure_mgmt_sql.rb +2 -1
  204. data/lib/profiles/latest/modules/sql_profile_module.rb +855 -411
  205. data/lib/version.rb +1 -1
  206. metadata +186 -10
@@ -0,0 +1,925 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::SQL::Mgmt::V2017_03_01_preview
7
+ #
8
+ # The Azure SQL Database management API provides a RESTful set of web
9
+ # services that interact with Azure SQL Database services to manage your
10
+ # databases. The API enables you to create, retrieve, update, and delete
11
+ # databases.
12
+ #
13
+ class LongTermRetentionBackups
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the LongTermRetentionBackups class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [SqlManagementClient] reference to the SqlManagementClient
25
+ attr_reader :client
26
+
27
+ #
28
+ # Gets a long term retention backup.
29
+ #
30
+ # @param location_name [String] The location of the database.
31
+ # @param long_term_retention_server_name [String]
32
+ # @param long_term_retention_database_name [String]
33
+ # @param backup_name [String] The backup name.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [LongTermRetentionBackup] operation results.
38
+ #
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!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Gets a long term retention backup.
46
+ #
47
+ # @param location_name [String] The location of the database.
48
+ # @param long_term_retention_server_name [String]
49
+ # @param long_term_retention_database_name [String]
50
+ # @param backup_name [String] The backup name.
51
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
+ # will be added to the HTTP request.
53
+ #
54
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
+ #
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!
58
+ end
59
+
60
+ #
61
+ # Gets a long term retention backup.
62
+ #
63
+ # @param location_name [String] The location of the database.
64
+ # @param long_term_retention_server_name [String]
65
+ # @param long_term_retention_database_name [String]
66
+ # @param backup_name [String] The backup name.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def get_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
73
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
74
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
75
+ fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
76
+ fail ArgumentError, 'backup_name is nil' if backup_name.nil?
77
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
78
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ 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}'
88
+
89
+ request_url = @base_url || @client.base_url
90
+
91
+ options = {
92
+ 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},
94
+ query_params: {'api-version' => @client.api_version},
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
97
+ }
98
+ promise = @client.make_request_async(:get, path_template, options)
99
+
100
+ promise = promise.then do |result|
101
+ http_response = result.response
102
+ status_code = http_response.status
103
+ response_content = http_response.body
104
+ unless status_code == 200
105
+ error_model = JSON.load(response_content)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
107
+ end
108
+
109
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackup.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ #
128
+ # Deletes a long term retention backup.
129
+ #
130
+ # @param location_name [String] The location of the database
131
+ # @param long_term_retention_server_name [String]
132
+ # @param long_term_retention_database_name [String]
133
+ # @param backup_name [String] The backup name.
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
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!
139
+ nil
140
+ end
141
+
142
+ #
143
+ # @param location_name [String] The location of the database
144
+ # @param long_term_retention_server_name [String]
145
+ # @param long_term_retention_database_name [String]
146
+ # @param backup_name [String] The backup name.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [Concurrent::Promise] promise which provides async access to http
151
+ # response.
152
+ #
153
+ def delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
154
+ # 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)
156
+
157
+ promise = promise.then do |response|
158
+ # Defining deserialization method.
159
+ deserialize_method = lambda do |parsed_response|
160
+ end
161
+
162
+ # Waiting for response.
163
+ @client.get_long_running_operation_result(response, deserialize_method)
164
+ end
165
+
166
+ promise
167
+ end
168
+
169
+ #
170
+ # Lists all long term retention backups for a database.
171
+ #
172
+ # @param location_name [String] The location of the database
173
+ # @param long_term_retention_server_name [String]
174
+ # @param long_term_retention_database_name [String]
175
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
176
+ # latest backup for each database.
177
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
178
+ # against just live databases, just deleted databases, or all databases.
179
+ # Possible values include: 'All', 'Live', 'Deleted'
180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
181
+ # will be added to the HTTP request.
182
+ #
183
+ # @return [Array<LongTermRetentionBackup>] operation results.
184
+ #
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)
187
+ first_page.get_all_items
188
+ end
189
+
190
+ #
191
+ # Lists all long term retention backups for a database.
192
+ #
193
+ # @param location_name [String] The location of the database
194
+ # @param long_term_retention_server_name [String]
195
+ # @param long_term_retention_database_name [String]
196
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
197
+ # latest backup for each database.
198
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
199
+ # against just live databases, just deleted databases, or all databases.
200
+ # Possible values include: 'All', 'Live', 'Deleted'
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
205
+ #
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!
208
+ end
209
+
210
+ #
211
+ # Lists all long term retention backups for a database.
212
+ #
213
+ # @param location_name [String] The location of the database
214
+ # @param long_term_retention_server_name [String]
215
+ # @param long_term_retention_database_name [String]
216
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
217
+ # latest backup for each database.
218
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
219
+ # against just live databases, just deleted databases, or all databases.
220
+ # Possible values include: 'All', 'Live', 'Deleted'
221
+ # @param [Hash{String => String}] A hash of custom headers that will be added
222
+ # to the HTTP request.
223
+ #
224
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
225
+ #
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)
227
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
228
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
229
+ fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
230
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
231
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
232
+
233
+
234
+ request_headers = {}
235
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
236
+
237
+ # Set Headers
238
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
239
+ 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'
241
+
242
+ request_url = @base_url || @client.base_url
243
+
244
+ options = {
245
+ 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},
247
+ query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
248
+ headers: request_headers.merge(custom_headers || {}),
249
+ base_url: request_url
250
+ }
251
+ promise = @client.make_request_async(:get, path_template, options)
252
+
253
+ promise = promise.then do |result|
254
+ http_response = result.response
255
+ status_code = http_response.status
256
+ response_content = http_response.body
257
+ unless status_code == 200
258
+ error_model = JSON.load(response_content)
259
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
260
+ end
261
+
262
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
263
+ # Deserialize Response
264
+ if status_code == 200
265
+ begin
266
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
267
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
268
+ result.body = @client.deserialize(result_mapper, parsed_response)
269
+ rescue Exception => e
270
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
271
+ end
272
+ end
273
+
274
+ result
275
+ end
276
+
277
+ promise.execute
278
+ end
279
+
280
+ #
281
+ # Lists the long term retention backups for a given location.
282
+ #
283
+ # @param location_name [String] The location of the database
284
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
285
+ # latest backup for each database.
286
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
287
+ # against just live databases, just deleted databases, or all databases.
288
+ # Possible values include: 'All', 'Live', 'Deleted'
289
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
290
+ # will be added to the HTTP request.
291
+ #
292
+ # @return [Array<LongTermRetentionBackup>] operation results.
293
+ #
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)
296
+ first_page.get_all_items
297
+ end
298
+
299
+ #
300
+ # Lists the long term retention backups for a given location.
301
+ #
302
+ # @param location_name [String] The location of the database
303
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
304
+ # latest backup for each database.
305
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
306
+ # against just live databases, just deleted databases, or all databases.
307
+ # Possible values include: 'All', 'Live', 'Deleted'
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
312
+ #
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!
315
+ end
316
+
317
+ #
318
+ # Lists the long term retention backups for a given location.
319
+ #
320
+ # @param location_name [String] The location of the database
321
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
322
+ # latest backup for each database.
323
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
324
+ # against just live databases, just deleted databases, or all databases.
325
+ # Possible values include: 'All', 'Live', 'Deleted'
326
+ # @param [Hash{String => String}] A hash of custom headers that will be added
327
+ # to the HTTP request.
328
+ #
329
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
330
+ #
331
+ def list_by_location_async(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
332
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
333
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
334
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
335
+
336
+
337
+ request_headers = {}
338
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
339
+
340
+ # Set Headers
341
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
342
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
343
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups'
344
+
345
+ request_url = @base_url || @client.base_url
346
+
347
+ options = {
348
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
349
+ path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id},
350
+ query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
351
+ headers: request_headers.merge(custom_headers || {}),
352
+ base_url: request_url
353
+ }
354
+ promise = @client.make_request_async(:get, path_template, options)
355
+
356
+ promise = promise.then do |result|
357
+ http_response = result.response
358
+ status_code = http_response.status
359
+ response_content = http_response.body
360
+ unless status_code == 200
361
+ error_model = JSON.load(response_content)
362
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
363
+ end
364
+
365
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
366
+ # Deserialize Response
367
+ if status_code == 200
368
+ begin
369
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
370
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
371
+ result.body = @client.deserialize(result_mapper, parsed_response)
372
+ rescue Exception => e
373
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
374
+ end
375
+ end
376
+
377
+ result
378
+ end
379
+
380
+ promise.execute
381
+ end
382
+
383
+ #
384
+ # Lists the long term retention backups for a given server.
385
+ #
386
+ # @param location_name [String] The location of the database
387
+ # @param long_term_retention_server_name [String]
388
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
389
+ # latest backup for each database.
390
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
391
+ # against just live databases, just deleted databases, or all databases.
392
+ # Possible values include: 'All', 'Live', 'Deleted'
393
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
394
+ # will be added to the HTTP request.
395
+ #
396
+ # @return [Array<LongTermRetentionBackup>] operation results.
397
+ #
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)
400
+ first_page.get_all_items
401
+ end
402
+
403
+ #
404
+ # Lists the long term retention backups for a given server.
405
+ #
406
+ # @param location_name [String] The location of the database
407
+ # @param long_term_retention_server_name [String]
408
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
409
+ # latest backup for each database.
410
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
411
+ # against just live databases, just deleted databases, or all databases.
412
+ # Possible values include: 'All', 'Live', 'Deleted'
413
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
414
+ # will be added to the HTTP request.
415
+ #
416
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
417
+ #
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!
420
+ end
421
+
422
+ #
423
+ # Lists the long term retention backups for a given server.
424
+ #
425
+ # @param location_name [String] The location of the database
426
+ # @param long_term_retention_server_name [String]
427
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
428
+ # latest backup for each database.
429
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
430
+ # against just live databases, just deleted databases, or all databases.
431
+ # Possible values include: 'All', 'Live', 'Deleted'
432
+ # @param [Hash{String => String}] A hash of custom headers that will be added
433
+ # to the HTTP request.
434
+ #
435
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
436
+ #
437
+ def list_by_server_async(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
438
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
439
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
440
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
441
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
442
+
443
+
444
+ request_headers = {}
445
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
446
+
447
+ # Set Headers
448
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
449
+ 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'
451
+
452
+ request_url = @base_url || @client.base_url
453
+
454
+ options = {
455
+ 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},
457
+ query_params: {'onlyLatestPerDatabase' => only_latest_per_database,'databaseState' => database_state,'api-version' => @client.api_version},
458
+ headers: request_headers.merge(custom_headers || {}),
459
+ base_url: request_url
460
+ }
461
+ promise = @client.make_request_async(:get, path_template, options)
462
+
463
+ promise = promise.then do |result|
464
+ http_response = result.response
465
+ status_code = http_response.status
466
+ response_content = http_response.body
467
+ unless status_code == 200
468
+ error_model = JSON.load(response_content)
469
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
470
+ end
471
+
472
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
473
+ # Deserialize Response
474
+ if status_code == 200
475
+ begin
476
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
477
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
478
+ result.body = @client.deserialize(result_mapper, parsed_response)
479
+ rescue Exception => e
480
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
481
+ end
482
+ end
483
+
484
+ result
485
+ end
486
+
487
+ promise.execute
488
+ end
489
+
490
+ #
491
+ # Deletes a long term retention backup.
492
+ #
493
+ # @param location_name [String] The location of the database
494
+ # @param long_term_retention_server_name [String]
495
+ # @param long_term_retention_database_name [String]
496
+ # @param backup_name [String] The backup name.
497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
498
+ # will be added to the HTTP request.
499
+ #
500
+ #
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
504
+ end
505
+
506
+ #
507
+ # Deletes a long term retention backup.
508
+ #
509
+ # @param location_name [String] The location of the database
510
+ # @param long_term_retention_server_name [String]
511
+ # @param long_term_retention_database_name [String]
512
+ # @param backup_name [String] The backup name.
513
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
514
+ # will be added to the HTTP request.
515
+ #
516
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
517
+ #
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!
520
+ end
521
+
522
+ #
523
+ # Deletes a long term retention backup.
524
+ #
525
+ # @param location_name [String] The location of the database
526
+ # @param long_term_retention_server_name [String]
527
+ # @param long_term_retention_database_name [String]
528
+ # @param backup_name [String] The backup name.
529
+ # @param [Hash{String => String}] A hash of custom headers that will be added
530
+ # to the HTTP request.
531
+ #
532
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
533
+ #
534
+ def begin_delete_async(location_name, long_term_retention_server_name, long_term_retention_database_name, backup_name, custom_headers:nil)
535
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
536
+ fail ArgumentError, 'long_term_retention_server_name is nil' if long_term_retention_server_name.nil?
537
+ fail ArgumentError, 'long_term_retention_database_name is nil' if long_term_retention_database_name.nil?
538
+ fail ArgumentError, 'backup_name is nil' if backup_name.nil?
539
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
540
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
541
+
542
+
543
+ request_headers = {}
544
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
545
+
546
+ # Set Headers
547
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
548
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
549
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}'
550
+
551
+ request_url = @base_url || @client.base_url
552
+
553
+ options = {
554
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
555
+ path_params: {'locationName' => location_name,'longTermRetentionServerName' => long_term_retention_server_name,'longTermRetentionDatabaseName' => long_term_retention_database_name,'backupName' => backup_name,'subscriptionId' => @client.subscription_id},
556
+ query_params: {'api-version' => @client.api_version},
557
+ headers: request_headers.merge(custom_headers || {}),
558
+ base_url: request_url
559
+ }
560
+ promise = @client.make_request_async(:delete, path_template, options)
561
+
562
+ promise = promise.then do |result|
563
+ http_response = result.response
564
+ status_code = http_response.status
565
+ response_content = http_response.body
566
+ unless status_code == 200 || status_code == 202
567
+ error_model = JSON.load(response_content)
568
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
569
+ end
570
+
571
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
572
+
573
+ result
574
+ end
575
+
576
+ promise.execute
577
+ end
578
+
579
+ #
580
+ # Lists all long term retention backups for a database.
581
+ #
582
+ # @param next_page_link [String] The NextLink from the previous successful call
583
+ # to List operation.
584
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
585
+ # will be added to the HTTP request.
586
+ #
587
+ # @return [LongTermRetentionBackupListResult] operation results.
588
+ #
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?
592
+ end
593
+
594
+ #
595
+ # Lists all long term retention backups for a database.
596
+ #
597
+ # @param next_page_link [String] The NextLink from the previous successful call
598
+ # to List operation.
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
603
+ #
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!
606
+ end
607
+
608
+ #
609
+ # Lists all long term retention backups for a database.
610
+ #
611
+ # @param next_page_link [String] The NextLink from the previous successful call
612
+ # to List operation.
613
+ # @param [Hash{String => String}] A hash of custom headers that will be added
614
+ # to the HTTP request.
615
+ #
616
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
617
+ #
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?
620
+
621
+
622
+ request_headers = {}
623
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
624
+
625
+ # Set Headers
626
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
627
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
628
+ path_template = '{nextLink}'
629
+
630
+ request_url = @base_url || @client.base_url
631
+
632
+ options = {
633
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
634
+ skip_encoding_path_params: {'nextLink' => next_page_link},
635
+ headers: request_headers.merge(custom_headers || {}),
636
+ base_url: request_url
637
+ }
638
+ promise = @client.make_request_async(:get, path_template, options)
639
+
640
+ promise = promise.then do |result|
641
+ http_response = result.response
642
+ status_code = http_response.status
643
+ response_content = http_response.body
644
+ unless status_code == 200
645
+ error_model = JSON.load(response_content)
646
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
647
+ end
648
+
649
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
650
+ # Deserialize Response
651
+ if status_code == 200
652
+ begin
653
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
654
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
655
+ result.body = @client.deserialize(result_mapper, parsed_response)
656
+ rescue Exception => e
657
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
658
+ end
659
+ end
660
+
661
+ result
662
+ end
663
+
664
+ promise.execute
665
+ end
666
+
667
+ #
668
+ # Lists the long term retention backups for a given location.
669
+ #
670
+ # @param next_page_link [String] The NextLink from the previous successful call
671
+ # to List operation.
672
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
673
+ # will be added to the HTTP request.
674
+ #
675
+ # @return [LongTermRetentionBackupListResult] operation results.
676
+ #
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?
680
+ end
681
+
682
+ #
683
+ # Lists the long term retention backups for a given location.
684
+ #
685
+ # @param next_page_link [String] The NextLink from the previous successful call
686
+ # to List operation.
687
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
688
+ # will be added to the HTTP request.
689
+ #
690
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
691
+ #
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!
694
+ end
695
+
696
+ #
697
+ # Lists the long term retention backups for a given location.
698
+ #
699
+ # @param next_page_link [String] The NextLink from the previous successful call
700
+ # to List operation.
701
+ # @param [Hash{String => String}] A hash of custom headers that will be added
702
+ # to the HTTP request.
703
+ #
704
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
705
+ #
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?
708
+
709
+
710
+ request_headers = {}
711
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
712
+
713
+ # Set Headers
714
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
715
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
716
+ path_template = '{nextLink}'
717
+
718
+ request_url = @base_url || @client.base_url
719
+
720
+ options = {
721
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
722
+ skip_encoding_path_params: {'nextLink' => next_page_link},
723
+ headers: request_headers.merge(custom_headers || {}),
724
+ base_url: request_url
725
+ }
726
+ promise = @client.make_request_async(:get, path_template, options)
727
+
728
+ promise = promise.then do |result|
729
+ http_response = result.response
730
+ status_code = http_response.status
731
+ response_content = http_response.body
732
+ unless status_code == 200
733
+ error_model = JSON.load(response_content)
734
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
735
+ end
736
+
737
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
738
+ # Deserialize Response
739
+ if status_code == 200
740
+ begin
741
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
742
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
743
+ result.body = @client.deserialize(result_mapper, parsed_response)
744
+ rescue Exception => e
745
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
746
+ end
747
+ end
748
+
749
+ result
750
+ end
751
+
752
+ promise.execute
753
+ end
754
+
755
+ #
756
+ # Lists the long term retention backups for a given server.
757
+ #
758
+ # @param next_page_link [String] The NextLink from the previous successful call
759
+ # to List operation.
760
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
761
+ # will be added to the HTTP request.
762
+ #
763
+ # @return [LongTermRetentionBackupListResult] operation results.
764
+ #
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?
768
+ end
769
+
770
+ #
771
+ # Lists the long term retention backups for a given server.
772
+ #
773
+ # @param next_page_link [String] The NextLink from the previous successful call
774
+ # to List operation.
775
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
776
+ # will be added to the HTTP request.
777
+ #
778
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
779
+ #
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!
782
+ end
783
+
784
+ #
785
+ # Lists the long term retention backups for a given server.
786
+ #
787
+ # @param next_page_link [String] The NextLink from the previous successful call
788
+ # to List operation.
789
+ # @param [Hash{String => String}] A hash of custom headers that will be added
790
+ # to the HTTP request.
791
+ #
792
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
793
+ #
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?
796
+
797
+
798
+ request_headers = {}
799
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
800
+
801
+ # Set Headers
802
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
803
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
804
+ path_template = '{nextLink}'
805
+
806
+ request_url = @base_url || @client.base_url
807
+
808
+ options = {
809
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
810
+ skip_encoding_path_params: {'nextLink' => next_page_link},
811
+ headers: request_headers.merge(custom_headers || {}),
812
+ base_url: request_url
813
+ }
814
+ promise = @client.make_request_async(:get, path_template, options)
815
+
816
+ promise = promise.then do |result|
817
+ http_response = result.response
818
+ status_code = http_response.status
819
+ response_content = http_response.body
820
+ unless status_code == 200
821
+ error_model = JSON.load(response_content)
822
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
823
+ end
824
+
825
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
826
+ # Deserialize Response
827
+ if status_code == 200
828
+ begin
829
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
830
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::LongTermRetentionBackupListResult.mapper()
831
+ result.body = @client.deserialize(result_mapper, parsed_response)
832
+ rescue Exception => e
833
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
834
+ end
835
+ end
836
+
837
+ result
838
+ end
839
+
840
+ promise.execute
841
+ end
842
+
843
+ #
844
+ # Lists all long term retention backups for a database.
845
+ #
846
+ # @param location_name [String] The location of the database
847
+ # @param long_term_retention_server_name [String]
848
+ # @param long_term_retention_database_name [String]
849
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
850
+ # latest backup for each database.
851
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
852
+ # against just live databases, just deleted databases, or all databases.
853
+ # Possible values include: 'All', 'Live', 'Deleted'
854
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
855
+ # will be added to the HTTP request.
856
+ #
857
+ # @return [LongTermRetentionBackupListResult] which provide lazy access to
858
+ # pages of the response.
859
+ #
860
+ def list_by_database_as_lazy(location_name, long_term_retention_server_name, long_term_retention_database_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
861
+ response = 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!
862
+ unless response.nil?
863
+ page = response.body
864
+ page.next_method = Proc.new do |next_page_link|
865
+ list_by_database_next_async(next_page_link, custom_headers:custom_headers)
866
+ end
867
+ page
868
+ end
869
+ end
870
+
871
+ #
872
+ # Lists the long term retention backups for a given location.
873
+ #
874
+ # @param location_name [String] The location of the database
875
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
876
+ # latest backup for each database.
877
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
878
+ # against just live databases, just deleted databases, or all databases.
879
+ # Possible values include: 'All', 'Live', 'Deleted'
880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
881
+ # will be added to the HTTP request.
882
+ #
883
+ # @return [LongTermRetentionBackupListResult] which provide lazy access to
884
+ # pages of the response.
885
+ #
886
+ def list_by_location_as_lazy(location_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
887
+ response = list_by_location_async(location_name, only_latest_per_database:only_latest_per_database, database_state:database_state, custom_headers:custom_headers).value!
888
+ unless response.nil?
889
+ page = response.body
890
+ page.next_method = Proc.new do |next_page_link|
891
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers)
892
+ end
893
+ page
894
+ end
895
+ end
896
+
897
+ #
898
+ # Lists the long term retention backups for a given server.
899
+ #
900
+ # @param location_name [String] The location of the database
901
+ # @param long_term_retention_server_name [String]
902
+ # @param only_latest_per_database [Boolean] Whether or not to only get the
903
+ # latest backup for each database.
904
+ # @param database_state [LongTermRetentionDatabaseState] Whether to query
905
+ # against just live databases, just deleted databases, or all databases.
906
+ # Possible values include: 'All', 'Live', 'Deleted'
907
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
908
+ # will be added to the HTTP request.
909
+ #
910
+ # @return [LongTermRetentionBackupListResult] which provide lazy access to
911
+ # pages of the response.
912
+ #
913
+ def list_by_server_as_lazy(location_name, long_term_retention_server_name, only_latest_per_database:nil, database_state:nil, custom_headers:nil)
914
+ response = 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!
915
+ unless response.nil?
916
+ page = response.body
917
+ page.next_method = Proc.new do |next_page_link|
918
+ list_by_server_next_async(next_page_link, custom_headers:custom_headers)
919
+ end
920
+ page
921
+ end
922
+ end
923
+
924
+ end
925
+ end