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,134 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::SQL::Mgmt::V2017_03_01_preview
7
+ #
8
+ # The Azure SQL Database management API provides a RESTful set of web
9
+ # services that interact with Azure SQL Database services to manage your
10
+ # databases. The API enables you to create, retrieve, update, and delete
11
+ # databases.
12
+ #
13
+ class DataWarehouseUserActivitiesOperations
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the DataWarehouseUserActivitiesOperations 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 the user activities of a data warehouse which includes running and
29
+ # suspended queries
30
+ #
31
+ # @param resource_group_name [String] The name of the resource group that
32
+ # contains the resource. You can obtain this value from the Azure Resource
33
+ # Manager API or the portal.
34
+ # @param server_name [String] The name of the server.
35
+ # @param database_name [String] The name of the database.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [DataWarehouseUserActivities] operation results.
40
+ #
41
+ def get(resource_group_name, server_name, database_name, custom_headers:nil)
42
+ response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
43
+ response.body unless response.nil?
44
+ end
45
+
46
+ #
47
+ # Gets the user activities of a data warehouse which includes running and
48
+ # suspended queries
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group that
51
+ # contains the resource. You can obtain this value from the Azure Resource
52
+ # Manager API or the portal.
53
+ # @param server_name [String] The name of the server.
54
+ # @param database_name [String] The name of the database.
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, server_name, database_name, custom_headers:nil)
61
+ get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
62
+ end
63
+
64
+ #
65
+ # Gets the user activities of a data warehouse which includes running and
66
+ # suspended queries
67
+ #
68
+ # @param resource_group_name [String] The name of the resource group that
69
+ # contains the resource. You can obtain this value from the Azure Resource
70
+ # Manager API or the portal.
71
+ # @param server_name [String] The name of the server.
72
+ # @param database_name [String] The name of the database.
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, server_name, database_name, custom_headers:nil)
79
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
80
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
81
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
82
+ data_warehouse_user_activity_name = 'current'
83
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
84
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
85
+
86
+
87
+ request_headers = {}
88
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
89
+
90
+ # Set Headers
91
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
92
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
93
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}'
94
+
95
+ request_url = @base_url || @client.base_url
96
+
97
+ options = {
98
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
99
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'dataWarehouseUserActivityName' => data_warehouse_user_activity_name,'subscriptionId' => @client.subscription_id},
100
+ query_params: {'api-version' => @client.api_version},
101
+ headers: request_headers.merge(custom_headers || {}),
102
+ base_url: request_url
103
+ }
104
+ promise = @client.make_request_async(:get, path_template, options)
105
+
106
+ promise = promise.then do |result|
107
+ http_response = result.response
108
+ status_code = http_response.status
109
+ response_content = http_response.body
110
+ unless status_code == 200
111
+ error_model = JSON.load(response_content)
112
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
113
+ end
114
+
115
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
116
+ # Deserialize Response
117
+ if status_code == 200
118
+ begin
119
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
120
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DataWarehouseUserActivities.mapper()
121
+ result.body = @client.deserialize(result_mapper, parsed_response)
122
+ rescue Exception => e
123
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
124
+ end
125
+ end
126
+
127
+ result
128
+ end
129
+
130
+ promise.execute
131
+ end
132
+
133
+ end
134
+ end
@@ -0,0 +1,258 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::SQL::Mgmt::V2017_03_01_preview
7
+ #
8
+ # The Azure SQL Database management API provides a RESTful set of web
9
+ # services that interact with Azure SQL Database services to manage your
10
+ # databases. The API enables you to create, retrieve, update, and delete
11
+ # databases.
12
+ #
13
+ class DatabaseBlobAuditingPolicies
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the DatabaseBlobAuditingPolicies 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 database's blob auditing policy.
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 server_name [String] The name of the server.
34
+ # @param database_name [String] The name of the database.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [DatabaseBlobAuditingPolicy] operation results.
39
+ #
40
+ def get(resource_group_name, server_name, database_name, custom_headers:nil)
41
+ response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Gets a database's blob auditing policy.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group that
49
+ # contains the resource. You can obtain this value from the Azure Resource
50
+ # Manager API or the portal.
51
+ # @param server_name [String] The name of the server.
52
+ # @param database_name [String] The name of the database.
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
+ #
58
+ def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
59
+ get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Gets a database's blob auditing policy.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group that
66
+ # contains the resource. You can obtain this value from the Azure Resource
67
+ # Manager API or the portal.
68
+ # @param server_name [String] The name of the server.
69
+ # @param database_name [String] The name of the database.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def get_async(resource_group_name, server_name, database_name, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
78
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
79
+ blob_auditing_policy_name = 'default'
80
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
81
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ # Deserialize Response
114
+ if status_code == 200
115
+ begin
116
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
117
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper()
118
+ result.body = @client.deserialize(result_mapper, parsed_response)
119
+ rescue Exception => e
120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
121
+ end
122
+ end
123
+
124
+ result
125
+ end
126
+
127
+ promise.execute
128
+ end
129
+
130
+ #
131
+ # Creates or updates a database's blob auditing policy.
132
+ #
133
+ # @param resource_group_name [String] The name of the resource group that
134
+ # contains the resource. You can obtain this value from the Azure Resource
135
+ # Manager API or the portal.
136
+ # @param server_name [String] The name of the server.
137
+ # @param database_name [String] The name of the database.
138
+ # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing
139
+ # policy.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [DatabaseBlobAuditingPolicy] operation results.
144
+ #
145
+ def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
146
+ response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Creates or updates a database's blob auditing policy.
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 server_name [String] The name of the server.
157
+ # @param database_name [String] The name of the database.
158
+ # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing
159
+ # policy.
160
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
161
+ # will be added to the HTTP request.
162
+ #
163
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
164
+ #
165
+ def create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
166
+ create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
167
+ end
168
+
169
+ #
170
+ # Creates or updates a database's blob auditing policy.
171
+ #
172
+ # @param resource_group_name [String] The name of the resource group that
173
+ # contains the resource. You can obtain this value from the Azure Resource
174
+ # Manager API or the portal.
175
+ # @param server_name [String] The name of the server.
176
+ # @param database_name [String] The name of the database.
177
+ # @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing
178
+ # policy.
179
+ # @param [Hash{String => String}] A hash of custom headers that will be added
180
+ # to the HTTP request.
181
+ #
182
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
183
+ #
184
+ def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
185
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
186
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
187
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
188
+ blob_auditing_policy_name = 'default'
189
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
190
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
191
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
192
+
193
+
194
+ request_headers = {}
195
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
196
+
197
+ # Set Headers
198
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
199
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
200
+
201
+ # Serialize Request
202
+ request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper()
203
+ request_content = @client.serialize(request_mapper, parameters)
204
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
205
+
206
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}'
207
+
208
+ request_url = @base_url || @client.base_url
209
+
210
+ options = {
211
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
212
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id},
213
+ query_params: {'api-version' => @client.api_version},
214
+ body: request_content,
215
+ headers: request_headers.merge(custom_headers || {}),
216
+ base_url: request_url
217
+ }
218
+ promise = @client.make_request_async(:put, path_template, options)
219
+
220
+ promise = promise.then do |result|
221
+ http_response = result.response
222
+ status_code = http_response.status
223
+ response_content = http_response.body
224
+ unless status_code == 200 || status_code == 201
225
+ error_model = JSON.load(response_content)
226
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
227
+ end
228
+
229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
230
+ # Deserialize Response
231
+ if status_code == 200
232
+ begin
233
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
234
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper()
235
+ result.body = @client.deserialize(result_mapper, parsed_response)
236
+ rescue Exception => e
237
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
238
+ end
239
+ end
240
+ # Deserialize Response
241
+ if status_code == 201
242
+ begin
243
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
244
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseBlobAuditingPolicy.mapper()
245
+ result.body = @client.deserialize(result_mapper, parsed_response)
246
+ rescue Exception => e
247
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
248
+ end
249
+ end
250
+
251
+ result
252
+ end
253
+
254
+ promise.execute
255
+ end
256
+
257
+ end
258
+ end
@@ -5,10 +5,10 @@
5
5
 
6
6
  module Azure::SQL::Mgmt::V2017_03_01_preview
7
7
  #
8
- # The Azure SQL Database management API provides a RESTful set of web APIs
9
- # that interact with Azure SQL Database services to manage your databases.
10
- # The API enables users to create, retrieve, update, and delete databases,
11
- # servers, and other entities.
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
12
  #
13
13
  class DatabaseOperations
14
14
  include MsRestAzure
@@ -0,0 +1,400 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::SQL::Mgmt::V2017_03_01_preview
7
+ #
8
+ # The Azure SQL Database management API provides a RESTful set of web
9
+ # services that interact with Azure SQL Database services to manage your
10
+ # databases. The API enables you to create, retrieve, update, and delete
11
+ # databases.
12
+ #
13
+ class DatabaseVulnerabilityAssessmentRuleBaselines
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the DatabaseVulnerabilityAssessmentRuleBaselines 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 database's vulnerability assessment rule baseline.
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 server_name [String] The name of the server.
34
+ # @param database_name [String] The name of the database for which the
35
+ # vulnerability assessment rule baseline is defined.
36
+ # @param rule_id [String] The vulnerability assessment rule ID.
37
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
38
+ # the vulnerability assessment rule baseline (default implies a baseline on a
39
+ # database level rule and master for server level rule). Possible values
40
+ # include: 'master', 'default'
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [DatabaseVulnerabilityAssessmentRuleBaseline] operation results.
45
+ #
46
+ def get(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:nil)
47
+ response = get_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value!
48
+ response.body unless response.nil?
49
+ end
50
+
51
+ #
52
+ # Gets a database's vulnerability assessment rule baseline.
53
+ #
54
+ # @param resource_group_name [String] The name of the resource group that
55
+ # contains the resource. You can obtain this value from the Azure Resource
56
+ # Manager API or the portal.
57
+ # @param server_name [String] The name of the server.
58
+ # @param database_name [String] The name of the database for which the
59
+ # vulnerability assessment rule baseline is defined.
60
+ # @param rule_id [String] The vulnerability assessment rule ID.
61
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
62
+ # the vulnerability assessment rule baseline (default implies a baseline on a
63
+ # database level rule and master for server level rule). Possible values
64
+ # include: 'master', 'default'
65
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
66
+ # will be added to the HTTP request.
67
+ #
68
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
69
+ #
70
+ def get_with_http_info(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:nil)
71
+ get_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value!
72
+ end
73
+
74
+ #
75
+ # Gets a database's vulnerability assessment rule baseline.
76
+ #
77
+ # @param resource_group_name [String] The name of the resource group that
78
+ # contains the resource. You can obtain this value from the Azure Resource
79
+ # Manager API or the portal.
80
+ # @param server_name [String] The name of the server.
81
+ # @param database_name [String] The name of the database for which the
82
+ # vulnerability assessment rule baseline is defined.
83
+ # @param rule_id [String] The vulnerability assessment rule ID.
84
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
85
+ # the vulnerability assessment rule baseline (default implies a baseline on a
86
+ # database level rule and master for server level rule). Possible values
87
+ # include: 'master', 'default'
88
+ # @param [Hash{String => String}] A hash of custom headers that will be added
89
+ # to the HTTP request.
90
+ #
91
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
92
+ #
93
+ def get_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:nil)
94
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
95
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
96
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
97
+ vulnerability_assessment_name = 'default'
98
+ fail ArgumentError, 'rule_id is nil' if rule_id.nil?
99
+ fail ArgumentError, 'baseline_name is nil' if baseline_name.nil?
100
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
101
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
102
+
103
+
104
+ request_headers = {}
105
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
106
+
107
+ # Set Headers
108
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
109
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
110
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'
111
+
112
+ request_url = @base_url || @client.base_url
113
+
114
+ options = {
115
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
116
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'ruleId' => rule_id,'baselineName' => baseline_name,'subscriptionId' => @client.subscription_id},
117
+ query_params: {'api-version' => @client.api_version},
118
+ headers: request_headers.merge(custom_headers || {}),
119
+ base_url: request_url
120
+ }
121
+ promise = @client.make_request_async(:get, path_template, options)
122
+
123
+ promise = promise.then do |result|
124
+ http_response = result.response
125
+ status_code = http_response.status
126
+ response_content = http_response.body
127
+ unless status_code == 200
128
+ error_model = JSON.load(response_content)
129
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
130
+ end
131
+
132
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
133
+ # Deserialize Response
134
+ if status_code == 200
135
+ begin
136
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
137
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline.mapper()
138
+ result.body = @client.deserialize(result_mapper, parsed_response)
139
+ rescue Exception => e
140
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
141
+ end
142
+ end
143
+
144
+ result
145
+ end
146
+
147
+ promise.execute
148
+ end
149
+
150
+ #
151
+ # Creates or updates a database's vulnerability assessment rule baseline.
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 server_name [String] The name of the server.
157
+ # @param database_name [String] The name of the database for which the
158
+ # vulnerability assessment rule baseline is defined.
159
+ # @param rule_id [String] The vulnerability assessment rule ID.
160
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
161
+ # the vulnerability assessment rule baseline (default implies a baseline on a
162
+ # database level rule and master for server level rule). Possible values
163
+ # include: 'master', 'default'
164
+ # @param parameters [DatabaseVulnerabilityAssessmentRuleBaseline] The requested
165
+ # rule baseline resource.
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [DatabaseVulnerabilityAssessmentRuleBaseline] operation results.
170
+ #
171
+ def create_or_update(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers:nil)
172
+ response = create_or_update_async(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers:custom_headers).value!
173
+ response.body unless response.nil?
174
+ end
175
+
176
+ #
177
+ # Creates or updates a database's vulnerability assessment rule baseline.
178
+ #
179
+ # @param resource_group_name [String] The name of the resource group that
180
+ # contains the resource. You can obtain this value from the Azure Resource
181
+ # Manager API or the portal.
182
+ # @param server_name [String] The name of the server.
183
+ # @param database_name [String] The name of the database for which the
184
+ # vulnerability assessment rule baseline is defined.
185
+ # @param rule_id [String] The vulnerability assessment rule ID.
186
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
187
+ # the vulnerability assessment rule baseline (default implies a baseline on a
188
+ # database level rule and master for server level rule). Possible values
189
+ # include: 'master', 'default'
190
+ # @param parameters [DatabaseVulnerabilityAssessmentRuleBaseline] The requested
191
+ # rule baseline resource.
192
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
193
+ # will be added to the HTTP request.
194
+ #
195
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
196
+ #
197
+ def create_or_update_with_http_info(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers:nil)
198
+ create_or_update_async(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers:custom_headers).value!
199
+ end
200
+
201
+ #
202
+ # Creates or updates a database's vulnerability assessment rule baseline.
203
+ #
204
+ # @param resource_group_name [String] The name of the resource group that
205
+ # contains the resource. You can obtain this value from the Azure Resource
206
+ # Manager API or the portal.
207
+ # @param server_name [String] The name of the server.
208
+ # @param database_name [String] The name of the database for which the
209
+ # vulnerability assessment rule baseline is defined.
210
+ # @param rule_id [String] The vulnerability assessment rule ID.
211
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
212
+ # the vulnerability assessment rule baseline (default implies a baseline on a
213
+ # database level rule and master for server level rule). Possible values
214
+ # include: 'master', 'default'
215
+ # @param parameters [DatabaseVulnerabilityAssessmentRuleBaseline] The requested
216
+ # rule baseline resource.
217
+ # @param [Hash{String => String}] A hash of custom headers that will be added
218
+ # to the HTTP request.
219
+ #
220
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
221
+ #
222
+ def create_or_update_async(resource_group_name, server_name, database_name, rule_id, baseline_name, parameters, custom_headers:nil)
223
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
224
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
225
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
226
+ vulnerability_assessment_name = 'default'
227
+ fail ArgumentError, 'rule_id is nil' if rule_id.nil?
228
+ fail ArgumentError, 'baseline_name is nil' if baseline_name.nil?
229
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
230
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
231
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
232
+
233
+
234
+ request_headers = {}
235
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
236
+
237
+ # Set Headers
238
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
239
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
240
+
241
+ # Serialize Request
242
+ request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline.mapper()
243
+ request_content = @client.serialize(request_mapper, parameters)
244
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
245
+
246
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'
247
+
248
+ request_url = @base_url || @client.base_url
249
+
250
+ options = {
251
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
252
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'ruleId' => rule_id,'baselineName' => baseline_name,'subscriptionId' => @client.subscription_id},
253
+ query_params: {'api-version' => @client.api_version},
254
+ body: request_content,
255
+ headers: request_headers.merge(custom_headers || {}),
256
+ base_url: request_url
257
+ }
258
+ promise = @client.make_request_async(:put, path_template, options)
259
+
260
+ promise = promise.then do |result|
261
+ http_response = result.response
262
+ status_code = http_response.status
263
+ response_content = http_response.body
264
+ unless status_code == 200
265
+ error_model = JSON.load(response_content)
266
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
267
+ end
268
+
269
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
270
+ # Deserialize Response
271
+ if status_code == 200
272
+ begin
273
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
274
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::DatabaseVulnerabilityAssessmentRuleBaseline.mapper()
275
+ result.body = @client.deserialize(result_mapper, parsed_response)
276
+ rescue Exception => e
277
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
278
+ end
279
+ end
280
+
281
+ result
282
+ end
283
+
284
+ promise.execute
285
+ end
286
+
287
+ #
288
+ # Removes the database's vulnerability assessment rule baseline.
289
+ #
290
+ # @param resource_group_name [String] The name of the resource group that
291
+ # contains the resource. You can obtain this value from the Azure Resource
292
+ # Manager API or the portal.
293
+ # @param server_name [String] The name of the server.
294
+ # @param database_name [String] The name of the database for which the
295
+ # vulnerability assessment rule baseline is defined.
296
+ # @param rule_id [String] The vulnerability assessment rule ID.
297
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
298
+ # the vulnerability assessment rule baseline (default implies a baseline on a
299
+ # database level rule and master for server level rule). Possible values
300
+ # include: 'master', 'default'
301
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
302
+ # will be added to the HTTP request.
303
+ #
304
+ #
305
+ def delete(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:nil)
306
+ response = delete_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value!
307
+ nil
308
+ end
309
+
310
+ #
311
+ # Removes the database's vulnerability assessment rule baseline.
312
+ #
313
+ # @param resource_group_name [String] The name of the resource group that
314
+ # contains the resource. You can obtain this value from the Azure Resource
315
+ # Manager API or the portal.
316
+ # @param server_name [String] The name of the server.
317
+ # @param database_name [String] The name of the database for which the
318
+ # vulnerability assessment rule baseline is defined.
319
+ # @param rule_id [String] The vulnerability assessment rule ID.
320
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
321
+ # the vulnerability assessment rule baseline (default implies a baseline on a
322
+ # database level rule and master for server level rule). Possible values
323
+ # include: 'master', 'default'
324
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
325
+ # will be added to the HTTP request.
326
+ #
327
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
328
+ #
329
+ def delete_with_http_info(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:nil)
330
+ delete_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:custom_headers).value!
331
+ end
332
+
333
+ #
334
+ # Removes the database's vulnerability assessment rule baseline.
335
+ #
336
+ # @param resource_group_name [String] The name of the resource group that
337
+ # contains the resource. You can obtain this value from the Azure Resource
338
+ # Manager API or the portal.
339
+ # @param server_name [String] The name of the server.
340
+ # @param database_name [String] The name of the database for which the
341
+ # vulnerability assessment rule baseline is defined.
342
+ # @param rule_id [String] The vulnerability assessment rule ID.
343
+ # @param baseline_name [VulnerabilityAssessmentPolicyBaselineName] The name of
344
+ # the vulnerability assessment rule baseline (default implies a baseline on a
345
+ # database level rule and master for server level rule). Possible values
346
+ # include: 'master', 'default'
347
+ # @param [Hash{String => String}] A hash of custom headers that will be added
348
+ # to the HTTP request.
349
+ #
350
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
351
+ #
352
+ def delete_async(resource_group_name, server_name, database_name, rule_id, baseline_name, custom_headers:nil)
353
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
354
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
355
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
356
+ vulnerability_assessment_name = 'default'
357
+ fail ArgumentError, 'rule_id is nil' if rule_id.nil?
358
+ fail ArgumentError, 'baseline_name is nil' if baseline_name.nil?
359
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
360
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
361
+
362
+
363
+ request_headers = {}
364
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
365
+
366
+ # Set Headers
367
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
368
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
369
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'
370
+
371
+ request_url = @base_url || @client.base_url
372
+
373
+ options = {
374
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
375
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'ruleId' => rule_id,'baselineName' => baseline_name,'subscriptionId' => @client.subscription_id},
376
+ query_params: {'api-version' => @client.api_version},
377
+ headers: request_headers.merge(custom_headers || {}),
378
+ base_url: request_url
379
+ }
380
+ promise = @client.make_request_async(:delete, path_template, options)
381
+
382
+ promise = promise.then do |result|
383
+ http_response = result.response
384
+ status_code = http_response.status
385
+ response_content = http_response.body
386
+ unless status_code == 200
387
+ error_model = JSON.load(response_content)
388
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
389
+ end
390
+
391
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
392
+
393
+ result
394
+ end
395
+
396
+ promise.execute
397
+ end
398
+
399
+ end
400
+ end