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,983 @@
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_10_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 InstanceFailoverGroups
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the InstanceFailoverGroups 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 failover group.
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.
33
+ # @param location_name [String] The name of the region where the resource is
34
+ # located.
35
+ # @param failover_group_name [String] The name of the failover group.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [InstanceFailoverGroup] operation results.
40
+ #
41
+ def get(resource_group_name, location_name, failover_group_name, custom_headers:nil)
42
+ response = get_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
43
+ response.body unless response.nil?
44
+ end
45
+
46
+ #
47
+ # Gets a failover group.
48
+ #
49
+ # @param resource_group_name [String] The name of the resource group that
50
+ # contains the resource. You can obtain this value from the Azure Resource
51
+ # Manager API or the portal.
52
+ # @param location_name [String] The name of the region where the resource is
53
+ # located.
54
+ # @param failover_group_name [String] The name of the failover group.
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
59
+ #
60
+ def get_with_http_info(resource_group_name, location_name, failover_group_name, custom_headers:nil)
61
+ get_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
62
+ end
63
+
64
+ #
65
+ # Gets a failover group.
66
+ #
67
+ # @param resource_group_name [String] The name of the resource group that
68
+ # contains the resource. You can obtain this value from the Azure Resource
69
+ # Manager API or the portal.
70
+ # @param location_name [String] The name of the region where the resource is
71
+ # located.
72
+ # @param failover_group_name [String] The name of the failover group.
73
+ # @param [Hash{String => String}] A hash of custom headers that will be added
74
+ # to the HTTP request.
75
+ #
76
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
+ #
78
+ def get_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
79
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
80
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
81
+ fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil?
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+
85
+
86
+ request_headers = {}
87
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'failoverGroupName' => failover_group_name,'subscriptionId' => @client.subscription_id},
99
+ query_params: {'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # Creates or updates a failover group.
134
+ #
135
+ # @param resource_group_name [String] The name of the resource group that
136
+ # contains the resource. You can obtain this value from the Azure Resource
137
+ # Manager API or the portal.
138
+ # @param location_name [String] The name of the region where the resource is
139
+ # located.
140
+ # @param failover_group_name [String] The name of the failover group.
141
+ # @param parameters [InstanceFailoverGroup] The failover group parameters.
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ # @return [InstanceFailoverGroup] operation results.
146
+ #
147
+ def create_or_update(resource_group_name, location_name, failover_group_name, parameters, custom_headers:nil)
148
+ response = create_or_update_async(resource_group_name, location_name, failover_group_name, parameters, custom_headers:custom_headers).value!
149
+ response.body unless response.nil?
150
+ end
151
+
152
+ #
153
+ # @param resource_group_name [String] The name of the resource group that
154
+ # contains the resource. You can obtain this value from the Azure Resource
155
+ # Manager API or the portal.
156
+ # @param location_name [String] The name of the region where the resource is
157
+ # located.
158
+ # @param failover_group_name [String] The name of the failover group.
159
+ # @param parameters [InstanceFailoverGroup] The failover group parameters.
160
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
161
+ # will be added to the HTTP request.
162
+ #
163
+ # @return [Concurrent::Promise] promise which provides async access to http
164
+ # response.
165
+ #
166
+ def create_or_update_async(resource_group_name, location_name, failover_group_name, parameters, custom_headers:nil)
167
+ # Send request
168
+ promise = begin_create_or_update_async(resource_group_name, location_name, failover_group_name, parameters, custom_headers:custom_headers)
169
+
170
+ promise = promise.then do |response|
171
+ # Defining deserialization method.
172
+ deserialize_method = lambda do |parsed_response|
173
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
174
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
175
+ end
176
+
177
+ # Waiting for response.
178
+ @client.get_long_running_operation_result(response, deserialize_method)
179
+ end
180
+
181
+ promise
182
+ end
183
+
184
+ #
185
+ # Deletes a failover group.
186
+ #
187
+ # @param resource_group_name [String] The name of the resource group that
188
+ # contains the resource. You can obtain this value from the Azure Resource
189
+ # Manager API or the portal.
190
+ # @param location_name [String] The name of the region where the resource is
191
+ # located.
192
+ # @param failover_group_name [String] The name of the failover group.
193
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
194
+ # will be added to the HTTP request.
195
+ #
196
+ def delete(resource_group_name, location_name, failover_group_name, custom_headers:nil)
197
+ response = delete_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
198
+ nil
199
+ end
200
+
201
+ #
202
+ # @param resource_group_name [String] The name of the resource group that
203
+ # contains the resource. You can obtain this value from the Azure Resource
204
+ # Manager API or the portal.
205
+ # @param location_name [String] The name of the region where the resource is
206
+ # located.
207
+ # @param failover_group_name [String] The name of the failover group.
208
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
209
+ # will be added to the HTTP request.
210
+ #
211
+ # @return [Concurrent::Promise] promise which provides async access to http
212
+ # response.
213
+ #
214
+ def delete_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
215
+ # Send request
216
+ promise = begin_delete_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers)
217
+
218
+ promise = promise.then do |response|
219
+ # Defining deserialization method.
220
+ deserialize_method = lambda do |parsed_response|
221
+ end
222
+
223
+ # Waiting for response.
224
+ @client.get_long_running_operation_result(response, deserialize_method)
225
+ end
226
+
227
+ promise
228
+ end
229
+
230
+ #
231
+ # Lists the failover groups in a location.
232
+ #
233
+ # @param resource_group_name [String] The name of the resource group that
234
+ # contains the resource. You can obtain this value from the Azure Resource
235
+ # Manager API or the portal.
236
+ # @param location_name [String] The name of the region where the resource is
237
+ # located.
238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
239
+ # will be added to the HTTP request.
240
+ #
241
+ # @return [Array<InstanceFailoverGroup>] operation results.
242
+ #
243
+ def list_by_location(resource_group_name, location_name, custom_headers:nil)
244
+ first_page = list_by_location_as_lazy(resource_group_name, location_name, custom_headers:custom_headers)
245
+ first_page.get_all_items
246
+ end
247
+
248
+ #
249
+ # Lists the failover groups in a location.
250
+ #
251
+ # @param resource_group_name [String] The name of the resource group that
252
+ # contains the resource. You can obtain this value from the Azure Resource
253
+ # Manager API or the portal.
254
+ # @param location_name [String] The name of the region where the resource is
255
+ # located.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
260
+ #
261
+ def list_by_location_with_http_info(resource_group_name, location_name, custom_headers:nil)
262
+ list_by_location_async(resource_group_name, location_name, custom_headers:custom_headers).value!
263
+ end
264
+
265
+ #
266
+ # Lists the failover groups in a location.
267
+ #
268
+ # @param resource_group_name [String] The name of the resource group that
269
+ # contains the resource. You can obtain this value from the Azure Resource
270
+ # Manager API or the portal.
271
+ # @param location_name [String] The name of the region where the resource is
272
+ # located.
273
+ # @param [Hash{String => String}] A hash of custom headers that will be added
274
+ # to the HTTP request.
275
+ #
276
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
277
+ #
278
+ def list_by_location_async(resource_group_name, location_name, custom_headers:nil)
279
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
280
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
281
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
282
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
283
+
284
+
285
+ request_headers = {}
286
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
287
+
288
+ # Set Headers
289
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
290
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
291
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups'
292
+
293
+ request_url = @base_url || @client.base_url
294
+
295
+ options = {
296
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
297
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'subscriptionId' => @client.subscription_id},
298
+ query_params: {'api-version' => @client.api_version},
299
+ headers: request_headers.merge(custom_headers || {}),
300
+ base_url: request_url
301
+ }
302
+ promise = @client.make_request_async(:get, path_template, options)
303
+
304
+ promise = promise.then do |result|
305
+ http_response = result.response
306
+ status_code = http_response.status
307
+ response_content = http_response.body
308
+ unless status_code == 200
309
+ error_model = JSON.load(response_content)
310
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
311
+ end
312
+
313
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
314
+ # Deserialize Response
315
+ if status_code == 200
316
+ begin
317
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
318
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroupListResult.mapper()
319
+ result.body = @client.deserialize(result_mapper, parsed_response)
320
+ rescue Exception => e
321
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
322
+ end
323
+ end
324
+
325
+ result
326
+ end
327
+
328
+ promise.execute
329
+ end
330
+
331
+ #
332
+ # Fails over from the current primary managed instance to this managed
333
+ # instance.
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.
338
+ # @param location_name [String] The name of the region where the resource is
339
+ # located.
340
+ # @param failover_group_name [String] The name of the failover group.
341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
342
+ # will be added to the HTTP request.
343
+ #
344
+ # @return [InstanceFailoverGroup] operation results.
345
+ #
346
+ def failover(resource_group_name, location_name, failover_group_name, custom_headers:nil)
347
+ response = failover_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
348
+ response.body unless response.nil?
349
+ end
350
+
351
+ #
352
+ # @param resource_group_name [String] The name of the resource group that
353
+ # contains the resource. You can obtain this value from the Azure Resource
354
+ # Manager API or the portal.
355
+ # @param location_name [String] The name of the region where the resource is
356
+ # located.
357
+ # @param failover_group_name [String] The name of the failover group.
358
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
359
+ # will be added to the HTTP request.
360
+ #
361
+ # @return [Concurrent::Promise] promise which provides async access to http
362
+ # response.
363
+ #
364
+ def failover_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
365
+ # Send request
366
+ promise = begin_failover_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers)
367
+
368
+ promise = promise.then do |response|
369
+ # Defining deserialization method.
370
+ deserialize_method = lambda do |parsed_response|
371
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
372
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
373
+ end
374
+
375
+ # Waiting for response.
376
+ @client.get_long_running_operation_result(response, deserialize_method)
377
+ end
378
+
379
+ promise
380
+ end
381
+
382
+ #
383
+ # Fails over from the current primary managed instance to this managed
384
+ # instance. This operation might result in data loss.
385
+ #
386
+ # @param resource_group_name [String] The name of the resource group that
387
+ # contains the resource. You can obtain this value from the Azure Resource
388
+ # Manager API or the portal.
389
+ # @param location_name [String] The name of the region where the resource is
390
+ # located.
391
+ # @param failover_group_name [String] The name of the failover group.
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ # @return [InstanceFailoverGroup] operation results.
396
+ #
397
+ def force_failover_allow_data_loss(resource_group_name, location_name, failover_group_name, custom_headers:nil)
398
+ response = force_failover_allow_data_loss_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
399
+ response.body unless response.nil?
400
+ end
401
+
402
+ #
403
+ # @param resource_group_name [String] The name of the resource group that
404
+ # contains the resource. You can obtain this value from the Azure Resource
405
+ # Manager API or the portal.
406
+ # @param location_name [String] The name of the region where the resource is
407
+ # located.
408
+ # @param failover_group_name [String] The name of the failover group.
409
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
410
+ # will be added to the HTTP request.
411
+ #
412
+ # @return [Concurrent::Promise] promise which provides async access to http
413
+ # response.
414
+ #
415
+ def force_failover_allow_data_loss_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
416
+ # Send request
417
+ promise = begin_force_failover_allow_data_loss_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers)
418
+
419
+ promise = promise.then do |response|
420
+ # Defining deserialization method.
421
+ deserialize_method = lambda do |parsed_response|
422
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
423
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
424
+ end
425
+
426
+ # Waiting for response.
427
+ @client.get_long_running_operation_result(response, deserialize_method)
428
+ end
429
+
430
+ promise
431
+ end
432
+
433
+ #
434
+ # Creates or updates a failover group.
435
+ #
436
+ # @param resource_group_name [String] The name of the resource group that
437
+ # contains the resource. You can obtain this value from the Azure Resource
438
+ # Manager API or the portal.
439
+ # @param location_name [String] The name of the region where the resource is
440
+ # located.
441
+ # @param failover_group_name [String] The name of the failover group.
442
+ # @param parameters [InstanceFailoverGroup] The failover group parameters.
443
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
444
+ # will be added to the HTTP request.
445
+ #
446
+ # @return [InstanceFailoverGroup] operation results.
447
+ #
448
+ def begin_create_or_update(resource_group_name, location_name, failover_group_name, parameters, custom_headers:nil)
449
+ response = begin_create_or_update_async(resource_group_name, location_name, failover_group_name, parameters, custom_headers:custom_headers).value!
450
+ response.body unless response.nil?
451
+ end
452
+
453
+ #
454
+ # Creates or updates a failover group.
455
+ #
456
+ # @param resource_group_name [String] The name of the resource group that
457
+ # contains the resource. You can obtain this value from the Azure Resource
458
+ # Manager API or the portal.
459
+ # @param location_name [String] The name of the region where the resource is
460
+ # located.
461
+ # @param failover_group_name [String] The name of the failover group.
462
+ # @param parameters [InstanceFailoverGroup] The failover group parameters.
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
467
+ #
468
+ def begin_create_or_update_with_http_info(resource_group_name, location_name, failover_group_name, parameters, custom_headers:nil)
469
+ begin_create_or_update_async(resource_group_name, location_name, failover_group_name, parameters, custom_headers:custom_headers).value!
470
+ end
471
+
472
+ #
473
+ # Creates or updates a failover group.
474
+ #
475
+ # @param resource_group_name [String] The name of the resource group that
476
+ # contains the resource. You can obtain this value from the Azure Resource
477
+ # Manager API or the portal.
478
+ # @param location_name [String] The name of the region where the resource is
479
+ # located.
480
+ # @param failover_group_name [String] The name of the failover group.
481
+ # @param parameters [InstanceFailoverGroup] The failover group parameters.
482
+ # @param [Hash{String => String}] A hash of custom headers that will be added
483
+ # to the HTTP request.
484
+ #
485
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
486
+ #
487
+ def begin_create_or_update_async(resource_group_name, location_name, failover_group_name, parameters, custom_headers:nil)
488
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
489
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
490
+ fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil?
491
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
492
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
493
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
494
+
495
+
496
+ request_headers = {}
497
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
498
+
499
+ # Set Headers
500
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
501
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
502
+
503
+ # Serialize Request
504
+ request_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
505
+ request_content = @client.serialize(request_mapper, parameters)
506
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
507
+
508
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'
509
+
510
+ request_url = @base_url || @client.base_url
511
+
512
+ options = {
513
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
514
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'failoverGroupName' => failover_group_name,'subscriptionId' => @client.subscription_id},
515
+ query_params: {'api-version' => @client.api_version},
516
+ body: request_content,
517
+ headers: request_headers.merge(custom_headers || {}),
518
+ base_url: request_url
519
+ }
520
+ promise = @client.make_request_async(:put, path_template, options)
521
+
522
+ promise = promise.then do |result|
523
+ http_response = result.response
524
+ status_code = http_response.status
525
+ response_content = http_response.body
526
+ unless status_code == 200 || status_code == 202 || status_code == 201
527
+ error_model = JSON.load(response_content)
528
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
529
+ end
530
+
531
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
532
+ # Deserialize Response
533
+ if status_code == 200
534
+ begin
535
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
536
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
537
+ result.body = @client.deserialize(result_mapper, parsed_response)
538
+ rescue Exception => e
539
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
540
+ end
541
+ end
542
+ # Deserialize Response
543
+ if status_code == 201
544
+ begin
545
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
546
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
547
+ result.body = @client.deserialize(result_mapper, parsed_response)
548
+ rescue Exception => e
549
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
550
+ end
551
+ end
552
+
553
+ result
554
+ end
555
+
556
+ promise.execute
557
+ end
558
+
559
+ #
560
+ # Deletes a failover group.
561
+ #
562
+ # @param resource_group_name [String] The name of the resource group that
563
+ # contains the resource. You can obtain this value from the Azure Resource
564
+ # Manager API or the portal.
565
+ # @param location_name [String] The name of the region where the resource is
566
+ # located.
567
+ # @param failover_group_name [String] The name of the failover group.
568
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
569
+ # will be added to the HTTP request.
570
+ #
571
+ #
572
+ def begin_delete(resource_group_name, location_name, failover_group_name, custom_headers:nil)
573
+ response = begin_delete_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
574
+ nil
575
+ end
576
+
577
+ #
578
+ # Deletes a failover group.
579
+ #
580
+ # @param resource_group_name [String] The name of the resource group that
581
+ # contains the resource. You can obtain this value from the Azure Resource
582
+ # Manager API or the portal.
583
+ # @param location_name [String] The name of the region where the resource is
584
+ # located.
585
+ # @param failover_group_name [String] The name of the failover group.
586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
587
+ # will be added to the HTTP request.
588
+ #
589
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
590
+ #
591
+ def begin_delete_with_http_info(resource_group_name, location_name, failover_group_name, custom_headers:nil)
592
+ begin_delete_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
593
+ end
594
+
595
+ #
596
+ # Deletes a failover group.
597
+ #
598
+ # @param resource_group_name [String] The name of the resource group that
599
+ # contains the resource. You can obtain this value from the Azure Resource
600
+ # Manager API or the portal.
601
+ # @param location_name [String] The name of the region where the resource is
602
+ # located.
603
+ # @param failover_group_name [String] The name of the failover group.
604
+ # @param [Hash{String => String}] A hash of custom headers that will be added
605
+ # to the HTTP request.
606
+ #
607
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
608
+ #
609
+ def begin_delete_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
610
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
611
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
612
+ fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil?
613
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
614
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
615
+
616
+
617
+ request_headers = {}
618
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
619
+
620
+ # Set Headers
621
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
622
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
623
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}'
624
+
625
+ request_url = @base_url || @client.base_url
626
+
627
+ options = {
628
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
629
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'failoverGroupName' => failover_group_name,'subscriptionId' => @client.subscription_id},
630
+ query_params: {'api-version' => @client.api_version},
631
+ headers: request_headers.merge(custom_headers || {}),
632
+ base_url: request_url
633
+ }
634
+ promise = @client.make_request_async(:delete, path_template, options)
635
+
636
+ promise = promise.then do |result|
637
+ http_response = result.response
638
+ status_code = http_response.status
639
+ response_content = http_response.body
640
+ unless status_code == 200 || status_code == 202 || status_code == 204
641
+ error_model = JSON.load(response_content)
642
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
643
+ end
644
+
645
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
646
+
647
+ result
648
+ end
649
+
650
+ promise.execute
651
+ end
652
+
653
+ #
654
+ # Fails over from the current primary managed instance to this managed
655
+ # instance.
656
+ #
657
+ # @param resource_group_name [String] The name of the resource group that
658
+ # contains the resource. You can obtain this value from the Azure Resource
659
+ # Manager API or the portal.
660
+ # @param location_name [String] The name of the region where the resource is
661
+ # located.
662
+ # @param failover_group_name [String] The name of the failover group.
663
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
664
+ # will be added to the HTTP request.
665
+ #
666
+ # @return [InstanceFailoverGroup] operation results.
667
+ #
668
+ def begin_failover(resource_group_name, location_name, failover_group_name, custom_headers:nil)
669
+ response = begin_failover_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
670
+ response.body unless response.nil?
671
+ end
672
+
673
+ #
674
+ # Fails over from the current primary managed instance to this managed
675
+ # instance.
676
+ #
677
+ # @param resource_group_name [String] The name of the resource group that
678
+ # contains the resource. You can obtain this value from the Azure Resource
679
+ # Manager API or the portal.
680
+ # @param location_name [String] The name of the region where the resource is
681
+ # located.
682
+ # @param failover_group_name [String] The name of the failover group.
683
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
684
+ # will be added to the HTTP request.
685
+ #
686
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
687
+ #
688
+ def begin_failover_with_http_info(resource_group_name, location_name, failover_group_name, custom_headers:nil)
689
+ begin_failover_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
690
+ end
691
+
692
+ #
693
+ # Fails over from the current primary managed instance to this managed
694
+ # instance.
695
+ #
696
+ # @param resource_group_name [String] The name of the resource group that
697
+ # contains the resource. You can obtain this value from the Azure Resource
698
+ # Manager API or the portal.
699
+ # @param location_name [String] The name of the region where the resource is
700
+ # located.
701
+ # @param failover_group_name [String] The name of the failover group.
702
+ # @param [Hash{String => String}] A hash of custom headers that will be added
703
+ # to the HTTP request.
704
+ #
705
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
706
+ #
707
+ def begin_failover_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
708
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
709
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
710
+ fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil?
711
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
712
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
713
+
714
+
715
+ request_headers = {}
716
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
717
+
718
+ # Set Headers
719
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
720
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
721
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover'
722
+
723
+ request_url = @base_url || @client.base_url
724
+
725
+ options = {
726
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
727
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'failoverGroupName' => failover_group_name,'subscriptionId' => @client.subscription_id},
728
+ query_params: {'api-version' => @client.api_version},
729
+ headers: request_headers.merge(custom_headers || {}),
730
+ base_url: request_url
731
+ }
732
+ promise = @client.make_request_async(:post, path_template, options)
733
+
734
+ promise = promise.then do |result|
735
+ http_response = result.response
736
+ status_code = http_response.status
737
+ response_content = http_response.body
738
+ unless status_code == 200 || status_code == 202
739
+ error_model = JSON.load(response_content)
740
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
741
+ end
742
+
743
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
744
+ # Deserialize Response
745
+ if status_code == 200
746
+ begin
747
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
748
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
749
+ result.body = @client.deserialize(result_mapper, parsed_response)
750
+ rescue Exception => e
751
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
752
+ end
753
+ end
754
+
755
+ result
756
+ end
757
+
758
+ promise.execute
759
+ end
760
+
761
+ #
762
+ # Fails over from the current primary managed instance to this managed
763
+ # instance. This operation might result in data loss.
764
+ #
765
+ # @param resource_group_name [String] The name of the resource group that
766
+ # contains the resource. You can obtain this value from the Azure Resource
767
+ # Manager API or the portal.
768
+ # @param location_name [String] The name of the region where the resource is
769
+ # located.
770
+ # @param failover_group_name [String] The name of the failover group.
771
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
772
+ # will be added to the HTTP request.
773
+ #
774
+ # @return [InstanceFailoverGroup] operation results.
775
+ #
776
+ def begin_force_failover_allow_data_loss(resource_group_name, location_name, failover_group_name, custom_headers:nil)
777
+ response = begin_force_failover_allow_data_loss_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
778
+ response.body unless response.nil?
779
+ end
780
+
781
+ #
782
+ # Fails over from the current primary managed instance to this managed
783
+ # instance. This operation might result in data loss.
784
+ #
785
+ # @param resource_group_name [String] The name of the resource group that
786
+ # contains the resource. You can obtain this value from the Azure Resource
787
+ # Manager API or the portal.
788
+ # @param location_name [String] The name of the region where the resource is
789
+ # located.
790
+ # @param failover_group_name [String] The name of the failover group.
791
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
792
+ # will be added to the HTTP request.
793
+ #
794
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
795
+ #
796
+ def begin_force_failover_allow_data_loss_with_http_info(resource_group_name, location_name, failover_group_name, custom_headers:nil)
797
+ begin_force_failover_allow_data_loss_async(resource_group_name, location_name, failover_group_name, custom_headers:custom_headers).value!
798
+ end
799
+
800
+ #
801
+ # Fails over from the current primary managed instance to this managed
802
+ # instance. This operation might result in data loss.
803
+ #
804
+ # @param resource_group_name [String] The name of the resource group that
805
+ # contains the resource. You can obtain this value from the Azure Resource
806
+ # Manager API or the portal.
807
+ # @param location_name [String] The name of the region where the resource is
808
+ # located.
809
+ # @param failover_group_name [String] The name of the failover group.
810
+ # @param [Hash{String => String}] A hash of custom headers that will be added
811
+ # to the HTTP request.
812
+ #
813
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
814
+ #
815
+ def begin_force_failover_allow_data_loss_async(resource_group_name, location_name, failover_group_name, custom_headers:nil)
816
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
817
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
818
+ fail ArgumentError, 'failover_group_name is nil' if failover_group_name.nil?
819
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
820
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
821
+
822
+
823
+ request_headers = {}
824
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
825
+
826
+ # Set Headers
827
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
828
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
829
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss'
830
+
831
+ request_url = @base_url || @client.base_url
832
+
833
+ options = {
834
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
835
+ path_params: {'resourceGroupName' => resource_group_name,'locationName' => location_name,'failoverGroupName' => failover_group_name,'subscriptionId' => @client.subscription_id},
836
+ query_params: {'api-version' => @client.api_version},
837
+ headers: request_headers.merge(custom_headers || {}),
838
+ base_url: request_url
839
+ }
840
+ promise = @client.make_request_async(:post, path_template, options)
841
+
842
+ promise = promise.then do |result|
843
+ http_response = result.response
844
+ status_code = http_response.status
845
+ response_content = http_response.body
846
+ unless status_code == 200 || status_code == 202
847
+ error_model = JSON.load(response_content)
848
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
849
+ end
850
+
851
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
852
+ # Deserialize Response
853
+ if status_code == 200
854
+ begin
855
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
856
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroup.mapper()
857
+ result.body = @client.deserialize(result_mapper, parsed_response)
858
+ rescue Exception => e
859
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
860
+ end
861
+ end
862
+
863
+ result
864
+ end
865
+
866
+ promise.execute
867
+ end
868
+
869
+ #
870
+ # Lists the failover groups in a location.
871
+ #
872
+ # @param next_page_link [String] The NextLink from the previous successful call
873
+ # to List operation.
874
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
875
+ # will be added to the HTTP request.
876
+ #
877
+ # @return [InstanceFailoverGroupListResult] operation results.
878
+ #
879
+ def list_by_location_next(next_page_link, custom_headers:nil)
880
+ response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
881
+ response.body unless response.nil?
882
+ end
883
+
884
+ #
885
+ # Lists the failover groups in a location.
886
+ #
887
+ # @param next_page_link [String] The NextLink from the previous successful call
888
+ # to List operation.
889
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
890
+ # will be added to the HTTP request.
891
+ #
892
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
893
+ #
894
+ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
895
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
896
+ end
897
+
898
+ #
899
+ # Lists the failover groups in a location.
900
+ #
901
+ # @param next_page_link [String] The NextLink from the previous successful call
902
+ # to List operation.
903
+ # @param [Hash{String => String}] A hash of custom headers that will be added
904
+ # to the HTTP request.
905
+ #
906
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
907
+ #
908
+ def list_by_location_next_async(next_page_link, custom_headers:nil)
909
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
910
+
911
+
912
+ request_headers = {}
913
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
914
+
915
+ # Set Headers
916
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
917
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
918
+ path_template = '{nextLink}'
919
+
920
+ request_url = @base_url || @client.base_url
921
+
922
+ options = {
923
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
924
+ skip_encoding_path_params: {'nextLink' => next_page_link},
925
+ headers: request_headers.merge(custom_headers || {}),
926
+ base_url: request_url
927
+ }
928
+ promise = @client.make_request_async(:get, path_template, options)
929
+
930
+ promise = promise.then do |result|
931
+ http_response = result.response
932
+ status_code = http_response.status
933
+ response_content = http_response.body
934
+ unless status_code == 200
935
+ error_model = JSON.load(response_content)
936
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
937
+ end
938
+
939
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
940
+ # Deserialize Response
941
+ if status_code == 200
942
+ begin
943
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
944
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::InstanceFailoverGroupListResult.mapper()
945
+ result.body = @client.deserialize(result_mapper, parsed_response)
946
+ rescue Exception => e
947
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
948
+ end
949
+ end
950
+
951
+ result
952
+ end
953
+
954
+ promise.execute
955
+ end
956
+
957
+ #
958
+ # Lists the failover groups in a location.
959
+ #
960
+ # @param resource_group_name [String] The name of the resource group that
961
+ # contains the resource. You can obtain this value from the Azure Resource
962
+ # Manager API or the portal.
963
+ # @param location_name [String] The name of the region where the resource is
964
+ # located.
965
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
966
+ # will be added to the HTTP request.
967
+ #
968
+ # @return [InstanceFailoverGroupListResult] which provide lazy access to pages
969
+ # of the response.
970
+ #
971
+ def list_by_location_as_lazy(resource_group_name, location_name, custom_headers:nil)
972
+ response = list_by_location_async(resource_group_name, location_name, custom_headers:custom_headers).value!
973
+ unless response.nil?
974
+ page = response.body
975
+ page.next_method = Proc.new do |next_page_link|
976
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers)
977
+ end
978
+ page
979
+ end
980
+ end
981
+
982
+ end
983
+ end