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