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
@@ -20,43 +20,120 @@ require '2017-03-01-preview/generated/azure_mgmt_sql/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::SQL::Mgmt::V2017_03_01_preview
23
+ autoload :ExtendedDatabaseBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb'
24
+ autoload :ExtendedServerBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb'
25
+ autoload :ServerBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb'
26
+ autoload :DatabaseBlobAuditingPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb'
23
27
  autoload :DatabaseOperations, '2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb'
24
28
  autoload :Databases, '2017-03-01-preview/generated/azure_mgmt_sql/databases.rb'
25
- autoload :DatabaseRestorePoints, '2017-03-01-preview/generated/azure_mgmt_sql/database_restore_points.rb'
29
+ autoload :DatabaseVulnerabilityAssessmentRuleBaselines, '2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb'
30
+ autoload :DatabaseVulnerabilityAssessments, '2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb'
31
+ autoload :DataWarehouseUserActivitiesOperations, '2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb'
32
+ autoload :JobAgents, '2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb'
33
+ autoload :JobCredentials, '2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb'
34
+ autoload :JobExecutions, '2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb'
35
+ autoload :Jobs, '2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb'
36
+ autoload :JobStepExecutions, '2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb'
37
+ autoload :JobSteps, '2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb'
38
+ autoload :JobTargetExecutions, '2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb'
39
+ autoload :JobTargetGroups, '2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb'
40
+ autoload :JobVersions, '2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb'
41
+ autoload :LongTermRetentionBackups, '2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb'
42
+ autoload :BackupLongTermRetentionPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb'
43
+ autoload :ManagedDatabases, '2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb'
44
+ autoload :RestorePoints, '2017-03-01-preview/generated/azure_mgmt_sql/restore_points.rb'
45
+ autoload :SensitivityLabels, '2017-03-01-preview/generated/azure_mgmt_sql/sensitivity_labels.rb'
26
46
  autoload :ServerAutomaticTuningOperations, '2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb'
27
47
  autoload :ServerDnsAliases, '2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb'
48
+ autoload :ServerSecurityAlertPolicies, '2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb'
28
49
  autoload :SqlManagementClient, '2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb'
29
50
 
30
51
  module Models
31
- autoload :DatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb'
52
+ autoload :JobListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb'
53
+ autoload :Resource, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb'
54
+ autoload :JobStepAction, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb'
55
+ autoload :ManagedDatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb'
56
+ autoload :ManagedDatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb'
57
+ autoload :ServerDnsAliasAcquisition, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb'
58
+ autoload :CompleteDatabaseRestoreDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb'
32
59
  autoload :AutomaticTuningServerOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_options.rb'
33
- autoload :DatabaseOperationListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb'
60
+ autoload :JobAgentListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb'
61
+ autoload :SensitivityLabelListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_list_result.rb'
62
+ autoload :JobAgentUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb'
34
63
  autoload :CreateDatabaseRestorePointDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_database_restore_point_definition.rb'
35
- autoload :DatabaseRestorePointListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_restore_point_list_result.rb'
36
- autoload :ArmSku, '2017-03-01-preview/generated/azure_mgmt_sql/models/arm_sku.rb'
37
- autoload :ImportExportDatabaseDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb'
64
+ autoload :LongTermRetentionBackupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup_list_result.rb'
65
+ autoload :DatabaseUpdate, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb'
66
+ autoload :JobCredentialListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb'
67
+ autoload :RestorePointListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb'
68
+ autoload :JobExecutionTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb'
69
+ autoload :ResourceMoveDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb'
70
+ autoload :JobVersionListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb'
71
+ autoload :JobExecutionListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb'
72
+ autoload :DatabaseOperationListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb'
73
+ autoload :JobSchedule, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb'
38
74
  autoload :DatabaseListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb'
75
+ autoload :JobTargetGroupListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb'
76
+ autoload :DatabaseVulnerabilityAssessmentRuleBaselineItem, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb'
77
+ autoload :VulnerabilityAssessmentRecurringScansProperties, '2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb'
78
+ autoload :JobStepListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb'
79
+ autoload :Sku, '2017-03-01-preview/generated/azure_mgmt_sql/models/sku.rb'
80
+ autoload :JobTarget, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb'
39
81
  autoload :ServerDnsAliasListResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_list_result.rb'
40
- autoload :ResourceMoveDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb'
41
- autoload :Resource, '2017-03-01-preview/generated/azure_mgmt_sql/models/resource.rb'
42
- autoload :ServerDnsAliasAcquisition, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias_acquisition.rb'
82
+ autoload :JobStepOutput, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb'
83
+ autoload :ImportExportDatabaseDefinition, '2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_database_definition.rb'
84
+ autoload :JobStepExecutionOptions, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb'
43
85
  autoload :ProxyResource, '2017-03-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb'
86
+ autoload :ExtendedDatabaseBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb'
87
+ autoload :ExtendedServerBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb'
88
+ autoload :ServerBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb'
89
+ autoload :DatabaseBlobAuditingPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb'
44
90
  autoload :DatabaseOperation, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb'
45
91
  autoload :TrackedResource, '2017-03-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb'
46
92
  autoload :Database, '2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb'
47
93
  autoload :ImportExportOperationResult, '2017-03-01-preview/generated/azure_mgmt_sql/models/import_export_operation_result.rb'
48
- autoload :DatabaseRestorePoint, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_restore_point.rb'
94
+ autoload :DatabaseVulnerabilityAssessmentRuleBaseline, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb'
95
+ autoload :DatabaseVulnerabilityAssessment, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb'
96
+ autoload :DataWarehouseUserActivities, '2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb'
97
+ autoload :JobAgent, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb'
98
+ autoload :JobCredential, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb'
99
+ autoload :JobExecution, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb'
100
+ autoload :Job, '2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb'
101
+ autoload :JobStep, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb'
102
+ autoload :JobTargetGroup, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb'
103
+ autoload :JobVersion, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb'
104
+ autoload :LongTermRetentionBackup, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb'
105
+ autoload :BackupLongTermRetentionPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb'
106
+ autoload :ManagedDatabase, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb'
107
+ autoload :RestorePoint, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point.rb'
108
+ autoload :SensitivityLabel, '2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label.rb'
49
109
  autoload :ServerAutomaticTuning, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_automatic_tuning.rb'
50
110
  autoload :ServerDnsAlias, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_dns_alias.rb'
111
+ autoload :ServerSecurityAlertPolicy, '2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb'
112
+ autoload :BlobAuditingPolicyState, '2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb'
51
113
  autoload :ManagementOperationState, '2017-03-01-preview/generated/azure_mgmt_sql/models/management_operation_state.rb'
52
114
  autoload :CreateMode, '2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb'
53
115
  autoload :SampleName, '2017-03-01-preview/generated/azure_mgmt_sql/models/sample_name.rb'
54
- autoload :Status, '2017-03-01-preview/generated/azure_mgmt_sql/models/status.rb'
116
+ autoload :DatabaseStatus, '2017-03-01-preview/generated/azure_mgmt_sql/models/database_status.rb'
55
117
  autoload :CatalogCollationType, '2017-03-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb'
118
+ autoload :JobAgentState, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb'
119
+ autoload :JobExecutionLifecycle, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb'
120
+ autoload :ProvisioningState, '2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb'
121
+ autoload :JobTargetType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb'
122
+ autoload :JobScheduleType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb'
123
+ autoload :JobStepActionType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb'
124
+ autoload :JobStepActionSource, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb'
125
+ autoload :JobStepOutputType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb'
126
+ autoload :JobTargetGroupMembershipType, '2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb'
127
+ autoload :ManagedDatabaseStatus, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb'
128
+ autoload :ManagedDatabaseCreateMode, '2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb'
56
129
  autoload :RestorePointType, '2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_type.rb'
57
130
  autoload :AutomaticTuningServerMode, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_mode.rb'
58
131
  autoload :AutomaticTuningOptionModeDesired, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb'
59
132
  autoload :AutomaticTuningOptionModeActual, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb'
60
133
  autoload :AutomaticTuningServerReason, '2017-03-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_server_reason.rb'
134
+ autoload :SecurityAlertPolicyState, '2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_policy_state.rb'
135
+ autoload :LongTermRetentionDatabaseState, '2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb'
136
+ autoload :VulnerabilityAssessmentPolicyBaselineName, '2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb'
137
+ autoload :SensitivityLabelSource, '2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_source.rb'
61
138
  end
62
139
  end
@@ -0,0 +1,402 @@
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 BackupLongTermRetentionPolicies
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the BackupLongTermRetentionPolicies class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [SqlManagementClient] reference to the SqlManagementClient
25
+ attr_reader :client
26
+
27
+ #
28
+ # Gets a database's long term retention policy.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group that
31
+ # contains the resource. You can obtain this value from the Azure Resource
32
+ # Manager API or the portal.
33
+ # @param server_name [String] The name of the server.
34
+ # @param database_name [String] The name of the database.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [BackupLongTermRetentionPolicy] operation results.
39
+ #
40
+ def get(resource_group_name, server_name, database_name, custom_headers:nil)
41
+ response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Gets a database's long term retention policy.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group that
49
+ # contains the resource. You can obtain this value from the Azure Resource
50
+ # Manager API or the portal.
51
+ # @param server_name [String] The name of the server.
52
+ # @param database_name [String] The name of the database.
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
+ #
58
+ def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
59
+ get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Gets a database's long term retention policy.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group that
66
+ # contains the resource. You can obtain this value from the Azure Resource
67
+ # Manager API or the portal.
68
+ # @param server_name [String] The name of the server.
69
+ # @param database_name [String] The name of the database.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def get_async(resource_group_name, server_name, database_name, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
78
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
79
+ policy_name = 'default'
80
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
81
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ # Deserialize Response
114
+ if status_code == 200
115
+ begin
116
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
117
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper()
118
+ result.body = @client.deserialize(result_mapper, parsed_response)
119
+ rescue Exception => e
120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
121
+ end
122
+ end
123
+
124
+ result
125
+ end
126
+
127
+ promise.execute
128
+ end
129
+
130
+ #
131
+ # Sets a database's long term retention policy.
132
+ #
133
+ # @param resource_group_name [String] The name of the resource group that
134
+ # contains the resource. You can obtain this value from the Azure Resource
135
+ # Manager API or the portal.
136
+ # @param server_name [String] The name of the server.
137
+ # @param database_name [String] The name of the database.
138
+ # @param parameters [BackupLongTermRetentionPolicy] The long term retention
139
+ # policy info.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [BackupLongTermRetentionPolicy] operation results.
144
+ #
145
+ def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
146
+ response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # @param resource_group_name [String] The name of the resource group that
152
+ # contains the resource. You can obtain this value from the Azure Resource
153
+ # Manager API or the portal.
154
+ # @param server_name [String] The name of the server.
155
+ # @param database_name [String] The name of the database.
156
+ # @param parameters [BackupLongTermRetentionPolicy] The long term retention
157
+ # policy info.
158
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
159
+ # will be added to the HTTP request.
160
+ #
161
+ # @return [Concurrent::Promise] promise which provides async access to http
162
+ # response.
163
+ #
164
+ def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
165
+ # Send request
166
+ promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers)
167
+
168
+ promise = promise.then do |response|
169
+ # Defining deserialization method.
170
+ deserialize_method = lambda do |parsed_response|
171
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper()
172
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
173
+ end
174
+
175
+ # Waiting for response.
176
+ @client.get_long_running_operation_result(response, deserialize_method)
177
+ end
178
+
179
+ promise
180
+ end
181
+
182
+ #
183
+ # Gets a database's long term retention policy.
184
+ #
185
+ # @param resource_group_name [String] The name of the resource group that
186
+ # contains the resource. You can obtain this value from the Azure Resource
187
+ # Manager API or the portal.
188
+ # @param server_name [String] The name of the server.
189
+ # @param database_name [String] The name of the database.
190
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
191
+ # will be added to the HTTP request.
192
+ #
193
+ # @return [BackupLongTermRetentionPolicy] operation results.
194
+ #
195
+ def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil)
196
+ response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
197
+ response.body unless response.nil?
198
+ end
199
+
200
+ #
201
+ # Gets a database's long term retention policy.
202
+ #
203
+ # @param resource_group_name [String] The name of the resource group that
204
+ # contains the resource. You can obtain this value from the Azure Resource
205
+ # Manager API or the portal.
206
+ # @param server_name [String] The name of the server.
207
+ # @param database_name [String] The name of the database.
208
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
209
+ # will be added to the HTTP request.
210
+ #
211
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
212
+ #
213
+ def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
214
+ list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
215
+ end
216
+
217
+ #
218
+ # Gets a database's long term retention policy.
219
+ #
220
+ # @param resource_group_name [String] The name of the resource group that
221
+ # contains the resource. You can obtain this value from the Azure Resource
222
+ # Manager API or the portal.
223
+ # @param server_name [String] The name of the server.
224
+ # @param database_name [String] The name of the database.
225
+ # @param [Hash{String => String}] A hash of custom headers that will be added
226
+ # to the HTTP request.
227
+ #
228
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
229
+ #
230
+ def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil)
231
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
232
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
233
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
234
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
235
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
236
+
237
+
238
+ request_headers = {}
239
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
240
+
241
+ # Set Headers
242
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
243
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
244
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies'
245
+
246
+ request_url = @base_url || @client.base_url
247
+
248
+ options = {
249
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
250
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'subscriptionId' => @client.subscription_id},
251
+ query_params: {'api-version' => @client.api_version},
252
+ headers: request_headers.merge(custom_headers || {}),
253
+ base_url: request_url
254
+ }
255
+ promise = @client.make_request_async(:get, path_template, options)
256
+
257
+ promise = promise.then do |result|
258
+ http_response = result.response
259
+ status_code = http_response.status
260
+ response_content = http_response.body
261
+ unless status_code == 200
262
+ error_model = JSON.load(response_content)
263
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
264
+ end
265
+
266
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
267
+ # Deserialize Response
268
+ if status_code == 200
269
+ begin
270
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
271
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper()
272
+ result.body = @client.deserialize(result_mapper, parsed_response)
273
+ rescue Exception => e
274
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
275
+ end
276
+ end
277
+
278
+ result
279
+ end
280
+
281
+ promise.execute
282
+ end
283
+
284
+ #
285
+ # Sets a database's long term retention policy.
286
+ #
287
+ # @param resource_group_name [String] The name of the resource group that
288
+ # contains the resource. You can obtain this value from the Azure Resource
289
+ # Manager API or the portal.
290
+ # @param server_name [String] The name of the server.
291
+ # @param database_name [String] The name of the database.
292
+ # @param parameters [BackupLongTermRetentionPolicy] The long term retention
293
+ # policy info.
294
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
295
+ # will be added to the HTTP request.
296
+ #
297
+ # @return [BackupLongTermRetentionPolicy] operation results.
298
+ #
299
+ def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
300
+ response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
301
+ response.body unless response.nil?
302
+ end
303
+
304
+ #
305
+ # Sets a database's long term retention policy.
306
+ #
307
+ # @param resource_group_name [String] The name of the resource group that
308
+ # contains the resource. You can obtain this value from the Azure Resource
309
+ # Manager API or the portal.
310
+ # @param server_name [String] The name of the server.
311
+ # @param database_name [String] The name of the database.
312
+ # @param parameters [BackupLongTermRetentionPolicy] The long term retention
313
+ # policy info.
314
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
315
+ # will be added to the HTTP request.
316
+ #
317
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
318
+ #
319
+ def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
320
+ begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
321
+ end
322
+
323
+ #
324
+ # Sets a database's long term retention policy.
325
+ #
326
+ # @param resource_group_name [String] The name of the resource group that
327
+ # contains the resource. You can obtain this value from the Azure Resource
328
+ # Manager API or the portal.
329
+ # @param server_name [String] The name of the server.
330
+ # @param database_name [String] The name of the database.
331
+ # @param parameters [BackupLongTermRetentionPolicy] The long term retention
332
+ # policy info.
333
+ # @param [Hash{String => String}] A hash of custom headers that will be added
334
+ # to the HTTP request.
335
+ #
336
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
337
+ #
338
+ def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
339
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
340
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
341
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
342
+ policy_name = 'default'
343
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
344
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
345
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
346
+
347
+
348
+ request_headers = {}
349
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
350
+
351
+ # Set Headers
352
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
353
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
354
+
355
+ # Serialize Request
356
+ request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper()
357
+ request_content = @client.serialize(request_mapper, parameters)
358
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
359
+
360
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}'
361
+
362
+ request_url = @base_url || @client.base_url
363
+
364
+ options = {
365
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'policyName' => policy_name,'subscriptionId' => @client.subscription_id},
367
+ query_params: {'api-version' => @client.api_version},
368
+ body: request_content,
369
+ headers: request_headers.merge(custom_headers || {}),
370
+ base_url: request_url
371
+ }
372
+ promise = @client.make_request_async(:put, path_template, options)
373
+
374
+ promise = promise.then do |result|
375
+ http_response = result.response
376
+ status_code = http_response.status
377
+ response_content = http_response.body
378
+ unless status_code == 200 || status_code == 202
379
+ error_model = JSON.load(response_content)
380
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
381
+ end
382
+
383
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
384
+ # Deserialize Response
385
+ if status_code == 200
386
+ begin
387
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
388
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::BackupLongTermRetentionPolicy.mapper()
389
+ result.body = @client.deserialize(result_mapper, parsed_response)
390
+ rescue Exception => e
391
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
392
+ end
393
+ end
394
+
395
+ result
396
+ end
397
+
398
+ promise.execute
399
+ end
400
+
401
+ end
402
+ end