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