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,621 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::SQL::Mgmt::V2017_10_01_preview
7
+ #
8
+ # The Azure SQL Database management API provides a RESTful set of web
9
+ # services that interact with Azure SQL Database services to manage your
10
+ # databases. The API enables you to create, retrieve, update, and delete
11
+ # databases.
12
+ #
13
+ class DatabaseVulnerabilityAssessmentScans
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the DatabaseVulnerabilityAssessmentScans 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 vulnerability assessment scan record of a database.
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 scan_id [String] The vulnerability assessment scan Id of the scan to
36
+ # retrieve.
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [VulnerabilityAssessmentScanRecord] operation results.
41
+ #
42
+ def get(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
43
+ response = get_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
44
+ response.body unless response.nil?
45
+ end
46
+
47
+ #
48
+ # Gets a vulnerability assessment scan record of a database.
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 scan_id [String] The vulnerability assessment scan Id of the scan to
56
+ # retrieve.
57
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
58
+ # will be added to the HTTP request.
59
+ #
60
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
61
+ #
62
+ def get_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
63
+ get_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
64
+ end
65
+
66
+ #
67
+ # Gets a vulnerability assessment scan record of a database.
68
+ #
69
+ # @param resource_group_name [String] The name of the resource group that
70
+ # contains the resource. You can obtain this value from the Azure Resource
71
+ # Manager API or the portal.
72
+ # @param server_name [String] The name of the server.
73
+ # @param database_name [String] The name of the database.
74
+ # @param scan_id [String] The vulnerability assessment scan Id of the scan to
75
+ # retrieve.
76
+ # @param [Hash{String => String}] A hash of custom headers that will be added
77
+ # to the HTTP request.
78
+ #
79
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
+ #
81
+ def get_async(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
82
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
83
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
84
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
85
+ vulnerability_assessment_name = 'default'
86
+ fail ArgumentError, 'scan_id is nil' if scan_id.nil?
87
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
88
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
89
+
90
+
91
+ request_headers = {}
92
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
93
+
94
+ # Set Headers
95
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
96
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
97
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'
98
+
99
+ request_url = @base_url || @client.base_url
100
+
101
+ options = {
102
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
103
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'scanId' => scan_id,'subscriptionId' => @client.subscription_id},
104
+ query_params: {'api-version' => @client.api_version},
105
+ headers: request_headers.merge(custom_headers || {}),
106
+ base_url: request_url
107
+ }
108
+ promise = @client.make_request_async(:get, path_template, options)
109
+
110
+ promise = promise.then do |result|
111
+ http_response = result.response
112
+ status_code = http_response.status
113
+ response_content = http_response.body
114
+ unless status_code == 200
115
+ error_model = JSON.load(response_content)
116
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
117
+ end
118
+
119
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
+ # Deserialize Response
121
+ if status_code == 200
122
+ begin
123
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::VulnerabilityAssessmentScanRecord.mapper()
125
+ result.body = @client.deserialize(result_mapper, parsed_response)
126
+ rescue Exception => e
127
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+
134
+ promise.execute
135
+ end
136
+
137
+ #
138
+ # Executes a Vulnerability Assessment database scan.
139
+ #
140
+ # @param resource_group_name [String] The name of the resource group that
141
+ # contains the resource. You can obtain this value from the Azure Resource
142
+ # Manager API or the portal.
143
+ # @param server_name [String] The name of the server.
144
+ # @param database_name [String] The name of the database.
145
+ # @param scan_id [String] The vulnerability assessment scan Id of the scan to
146
+ # retrieve.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ def initiate_scan(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
151
+ response = initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
152
+ nil
153
+ end
154
+
155
+ #
156
+ # @param resource_group_name [String] The name of the resource group that
157
+ # contains the resource. You can obtain this value from the Azure Resource
158
+ # Manager API or the portal.
159
+ # @param server_name [String] The name of the server.
160
+ # @param database_name [String] The name of the database.
161
+ # @param scan_id [String] The vulnerability assessment scan Id of the scan to
162
+ # retrieve.
163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
164
+ # will be added to the HTTP request.
165
+ #
166
+ # @return [Concurrent::Promise] promise which provides async access to http
167
+ # response.
168
+ #
169
+ def initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
170
+ # Send request
171
+ promise = begin_initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers)
172
+
173
+ promise = promise.then do |response|
174
+ # Defining deserialization method.
175
+ deserialize_method = lambda do |parsed_response|
176
+ end
177
+
178
+ # Waiting for response.
179
+ @client.get_long_running_operation_result(response, deserialize_method)
180
+ end
181
+
182
+ promise
183
+ end
184
+
185
+ #
186
+ # Lists the vulnerability assessment scans of a database.
187
+ #
188
+ # @param resource_group_name [String] The name of the resource group that
189
+ # contains the resource. You can obtain this value from the Azure Resource
190
+ # Manager API or the portal.
191
+ # @param server_name [String] The name of the server.
192
+ # @param database_name [String] The name of the database.
193
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
194
+ # will be added to the HTTP request.
195
+ #
196
+ # @return [Array<VulnerabilityAssessmentScanRecord>] operation results.
197
+ #
198
+ def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil)
199
+ first_page = list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:custom_headers)
200
+ first_page.get_all_items
201
+ end
202
+
203
+ #
204
+ # Lists the vulnerability assessment scans of a database.
205
+ #
206
+ # @param resource_group_name [String] The name of the resource group that
207
+ # contains the resource. You can obtain this value from the Azure Resource
208
+ # Manager API or the portal.
209
+ # @param server_name [String] The name of the server.
210
+ # @param database_name [String] The name of the database.
211
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
212
+ # will be added to the HTTP request.
213
+ #
214
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
215
+ #
216
+ def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
217
+ list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
218
+ end
219
+
220
+ #
221
+ # Lists the vulnerability assessment scans of a database.
222
+ #
223
+ # @param resource_group_name [String] The name of the resource group that
224
+ # contains the resource. You can obtain this value from the Azure Resource
225
+ # Manager API or the portal.
226
+ # @param server_name [String] The name of the server.
227
+ # @param database_name [String] The name of the database.
228
+ # @param [Hash{String => String}] A hash of custom headers that will be added
229
+ # to the HTTP request.
230
+ #
231
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
232
+ #
233
+ def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil)
234
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
235
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
236
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
237
+ vulnerability_assessment_name = 'default'
238
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
239
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
240
+
241
+
242
+ request_headers = {}
243
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
244
+
245
+ # Set Headers
246
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
247
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
248
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'
249
+
250
+ request_url = @base_url || @client.base_url
251
+
252
+ options = {
253
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
254
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'subscriptionId' => @client.subscription_id},
255
+ query_params: {'api-version' => @client.api_version},
256
+ headers: request_headers.merge(custom_headers || {}),
257
+ base_url: request_url
258
+ }
259
+ promise = @client.make_request_async(:get, path_template, options)
260
+
261
+ promise = promise.then do |result|
262
+ http_response = result.response
263
+ status_code = http_response.status
264
+ response_content = http_response.body
265
+ unless status_code == 200
266
+ error_model = JSON.load(response_content)
267
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
268
+ end
269
+
270
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
271
+ # Deserialize Response
272
+ if status_code == 200
273
+ begin
274
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
275
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::VulnerabilityAssessmentScanRecordListResult.mapper()
276
+ result.body = @client.deserialize(result_mapper, parsed_response)
277
+ rescue Exception => e
278
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
279
+ end
280
+ end
281
+
282
+ result
283
+ end
284
+
285
+ promise.execute
286
+ end
287
+
288
+ #
289
+ # Convert an existing scan result to a human readable format. If already exists
290
+ # nothing happens
291
+ #
292
+ # @param resource_group_name [String] The name of the resource group that
293
+ # contains the resource. You can obtain this value from the Azure Resource
294
+ # Manager API or the portal.
295
+ # @param server_name [String] The name of the server.
296
+ # @param database_name [String] The name of the scanned database.
297
+ # @param scan_id [String] The vulnerability assessment scan Id.
298
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
299
+ # will be added to the HTTP request.
300
+ #
301
+ # @return [DatabaseVulnerabilityAssessmentScansExport] operation results.
302
+ #
303
+ def export(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
304
+ response = export_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
305
+ response.body unless response.nil?
306
+ end
307
+
308
+ #
309
+ # Convert an existing scan result to a human readable format. If already exists
310
+ # nothing happens
311
+ #
312
+ # @param resource_group_name [String] The name of the resource group that
313
+ # contains the resource. You can obtain this value from the Azure Resource
314
+ # Manager API or the portal.
315
+ # @param server_name [String] The name of the server.
316
+ # @param database_name [String] The name of the scanned database.
317
+ # @param scan_id [String] The vulnerability assessment scan Id.
318
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
319
+ # will be added to the HTTP request.
320
+ #
321
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
322
+ #
323
+ def export_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
324
+ export_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
325
+ end
326
+
327
+ #
328
+ # Convert an existing scan result to a human readable format. If already exists
329
+ # nothing happens
330
+ #
331
+ # @param resource_group_name [String] The name of the resource group that
332
+ # contains the resource. You can obtain this value from the Azure Resource
333
+ # Manager API or the portal.
334
+ # @param server_name [String] The name of the server.
335
+ # @param database_name [String] The name of the scanned database.
336
+ # @param scan_id [String] The vulnerability assessment scan Id.
337
+ # @param [Hash{String => String}] A hash of custom headers that will be added
338
+ # to the HTTP request.
339
+ #
340
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
341
+ #
342
+ def export_async(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
343
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
344
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
345
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
346
+ vulnerability_assessment_name = 'default'
347
+ fail ArgumentError, 'scan_id is nil' if scan_id.nil?
348
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
349
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
350
+
351
+
352
+ request_headers = {}
353
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
354
+
355
+ # Set Headers
356
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
357
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
358
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export'
359
+
360
+ request_url = @base_url || @client.base_url
361
+
362
+ options = {
363
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
364
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'scanId' => scan_id,'subscriptionId' => @client.subscription_id},
365
+ query_params: {'api-version' => @client.api_version},
366
+ headers: request_headers.merge(custom_headers || {}),
367
+ base_url: request_url
368
+ }
369
+ promise = @client.make_request_async(:post, path_template, options)
370
+
371
+ promise = promise.then do |result|
372
+ http_response = result.response
373
+ status_code = http_response.status
374
+ response_content = http_response.body
375
+ unless status_code == 200 || status_code == 201
376
+ error_model = JSON.load(response_content)
377
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
378
+ end
379
+
380
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
381
+ # Deserialize Response
382
+ if status_code == 200
383
+ begin
384
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
385
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::DatabaseVulnerabilityAssessmentScansExport.mapper()
386
+ result.body = @client.deserialize(result_mapper, parsed_response)
387
+ rescue Exception => e
388
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
389
+ end
390
+ end
391
+ # Deserialize Response
392
+ if status_code == 201
393
+ begin
394
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
395
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::DatabaseVulnerabilityAssessmentScansExport.mapper()
396
+ result.body = @client.deserialize(result_mapper, parsed_response)
397
+ rescue Exception => e
398
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
399
+ end
400
+ end
401
+
402
+ result
403
+ end
404
+
405
+ promise.execute
406
+ end
407
+
408
+ #
409
+ # Executes a Vulnerability Assessment database scan.
410
+ #
411
+ # @param resource_group_name [String] The name of the resource group that
412
+ # contains the resource. You can obtain this value from the Azure Resource
413
+ # Manager API or the portal.
414
+ # @param server_name [String] The name of the server.
415
+ # @param database_name [String] The name of the database.
416
+ # @param scan_id [String] The vulnerability assessment scan Id of the scan to
417
+ # retrieve.
418
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
419
+ # will be added to the HTTP request.
420
+ #
421
+ #
422
+ def begin_initiate_scan(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
423
+ response = begin_initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
424
+ nil
425
+ end
426
+
427
+ #
428
+ # Executes a Vulnerability Assessment database scan.
429
+ #
430
+ # @param resource_group_name [String] The name of the resource group that
431
+ # contains the resource. You can obtain this value from the Azure Resource
432
+ # Manager API or the portal.
433
+ # @param server_name [String] The name of the server.
434
+ # @param database_name [String] The name of the database.
435
+ # @param scan_id [String] The vulnerability assessment scan Id of the scan to
436
+ # retrieve.
437
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
438
+ # will be added to the HTTP request.
439
+ #
440
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
441
+ #
442
+ def begin_initiate_scan_with_http_info(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
443
+ begin_initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:custom_headers).value!
444
+ end
445
+
446
+ #
447
+ # Executes a Vulnerability Assessment database scan.
448
+ #
449
+ # @param resource_group_name [String] The name of the resource group that
450
+ # contains the resource. You can obtain this value from the Azure Resource
451
+ # Manager API or the portal.
452
+ # @param server_name [String] The name of the server.
453
+ # @param database_name [String] The name of the database.
454
+ # @param scan_id [String] The vulnerability assessment scan Id of the scan to
455
+ # retrieve.
456
+ # @param [Hash{String => String}] A hash of custom headers that will be added
457
+ # to the HTTP request.
458
+ #
459
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
460
+ #
461
+ def begin_initiate_scan_async(resource_group_name, server_name, database_name, scan_id, custom_headers:nil)
462
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
463
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
464
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
465
+ vulnerability_assessment_name = 'default'
466
+ fail ArgumentError, 'scan_id is nil' if scan_id.nil?
467
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
468
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
469
+
470
+
471
+ request_headers = {}
472
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
473
+
474
+ # Set Headers
475
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
476
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
477
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan'
478
+
479
+ request_url = @base_url || @client.base_url
480
+
481
+ options = {
482
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
483
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'vulnerabilityAssessmentName' => vulnerability_assessment_name,'scanId' => scan_id,'subscriptionId' => @client.subscription_id},
484
+ query_params: {'api-version' => @client.api_version},
485
+ headers: request_headers.merge(custom_headers || {}),
486
+ base_url: request_url
487
+ }
488
+ promise = @client.make_request_async(:post, path_template, options)
489
+
490
+ promise = promise.then do |result|
491
+ http_response = result.response
492
+ status_code = http_response.status
493
+ response_content = http_response.body
494
+ unless status_code == 200 || status_code == 202
495
+ error_model = JSON.load(response_content)
496
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
497
+ end
498
+
499
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
500
+
501
+ result
502
+ end
503
+
504
+ promise.execute
505
+ end
506
+
507
+ #
508
+ # Lists the vulnerability assessment scans of a database.
509
+ #
510
+ # @param next_page_link [String] The NextLink from the previous successful call
511
+ # to List operation.
512
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
513
+ # will be added to the HTTP request.
514
+ #
515
+ # @return [VulnerabilityAssessmentScanRecordListResult] operation results.
516
+ #
517
+ def list_by_database_next(next_page_link, custom_headers:nil)
518
+ response = list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
519
+ response.body unless response.nil?
520
+ end
521
+
522
+ #
523
+ # Lists the vulnerability assessment scans of a database.
524
+ #
525
+ # @param next_page_link [String] The NextLink from the previous successful call
526
+ # to List operation.
527
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
528
+ # will be added to the HTTP request.
529
+ #
530
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
531
+ #
532
+ def list_by_database_next_with_http_info(next_page_link, custom_headers:nil)
533
+ list_by_database_next_async(next_page_link, custom_headers:custom_headers).value!
534
+ end
535
+
536
+ #
537
+ # Lists the vulnerability assessment scans of a database.
538
+ #
539
+ # @param next_page_link [String] The NextLink from the previous successful call
540
+ # to List operation.
541
+ # @param [Hash{String => String}] A hash of custom headers that will be added
542
+ # to the HTTP request.
543
+ #
544
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
545
+ #
546
+ def list_by_database_next_async(next_page_link, custom_headers:nil)
547
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
548
+
549
+
550
+ request_headers = {}
551
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
552
+
553
+ # Set Headers
554
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
555
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
556
+ path_template = '{nextLink}'
557
+
558
+ request_url = @base_url || @client.base_url
559
+
560
+ options = {
561
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
562
+ skip_encoding_path_params: {'nextLink' => next_page_link},
563
+ headers: request_headers.merge(custom_headers || {}),
564
+ base_url: request_url
565
+ }
566
+ promise = @client.make_request_async(:get, path_template, options)
567
+
568
+ promise = promise.then do |result|
569
+ http_response = result.response
570
+ status_code = http_response.status
571
+ response_content = http_response.body
572
+ unless status_code == 200
573
+ error_model = JSON.load(response_content)
574
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
575
+ end
576
+
577
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
578
+ # Deserialize Response
579
+ if status_code == 200
580
+ begin
581
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
582
+ result_mapper = Azure::SQL::Mgmt::V2017_10_01_preview::Models::VulnerabilityAssessmentScanRecordListResult.mapper()
583
+ result.body = @client.deserialize(result_mapper, parsed_response)
584
+ rescue Exception => e
585
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
586
+ end
587
+ end
588
+
589
+ result
590
+ end
591
+
592
+ promise.execute
593
+ end
594
+
595
+ #
596
+ # Lists the vulnerability assessment scans of a database.
597
+ #
598
+ # @param resource_group_name [String] The name of the resource group that
599
+ # contains the resource. You can obtain this value from the Azure Resource
600
+ # Manager API or the portal.
601
+ # @param server_name [String] The name of the server.
602
+ # @param database_name [String] The name of the database.
603
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
604
+ # will be added to the HTTP request.
605
+ #
606
+ # @return [VulnerabilityAssessmentScanRecordListResult] which provide lazy
607
+ # access to pages of the response.
608
+ #
609
+ def list_by_database_as_lazy(resource_group_name, server_name, database_name, custom_headers:nil)
610
+ response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
611
+ unless response.nil?
612
+ page = response.body
613
+ page.next_method = Proc.new do |next_page_link|
614
+ list_by_database_next_async(next_page_link, custom_headers:custom_headers)
615
+ end
616
+ page
617
+ end
618
+ end
619
+
620
+ end
621
+ end