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