azure_mgmt_sql 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2014-04-01/generated/azure_mgmt_sql.rb +62 -61
  3. data/lib/2014-04-01/generated/azure_mgmt_sql/models/database.rb +8 -8
  4. data/lib/2014-04-01/generated/azure_mgmt_sql/models/elastic_pool.rb +8 -8
  5. data/lib/2014-04-01/generated/azure_mgmt_sql/models/server.rb +8 -8
  6. data/lib/2014-04-01/generated/azure_mgmt_sql/models/tracked_resource.rb +11 -11
  7. data/lib/2014-04-01/generated/azure_mgmt_sql/server_advisors.rb +454 -0
  8. data/lib/2014-04-01/generated/azure_mgmt_sql/sql_management_client.rb +22 -17
  9. data/lib/2015-05-01-preview/generated/azure_mgmt_sql.rb +43 -25
  10. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_automatic_tuning_operations.rb +246 -0
  11. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +6 -12
  12. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/firewall_rules.rb +666 -0
  13. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/managed_instances.rb +986 -0
  14. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_disabled_reason.rb +21 -0
  15. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_mode.rb +18 -0
  16. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_actual.rb +16 -0
  17. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_option_mode_desired.rb +17 -0
  18. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/automatic_tuning_options.rb +91 -0
  19. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_automatic_tuning.rb +110 -0
  20. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +72 -2
  21. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule.rb +86 -0
  22. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list.rb +55 -0
  23. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/firewall_rule_list_result.rb +100 -0
  24. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance.rb +206 -0
  25. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_list_result.rb +100 -0
  26. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/managed_instance_update.rb +161 -0
  27. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/proxy_resource_with_writable_name.rb +61 -0
  28. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/resource_with_writable_name.rb +70 -0
  29. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/models/sku.rb +97 -0
  30. data/lib/2015-05-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +20 -6
  31. data/lib/2017-03-01-preview/generated/azure_mgmt_sql.rb +88 -11
  32. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/backup_long_term_retention_policies.rb +402 -0
  33. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/data_warehouse_user_activities_operations.rb +134 -0
  34. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_blob_auditing_policies.rb +258 -0
  35. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_operations.rb +4 -4
  36. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_rule_baselines.rb +400 -0
  37. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessments.rb +356 -0
  38. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/databases.rb +4 -4
  39. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_database_blob_auditing_policies.rb +258 -0
  40. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/extended_server_blob_auditing_policies.rb +290 -0
  41. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_agents.rb +816 -0
  42. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_credentials.rb +571 -0
  43. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_executions.rb +1101 -0
  44. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_step_executions.rb +415 -0
  45. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_steps.rb +927 -0
  46. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_executions.rb +697 -0
  47. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_target_groups.rb +571 -0
  48. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/job_versions.rb +358 -0
  49. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/jobs.rb +570 -0
  50. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/long_term_retention_backups.rb +925 -0
  51. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/managed_databases.rb +963 -0
  52. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/backup_long_term_retention_policy.rb +110 -0
  53. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/blob_auditing_policy_state.rb +16 -0
  54. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/complete_database_restore_definition.rb +47 -0
  55. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +1 -0
  56. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/data_warehouse_user_activities.rb +74 -0
  57. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database.rb +9 -9
  58. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_blob_auditing_policy.rb +238 -0
  59. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +36 -0
  60. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{status.rb → database_status.rb} +2 -2
  61. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_update.rb +9 -9
  62. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +100 -0
  63. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline.rb +84 -0
  64. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_rule_baseline_item.rb +56 -0
  65. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_database_blob_auditing_policy.rb +238 -0
  66. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/extended_server_blob_auditing_policy.rb +238 -0
  67. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job.rb +99 -0
  68. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent.rb +122 -0
  69. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_list_result.rb +100 -0
  70. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_state.rb +19 -0
  71. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_agent_update.rb +54 -0
  72. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential.rb +85 -0
  73. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_credential_list_result.rb +100 -0
  74. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution.rb +224 -0
  75. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_lifecycle.rb +24 -0
  76. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_list_result.rb +100 -0
  77. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_execution_target.rb +73 -0
  78. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_list_result.rb +100 -0
  79. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule.rb +98 -0
  80. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_schedule_type.rb +16 -0
  81. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step.rb +135 -0
  82. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action.rb +73 -0
  83. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_source.rb +15 -0
  84. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_action_type.rb +15 -0
  85. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_execution_options.rb +100 -0
  86. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_list_result.rb +100 -0
  87. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output.rb +127 -0
  88. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_step_output_type.rb +15 -0
  89. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target.rb +121 -0
  90. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group.rb +82 -0
  91. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_list_result.rb +100 -0
  92. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_group_membership_type.rb +16 -0
  93. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_target_type.rb +19 -0
  94. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version.rb +62 -0
  95. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/job_version_list_result.rb +100 -0
  96. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_backup.rb +134 -0
  97. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{database_restore_point_list_result.rb → long_term_retention_backup_list_result.rb} +9 -9
  98. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/long_term_retention_database_state.rb +17 -0
  99. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database.rb +242 -0
  100. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_create_mode.rb +17 -0
  101. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_list_result.rb +100 -0
  102. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_status.rb +19 -0
  103. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/managed_database_update.rb +210 -0
  104. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/provisioning_state.rb +19 -0
  105. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{database_restore_point.rb → restore_point.rb} +6 -5
  106. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/restore_point_list_result.rb +68 -0
  107. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/security_alert_policy_state.rb +17 -0
  108. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label.rb +84 -0
  109. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_list_result.rb +100 -0
  110. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/sensitivity_label_source.rb +16 -0
  111. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_blob_auditing_policy.rb +226 -0
  112. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/server_security_alert_policy.rb +166 -0
  113. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/{arm_sku.rb → sku.rb} +16 -11
  114. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_policy_baseline_name.rb +16 -0
  115. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb +80 -0
  116. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/{database_restore_points.rb → restore_points.rb} +93 -111
  117. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sensitivity_labels.rb +612 -0
  118. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_automatic_tuning_operations.rb +4 -4
  119. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_blob_auditing_policies.rb +290 -0
  120. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_dns_aliases.rb +4 -4
  121. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/server_security_alert_policies.rb +290 -0
  122. data/lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +100 -9
  123. data/lib/2017-10-01-preview/generated/azure_mgmt_sql.rb +104 -0
  124. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/backup_short_term_retention_policies.rb +684 -0
  125. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/capabilities.rb +128 -0
  126. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_operations.rb +338 -0
  127. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/database_vulnerability_assessment_scans.rb +621 -0
  128. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/databases.rb +1566 -0
  129. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pool_operations.rb +338 -0
  130. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/elastic_pools.rb +815 -0
  131. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/instance_failover_groups.rb +983 -0
  132. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/managed_instance_tde_certificates.rb +175 -0
  133. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy.rb +74 -0
  134. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/backup_short_term_retention_policy_list_result.rb +101 -0
  135. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/capability_group.rb +17 -0
  136. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/capability_status.rb +18 -0
  137. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/catalog_collation_type.rb +16 -0
  138. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/create_mode.rb +24 -0
  139. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database.rb +482 -0
  140. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_license_type.rb +16 -0
  141. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_list_result.rb +100 -0
  142. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation.rb +233 -0
  143. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_operation_list_result.rb +100 -0
  144. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_read_scale.rb +16 -0
  145. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_status.rb +32 -0
  146. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_update.rb +425 -0
  147. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment.rb +100 -0
  148. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/database_vulnerability_assessment_scans_export.rb +76 -0
  149. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/edition_capability.rb +107 -0
  150. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool.rb +187 -0
  151. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_edition_capability.rb +107 -0
  152. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_license_type.rb +16 -0
  153. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_list_result.rb +100 -0
  154. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation.rb +231 -0
  155. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_operation_list_result.rb +100 -0
  156. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_max_performance_level_capability.rb +108 -0
  157. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_min_performance_level_capability.rb +86 -0
  158. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_per_database_settings.rb +57 -0
  159. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_performance_level_capability.rb +200 -0
  160. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_state.rb +17 -0
  161. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/elastic_pool_update.rb +116 -0
  162. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group.rb +156 -0
  163. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_list_result.rb +100 -0
  164. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_only_endpoint.rb +48 -0
  165. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_read_write_endpoint.rb +62 -0
  166. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/instance_failover_group_replication_role.rb +16 -0
  167. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/license_type_capability.rb +72 -0
  168. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/location_capabilities.rb +116 -0
  169. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_capability.rb +61 -0
  170. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/log_size_unit.rb +19 -0
  171. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_edition_capability.rb +94 -0
  172. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_family_capability.rb +161 -0
  173. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_pair_info.rb +57 -0
  174. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_vcores_capability.rb +84 -0
  175. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/managed_instance_version_capability.rb +94 -0
  176. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/management_operation_state.rb +20 -0
  177. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_capability.rb +61 -0
  178. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_range_capability.rb +113 -0
  179. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/max_size_unit.rb +18 -0
  180. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/partner_region_info.rb +60 -0
  181. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_capability.rb +60 -0
  182. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/performance_level_unit.rb +16 -0
  183. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/proxy_resource.rb +62 -0
  184. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/read_only_endpoint_failover_policy.rb +16 -0
  185. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/read_write_endpoint_failover_policy.rb +16 -0
  186. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/resource.rb +71 -0
  187. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/resource_move_definition.rb +46 -0
  188. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sample_name.rb +17 -0
  189. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/server_version_capability.rb +116 -0
  190. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/service_objective_capability.rb +166 -0
  191. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/sku.rb +97 -0
  192. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/tde_certificate.rb +84 -0
  193. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/tracked_resource.rb +92 -0
  194. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_recurring_scans_properties.rb +80 -0
  195. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_error.rb +59 -0
  196. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record.rb +169 -0
  197. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_record_list_result.rb +102 -0
  198. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_state.rb +18 -0
  199. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/models/vulnerability_assessment_scan_trigger_type.rb +16 -0
  200. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/module_definition.rb +9 -0
  201. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/sql_management_client.rb +171 -0
  202. data/lib/2017-10-01-preview/generated/azure_mgmt_sql/tde_certificates.rb +175 -0
  203. data/lib/azure_mgmt_sql.rb +2 -1
  204. data/lib/profiles/latest/modules/sql_profile_module.rb +855 -411
  205. data/lib/version.rb +1 -1
  206. metadata +186 -10
@@ -0,0 +1,415 @@
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 JobStepExecutions
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the JobStepExecutions 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
+ # Lists the step executions of a job execution.
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 job_agent_name [String] The name of the job agent.
35
+ # @param job_name [String] The name of the job to get.
36
+ # @param job_execution_id The id of the job execution
37
+ # @param create_time_min [DateTime] If specified, only job executions created
38
+ # at or after the specified time are included.
39
+ # @param create_time_max [DateTime] If specified, only job executions created
40
+ # before the specified time are included.
41
+ # @param end_time_min [DateTime] If specified, only job executions completed at
42
+ # or after the specified time are included.
43
+ # @param end_time_max [DateTime] If specified, only job executions completed
44
+ # before the specified time are included.
45
+ # @param is_active [Boolean] If specified, only active or only completed job
46
+ # executions are included.
47
+ # @param skip [Integer] The number of elements in the collection to skip.
48
+ # @param top [Integer] The number of elements to return from the collection.
49
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
+ # will be added to the HTTP request.
51
+ #
52
+ # @return [Array<JobExecution>] operation results.
53
+ #
54
+ def list_by_job_execution(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:nil, create_time_max:nil, end_time_min:nil, end_time_max:nil, is_active:nil, skip:nil, top:nil, custom_headers:nil)
55
+ first_page = list_by_job_execution_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:create_time_min, create_time_max:create_time_max, end_time_min:end_time_min, end_time_max:end_time_max, is_active:is_active, skip:skip, top:top, custom_headers:custom_headers)
56
+ first_page.get_all_items
57
+ end
58
+
59
+ #
60
+ # Lists the step executions of a job execution.
61
+ #
62
+ # @param resource_group_name [String] The name of the resource group that
63
+ # contains the resource. You can obtain this value from the Azure Resource
64
+ # Manager API or the portal.
65
+ # @param server_name [String] The name of the server.
66
+ # @param job_agent_name [String] The name of the job agent.
67
+ # @param job_name [String] The name of the job to get.
68
+ # @param job_execution_id The id of the job execution
69
+ # @param create_time_min [DateTime] If specified, only job executions created
70
+ # at or after the specified time are included.
71
+ # @param create_time_max [DateTime] If specified, only job executions created
72
+ # before the specified time are included.
73
+ # @param end_time_min [DateTime] If specified, only job executions completed at
74
+ # or after the specified time are included.
75
+ # @param end_time_max [DateTime] If specified, only job executions completed
76
+ # before the specified time are included.
77
+ # @param is_active [Boolean] If specified, only active or only completed job
78
+ # executions are included.
79
+ # @param skip [Integer] The number of elements in the collection to skip.
80
+ # @param top [Integer] The number of elements to return from the collection.
81
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
82
+ # will be added to the HTTP request.
83
+ #
84
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
85
+ #
86
+ def list_by_job_execution_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:nil, create_time_max:nil, end_time_min:nil, end_time_max:nil, is_active:nil, skip:nil, top:nil, custom_headers:nil)
87
+ list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:create_time_min, create_time_max:create_time_max, end_time_min:end_time_min, end_time_max:end_time_max, is_active:is_active, skip:skip, top:top, custom_headers:custom_headers).value!
88
+ end
89
+
90
+ #
91
+ # Lists the step executions of a job execution.
92
+ #
93
+ # @param resource_group_name [String] The name of the resource group that
94
+ # contains the resource. You can obtain this value from the Azure Resource
95
+ # Manager API or the portal.
96
+ # @param server_name [String] The name of the server.
97
+ # @param job_agent_name [String] The name of the job agent.
98
+ # @param job_name [String] The name of the job to get.
99
+ # @param job_execution_id The id of the job execution
100
+ # @param create_time_min [DateTime] If specified, only job executions created
101
+ # at or after the specified time are included.
102
+ # @param create_time_max [DateTime] If specified, only job executions created
103
+ # before the specified time are included.
104
+ # @param end_time_min [DateTime] If specified, only job executions completed at
105
+ # or after the specified time are included.
106
+ # @param end_time_max [DateTime] If specified, only job executions completed
107
+ # before the specified time are included.
108
+ # @param is_active [Boolean] If specified, only active or only completed job
109
+ # executions are included.
110
+ # @param skip [Integer] The number of elements in the collection to skip.
111
+ # @param top [Integer] The number of elements to return from the collection.
112
+ # @param [Hash{String => String}] A hash of custom headers that will be added
113
+ # to the HTTP request.
114
+ #
115
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
116
+ #
117
+ def list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:nil, create_time_max:nil, end_time_min:nil, end_time_max:nil, is_active:nil, skip:nil, top:nil, custom_headers:nil)
118
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
119
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
120
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
121
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
122
+ fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil?
123
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
124
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
125
+
126
+
127
+ request_headers = {}
128
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
129
+
130
+ # Set Headers
131
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
132
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
133
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps'
134
+
135
+ request_url = @base_url || @client.base_url
136
+
137
+ options = {
138
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
139
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id},
140
+ query_params: {'createTimeMin' => create_time_min,'createTimeMax' => create_time_max,'endTimeMin' => end_time_min,'endTimeMax' => end_time_max,'isActive' => is_active,'$skip' => skip,'$top' => top,'api-version' => @client.api_version},
141
+ headers: request_headers.merge(custom_headers || {}),
142
+ base_url: request_url
143
+ }
144
+ promise = @client.make_request_async(:get, path_template, options)
145
+
146
+ promise = promise.then do |result|
147
+ http_response = result.response
148
+ status_code = http_response.status
149
+ response_content = http_response.body
150
+ unless status_code == 200
151
+ error_model = JSON.load(response_content)
152
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
153
+ end
154
+
155
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
156
+ # Deserialize Response
157
+ if status_code == 200
158
+ begin
159
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
160
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper()
161
+ result.body = @client.deserialize(result_mapper, parsed_response)
162
+ rescue Exception => e
163
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
164
+ end
165
+ end
166
+
167
+ result
168
+ end
169
+
170
+ promise.execute
171
+ end
172
+
173
+ #
174
+ # Gets a step execution of a job execution.
175
+ #
176
+ # @param resource_group_name [String] The name of the resource group that
177
+ # contains the resource. You can obtain this value from the Azure Resource
178
+ # Manager API or the portal.
179
+ # @param server_name [String] The name of the server.
180
+ # @param job_agent_name [String] The name of the job agent.
181
+ # @param job_name [String] The name of the job to get.
182
+ # @param job_execution_id The unique id of the job execution
183
+ # @param step_name [String] The name of the step.
184
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
185
+ # will be added to the HTTP request.
186
+ #
187
+ # @return [JobExecution] operation results.
188
+ #
189
+ def get(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers:nil)
190
+ response = get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers:custom_headers).value!
191
+ response.body unless response.nil?
192
+ end
193
+
194
+ #
195
+ # Gets a step execution of a job execution.
196
+ #
197
+ # @param resource_group_name [String] The name of the resource group that
198
+ # contains the resource. You can obtain this value from the Azure Resource
199
+ # Manager API or the portal.
200
+ # @param server_name [String] The name of the server.
201
+ # @param job_agent_name [String] The name of the job agent.
202
+ # @param job_name [String] The name of the job to get.
203
+ # @param job_execution_id The unique id of the job execution
204
+ # @param step_name [String] The name of the step.
205
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
206
+ # will be added to the HTTP request.
207
+ #
208
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
209
+ #
210
+ def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers:nil)
211
+ get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_name, custom_headers:custom_headers).value!
212
+ end
213
+
214
+ #
215
+ # Gets a step execution of a job execution.
216
+ #
217
+ # @param resource_group_name [String] The name of the resource group that
218
+ # contains the resource. You can obtain this value from the Azure Resource
219
+ # Manager API or the portal.
220
+ # @param server_name [String] The name of the server.
221
+ # @param job_agent_name [String] The name of the job agent.
222
+ # @param job_name [String] The name of the job to get.
223
+ # @param job_execution_id The unique id of the job execution
224
+ # @param step_name [String] The name of the step.
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 get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, step_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, 'job_agent_name is nil' if job_agent_name.nil?
234
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
235
+ fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil?
236
+ fail ArgumentError, 'step_name is nil' if step_name.nil?
237
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
238
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
239
+
240
+
241
+ request_headers = {}
242
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
243
+
244
+ # Set Headers
245
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
246
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
247
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}'
248
+
249
+ request_url = @base_url || @client.base_url
250
+
251
+ options = {
252
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
253
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'stepName' => step_name,'subscriptionId' => @client.subscription_id},
254
+ query_params: {'api-version' => @client.api_version},
255
+ headers: request_headers.merge(custom_headers || {}),
256
+ base_url: request_url
257
+ }
258
+ promise = @client.make_request_async(:get, path_template, options)
259
+
260
+ promise = promise.then do |result|
261
+ http_response = result.response
262
+ status_code = http_response.status
263
+ response_content = http_response.body
264
+ unless status_code == 200
265
+ error_model = JSON.load(response_content)
266
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
267
+ end
268
+
269
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
270
+ # Deserialize Response
271
+ if status_code == 200
272
+ begin
273
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
274
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
275
+ result.body = @client.deserialize(result_mapper, parsed_response)
276
+ rescue Exception => e
277
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
278
+ end
279
+ end
280
+
281
+ result
282
+ end
283
+
284
+ promise.execute
285
+ end
286
+
287
+ #
288
+ # Lists the step executions of a job execution.
289
+ #
290
+ # @param next_page_link [String] The NextLink from the previous successful call
291
+ # to List operation.
292
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
293
+ # will be added to the HTTP request.
294
+ #
295
+ # @return [JobExecutionListResult] operation results.
296
+ #
297
+ def list_by_job_execution_next(next_page_link, custom_headers:nil)
298
+ response = list_by_job_execution_next_async(next_page_link, custom_headers:custom_headers).value!
299
+ response.body unless response.nil?
300
+ end
301
+
302
+ #
303
+ # Lists the step executions of a job execution.
304
+ #
305
+ # @param next_page_link [String] The NextLink from the previous successful call
306
+ # to List operation.
307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
308
+ # will be added to the HTTP request.
309
+ #
310
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
311
+ #
312
+ def list_by_job_execution_next_with_http_info(next_page_link, custom_headers:nil)
313
+ list_by_job_execution_next_async(next_page_link, custom_headers:custom_headers).value!
314
+ end
315
+
316
+ #
317
+ # Lists the step executions of a job execution.
318
+ #
319
+ # @param next_page_link [String] The NextLink from the previous successful call
320
+ # to List operation.
321
+ # @param [Hash{String => String}] A hash of custom headers that will be added
322
+ # to the HTTP request.
323
+ #
324
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
325
+ #
326
+ def list_by_job_execution_next_async(next_page_link, custom_headers:nil)
327
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
328
+
329
+
330
+ request_headers = {}
331
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
332
+
333
+ # Set Headers
334
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
335
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
336
+ path_template = '{nextLink}'
337
+
338
+ request_url = @base_url || @client.base_url
339
+
340
+ options = {
341
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
342
+ skip_encoding_path_params: {'nextLink' => next_page_link},
343
+ headers: request_headers.merge(custom_headers || {}),
344
+ base_url: request_url
345
+ }
346
+ promise = @client.make_request_async(:get, path_template, options)
347
+
348
+ promise = promise.then do |result|
349
+ http_response = result.response
350
+ status_code = http_response.status
351
+ response_content = http_response.body
352
+ unless status_code == 200
353
+ error_model = JSON.load(response_content)
354
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
355
+ end
356
+
357
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
358
+ # Deserialize Response
359
+ if status_code == 200
360
+ begin
361
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
362
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper()
363
+ result.body = @client.deserialize(result_mapper, parsed_response)
364
+ rescue Exception => e
365
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
366
+ end
367
+ end
368
+
369
+ result
370
+ end
371
+
372
+ promise.execute
373
+ end
374
+
375
+ #
376
+ # Lists the step executions of a job execution.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group that
379
+ # contains the resource. You can obtain this value from the Azure Resource
380
+ # Manager API or the portal.
381
+ # @param server_name [String] The name of the server.
382
+ # @param job_agent_name [String] The name of the job agent.
383
+ # @param job_name [String] The name of the job to get.
384
+ # @param job_execution_id The id of the job execution
385
+ # @param create_time_min [DateTime] If specified, only job executions created
386
+ # at or after the specified time are included.
387
+ # @param create_time_max [DateTime] If specified, only job executions created
388
+ # before the specified time are included.
389
+ # @param end_time_min [DateTime] If specified, only job executions completed at
390
+ # or after the specified time are included.
391
+ # @param end_time_max [DateTime] If specified, only job executions completed
392
+ # before the specified time are included.
393
+ # @param is_active [Boolean] If specified, only active or only completed job
394
+ # executions are included.
395
+ # @param skip [Integer] The number of elements in the collection to skip.
396
+ # @param top [Integer] The number of elements to return from the collection.
397
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
398
+ # will be added to the HTTP request.
399
+ #
400
+ # @return [JobExecutionListResult] which provide lazy access to pages of the
401
+ # response.
402
+ #
403
+ def list_by_job_execution_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:nil, create_time_max:nil, end_time_min:nil, end_time_max:nil, is_active:nil, skip:nil, top:nil, custom_headers:nil)
404
+ response = list_by_job_execution_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, create_time_min:create_time_min, create_time_max:create_time_max, end_time_min:end_time_min, end_time_max:end_time_max, is_active:is_active, skip:skip, top:top, custom_headers:custom_headers).value!
405
+ unless response.nil?
406
+ page = response.body
407
+ page.next_method = Proc.new do |next_page_link|
408
+ list_by_job_execution_next_async(next_page_link, custom_headers:custom_headers)
409
+ end
410
+ page
411
+ end
412
+ end
413
+
414
+ end
415
+ end
@@ -0,0 +1,927 @@
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 JobSteps
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the JobSteps 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 all job steps in the specified job version.
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 job_agent_name [String] The name of the job agent.
35
+ # @param job_name [String] The name of the job to get.
36
+ # @param job_version [Integer] The version of the job to get.
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [Array<JobStep>] operation results.
41
+ #
42
+ def list_by_version(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:nil)
43
+ first_page = list_by_version_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:custom_headers)
44
+ first_page.get_all_items
45
+ end
46
+
47
+ #
48
+ # Gets all job steps in the specified job version.
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group that
51
+ # contains the resource. You can obtain this value from the Azure Resource
52
+ # Manager API or the portal.
53
+ # @param server_name [String] The name of the server.
54
+ # @param job_agent_name [String] The name of the job agent.
55
+ # @param job_name [String] The name of the job to get.
56
+ # @param job_version [Integer] The version of the job to get.
57
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
58
+ # will be added to the HTTP request.
59
+ #
60
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
61
+ #
62
+ def list_by_version_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:nil)
63
+ list_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:custom_headers).value!
64
+ end
65
+
66
+ #
67
+ # Gets all job steps in the specified job version.
68
+ #
69
+ # @param resource_group_name [String] The name of the resource group that
70
+ # contains the resource. You can obtain this value from the Azure Resource
71
+ # Manager API or the portal.
72
+ # @param server_name [String] The name of the server.
73
+ # @param job_agent_name [String] The name of the job agent.
74
+ # @param job_name [String] The name of the job to get.
75
+ # @param job_version [Integer] The version of the job to get.
76
+ # @param [Hash{String => String}] A hash of custom headers that will be added
77
+ # to the HTTP request.
78
+ #
79
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
+ #
81
+ def list_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:nil)
82
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
83
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
84
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
85
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
86
+ fail ArgumentError, 'job_version is nil' if job_version.nil?
87
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
88
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
89
+
90
+
91
+ request_headers = {}
92
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
93
+
94
+ # Set Headers
95
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
96
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
97
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps'
98
+
99
+ request_url = @base_url || @client.base_url
100
+
101
+ options = {
102
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
103
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobVersion' => job_version,'subscriptionId' => @client.subscription_id},
104
+ query_params: {'api-version' => @client.api_version},
105
+ headers: request_headers.merge(custom_headers || {}),
106
+ base_url: request_url
107
+ }
108
+ promise = @client.make_request_async(:get, path_template, options)
109
+
110
+ promise = promise.then do |result|
111
+ http_response = result.response
112
+ status_code = http_response.status
113
+ response_content = http_response.body
114
+ unless status_code == 200
115
+ error_model = JSON.load(response_content)
116
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
117
+ end
118
+
119
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
+ # Deserialize Response
121
+ if status_code == 200
122
+ begin
123
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.mapper()
125
+ result.body = @client.deserialize(result_mapper, parsed_response)
126
+ rescue Exception => e
127
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+
134
+ promise.execute
135
+ end
136
+
137
+ #
138
+ # Gets the specified version of a job step.
139
+ #
140
+ # @param resource_group_name [String] The name of the resource group that
141
+ # contains the resource. You can obtain this value from the Azure Resource
142
+ # Manager API or the portal.
143
+ # @param server_name [String] The name of the server.
144
+ # @param job_agent_name [String] The name of the job agent.
145
+ # @param job_name [String] The name of the job.
146
+ # @param job_version [Integer] The version of the job to get.
147
+ # @param step_name [String] The name of the job step.
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [JobStep] operation results.
152
+ #
153
+ def get_by_version(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers:nil)
154
+ response = get_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers:custom_headers).value!
155
+ response.body unless response.nil?
156
+ end
157
+
158
+ #
159
+ # Gets the specified version of a job step.
160
+ #
161
+ # @param resource_group_name [String] The name of the resource group that
162
+ # contains the resource. You can obtain this value from the Azure Resource
163
+ # Manager API or the portal.
164
+ # @param server_name [String] The name of the server.
165
+ # @param job_agent_name [String] The name of the job agent.
166
+ # @param job_name [String] The name of the job.
167
+ # @param job_version [Integer] The version of the job to get.
168
+ # @param step_name [String] The name of the job step.
169
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
170
+ # will be added to the HTTP request.
171
+ #
172
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
173
+ #
174
+ def get_by_version_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers:nil)
175
+ get_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers:custom_headers).value!
176
+ end
177
+
178
+ #
179
+ # Gets the specified version of a job step.
180
+ #
181
+ # @param resource_group_name [String] The name of the resource group that
182
+ # contains the resource. You can obtain this value from the Azure Resource
183
+ # Manager API or the portal.
184
+ # @param server_name [String] The name of the server.
185
+ # @param job_agent_name [String] The name of the job agent.
186
+ # @param job_name [String] The name of the job.
187
+ # @param job_version [Integer] The version of the job to get.
188
+ # @param step_name [String] The name of the job step.
189
+ # @param [Hash{String => String}] A hash of custom headers that will be added
190
+ # to the HTTP request.
191
+ #
192
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
193
+ #
194
+ def get_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, step_name, custom_headers:nil)
195
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
196
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
197
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
198
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
199
+ fail ArgumentError, 'job_version is nil' if job_version.nil?
200
+ fail ArgumentError, 'step_name is nil' if step_name.nil?
201
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
202
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
203
+
204
+
205
+ request_headers = {}
206
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
207
+
208
+ # Set Headers
209
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
210
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
211
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}'
212
+
213
+ request_url = @base_url || @client.base_url
214
+
215
+ options = {
216
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
217
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobVersion' => job_version,'stepName' => step_name,'subscriptionId' => @client.subscription_id},
218
+ query_params: {'api-version' => @client.api_version},
219
+ headers: request_headers.merge(custom_headers || {}),
220
+ base_url: request_url
221
+ }
222
+ promise = @client.make_request_async(:get, path_template, options)
223
+
224
+ promise = promise.then do |result|
225
+ http_response = result.response
226
+ status_code = http_response.status
227
+ response_content = http_response.body
228
+ unless status_code == 200
229
+ error_model = JSON.load(response_content)
230
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
231
+ end
232
+
233
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
234
+ # Deserialize Response
235
+ if status_code == 200
236
+ begin
237
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
238
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper()
239
+ result.body = @client.deserialize(result_mapper, parsed_response)
240
+ rescue Exception => e
241
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
242
+ end
243
+ end
244
+
245
+ result
246
+ end
247
+
248
+ promise.execute
249
+ end
250
+
251
+ #
252
+ # Gets all job steps for a job's current version.
253
+ #
254
+ # @param resource_group_name [String] The name of the resource group that
255
+ # contains the resource. You can obtain this value from the Azure Resource
256
+ # Manager API or the portal.
257
+ # @param server_name [String] The name of the server.
258
+ # @param job_agent_name [String] The name of the job agent.
259
+ # @param job_name [String] The name of the job to get.
260
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
261
+ # will be added to the HTTP request.
262
+ #
263
+ # @return [Array<JobStep>] operation results.
264
+ #
265
+ def list_by_job(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
266
+ first_page = list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers)
267
+ first_page.get_all_items
268
+ end
269
+
270
+ #
271
+ # Gets all job steps for a job's current version.
272
+ #
273
+ # @param resource_group_name [String] The name of the resource group that
274
+ # contains the resource. You can obtain this value from the Azure Resource
275
+ # Manager API or the portal.
276
+ # @param server_name [String] The name of the server.
277
+ # @param job_agent_name [String] The name of the job agent.
278
+ # @param job_name [String] The name of the job to get.
279
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
280
+ # will be added to the HTTP request.
281
+ #
282
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
283
+ #
284
+ def list_by_job_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
285
+ list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
286
+ end
287
+
288
+ #
289
+ # Gets all job steps for a job's current version.
290
+ #
291
+ # @param resource_group_name [String] The name of the resource group that
292
+ # contains the resource. You can obtain this value from the Azure Resource
293
+ # Manager API or the portal.
294
+ # @param server_name [String] The name of the server.
295
+ # @param job_agent_name [String] The name of the job agent.
296
+ # @param job_name [String] The name of the job to get.
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 list_by_job_async(resource_group_name, server_name, job_agent_name, job_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, 'job_agent_name is nil' if job_agent_name.nil?
306
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
307
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
308
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
309
+
310
+
311
+ request_headers = {}
312
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
313
+
314
+ # Set Headers
315
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
316
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
317
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps'
318
+
319
+ request_url = @base_url || @client.base_url
320
+
321
+ options = {
322
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
323
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
324
+ query_params: {'api-version' => @client.api_version},
325
+ headers: request_headers.merge(custom_headers || {}),
326
+ base_url: request_url
327
+ }
328
+ promise = @client.make_request_async(:get, path_template, options)
329
+
330
+ promise = promise.then do |result|
331
+ http_response = result.response
332
+ status_code = http_response.status
333
+ response_content = http_response.body
334
+ unless status_code == 200
335
+ error_model = JSON.load(response_content)
336
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
337
+ end
338
+
339
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
340
+ # Deserialize Response
341
+ if status_code == 200
342
+ begin
343
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
344
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.mapper()
345
+ result.body = @client.deserialize(result_mapper, parsed_response)
346
+ rescue Exception => e
347
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
348
+ end
349
+ end
350
+
351
+ result
352
+ end
353
+
354
+ promise.execute
355
+ end
356
+
357
+ #
358
+ # Gets a job step in a job's current version.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group that
361
+ # contains the resource. You can obtain this value from the Azure Resource
362
+ # Manager API or the portal.
363
+ # @param server_name [String] The name of the server.
364
+ # @param job_agent_name [String] The name of the job agent.
365
+ # @param job_name [String] The name of the job.
366
+ # @param step_name [String] The name of the job step.
367
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
368
+ # will be added to the HTTP request.
369
+ #
370
+ # @return [JobStep] operation results.
371
+ #
372
+ def get(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:nil)
373
+ response = get_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:custom_headers).value!
374
+ response.body unless response.nil?
375
+ end
376
+
377
+ #
378
+ # Gets a job step in a job's current version.
379
+ #
380
+ # @param resource_group_name [String] The name of the resource group that
381
+ # contains the resource. You can obtain this value from the Azure Resource
382
+ # Manager API or the portal.
383
+ # @param server_name [String] The name of the server.
384
+ # @param job_agent_name [String] The name of the job agent.
385
+ # @param job_name [String] The name of the job.
386
+ # @param step_name [String] The name of the job step.
387
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
388
+ # will be added to the HTTP request.
389
+ #
390
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
391
+ #
392
+ def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:nil)
393
+ get_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:custom_headers).value!
394
+ end
395
+
396
+ #
397
+ # Gets a job step in a job's current version.
398
+ #
399
+ # @param resource_group_name [String] The name of the resource group that
400
+ # contains the resource. You can obtain this value from the Azure Resource
401
+ # Manager API or the portal.
402
+ # @param server_name [String] The name of the server.
403
+ # @param job_agent_name [String] The name of the job agent.
404
+ # @param job_name [String] The name of the job.
405
+ # @param step_name [String] The name of the job step.
406
+ # @param [Hash{String => String}] A hash of custom headers that will be added
407
+ # to the HTTP request.
408
+ #
409
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
410
+ #
411
+ def get_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:nil)
412
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
413
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
414
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
415
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
416
+ fail ArgumentError, 'step_name is nil' if step_name.nil?
417
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
418
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
419
+
420
+
421
+ request_headers = {}
422
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
423
+
424
+ # Set Headers
425
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
426
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
427
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'
428
+
429
+ request_url = @base_url || @client.base_url
430
+
431
+ options = {
432
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
433
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'stepName' => step_name,'subscriptionId' => @client.subscription_id},
434
+ query_params: {'api-version' => @client.api_version},
435
+ headers: request_headers.merge(custom_headers || {}),
436
+ base_url: request_url
437
+ }
438
+ promise = @client.make_request_async(:get, path_template, options)
439
+
440
+ promise = promise.then do |result|
441
+ http_response = result.response
442
+ status_code = http_response.status
443
+ response_content = http_response.body
444
+ unless status_code == 200
445
+ error_model = JSON.load(response_content)
446
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
447
+ end
448
+
449
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
450
+ # Deserialize Response
451
+ if status_code == 200
452
+ begin
453
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
454
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper()
455
+ result.body = @client.deserialize(result_mapper, parsed_response)
456
+ rescue Exception => e
457
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
458
+ end
459
+ end
460
+
461
+ result
462
+ end
463
+
464
+ promise.execute
465
+ end
466
+
467
+ #
468
+ # Creates or updates a job step. This will implicitly create a new job version.
469
+ #
470
+ # @param resource_group_name [String] The name of the resource group that
471
+ # contains the resource. You can obtain this value from the Azure Resource
472
+ # Manager API or the portal.
473
+ # @param server_name [String] The name of the server.
474
+ # @param job_agent_name [String] The name of the job agent.
475
+ # @param job_name [String] The name of the job.
476
+ # @param step_name [String] The name of the job step.
477
+ # @param parameters [JobStep] The requested state of the job step.
478
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
479
+ # will be added to the HTTP request.
480
+ #
481
+ # @return [JobStep] operation results.
482
+ #
483
+ def create_or_update(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers:nil)
484
+ response = create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers:custom_headers).value!
485
+ response.body unless response.nil?
486
+ end
487
+
488
+ #
489
+ # Creates or updates a job step. This will implicitly create a new job version.
490
+ #
491
+ # @param resource_group_name [String] The name of the resource group that
492
+ # contains the resource. You can obtain this value from the Azure Resource
493
+ # Manager API or the portal.
494
+ # @param server_name [String] The name of the server.
495
+ # @param job_agent_name [String] The name of the job agent.
496
+ # @param job_name [String] The name of the job.
497
+ # @param step_name [String] The name of the job step.
498
+ # @param parameters [JobStep] The requested state of the job step.
499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
500
+ # will be added to the HTTP request.
501
+ #
502
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
503
+ #
504
+ def create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers:nil)
505
+ create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers:custom_headers).value!
506
+ end
507
+
508
+ #
509
+ # Creates or updates a job step. This will implicitly create a new job version.
510
+ #
511
+ # @param resource_group_name [String] The name of the resource group that
512
+ # contains the resource. You can obtain this value from the Azure Resource
513
+ # Manager API or the portal.
514
+ # @param server_name [String] The name of the server.
515
+ # @param job_agent_name [String] The name of the job agent.
516
+ # @param job_name [String] The name of the job.
517
+ # @param step_name [String] The name of the job step.
518
+ # @param parameters [JobStep] The requested state of the job step.
519
+ # @param [Hash{String => String}] A hash of custom headers that will be added
520
+ # to the HTTP request.
521
+ #
522
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
523
+ #
524
+ def create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, step_name, parameters, custom_headers:nil)
525
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
526
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
527
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
528
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
529
+ fail ArgumentError, 'step_name is nil' if step_name.nil?
530
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
531
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
532
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
533
+
534
+
535
+ request_headers = {}
536
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
537
+
538
+ # Set Headers
539
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
540
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
541
+
542
+ # Serialize Request
543
+ request_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper()
544
+ request_content = @client.serialize(request_mapper, parameters)
545
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
546
+
547
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'
548
+
549
+ request_url = @base_url || @client.base_url
550
+
551
+ options = {
552
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
553
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'stepName' => step_name,'subscriptionId' => @client.subscription_id},
554
+ query_params: {'api-version' => @client.api_version},
555
+ body: request_content,
556
+ headers: request_headers.merge(custom_headers || {}),
557
+ base_url: request_url
558
+ }
559
+ promise = @client.make_request_async(:put, path_template, options)
560
+
561
+ promise = promise.then do |result|
562
+ http_response = result.response
563
+ status_code = http_response.status
564
+ response_content = http_response.body
565
+ unless status_code == 200 || status_code == 201
566
+ error_model = JSON.load(response_content)
567
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
568
+ end
569
+
570
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
571
+ # Deserialize Response
572
+ if status_code == 200
573
+ begin
574
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
575
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper()
576
+ result.body = @client.deserialize(result_mapper, parsed_response)
577
+ rescue Exception => e
578
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
579
+ end
580
+ end
581
+ # Deserialize Response
582
+ if status_code == 201
583
+ begin
584
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
585
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStep.mapper()
586
+ result.body = @client.deserialize(result_mapper, parsed_response)
587
+ rescue Exception => e
588
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
589
+ end
590
+ end
591
+
592
+ result
593
+ end
594
+
595
+ promise.execute
596
+ end
597
+
598
+ #
599
+ # Deletes a job step. This will implicitly create a new job version.
600
+ #
601
+ # @param resource_group_name [String] The name of the resource group that
602
+ # contains the resource. You can obtain this value from the Azure Resource
603
+ # Manager API or the portal.
604
+ # @param server_name [String] The name of the server.
605
+ # @param job_agent_name [String] The name of the job agent.
606
+ # @param job_name [String] The name of the job.
607
+ # @param step_name [String] The name of the job step to delete.
608
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
609
+ # will be added to the HTTP request.
610
+ #
611
+ #
612
+ def delete(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:nil)
613
+ response = delete_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:custom_headers).value!
614
+ nil
615
+ end
616
+
617
+ #
618
+ # Deletes a job step. This will implicitly create a new job version.
619
+ #
620
+ # @param resource_group_name [String] The name of the resource group that
621
+ # contains the resource. You can obtain this value from the Azure Resource
622
+ # Manager API or the portal.
623
+ # @param server_name [String] The name of the server.
624
+ # @param job_agent_name [String] The name of the job agent.
625
+ # @param job_name [String] The name of the job.
626
+ # @param step_name [String] The name of the job step to delete.
627
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
628
+ # will be added to the HTTP request.
629
+ #
630
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
631
+ #
632
+ def delete_with_http_info(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:nil)
633
+ delete_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:custom_headers).value!
634
+ end
635
+
636
+ #
637
+ # Deletes a job step. This will implicitly create a new job version.
638
+ #
639
+ # @param resource_group_name [String] The name of the resource group that
640
+ # contains the resource. You can obtain this value from the Azure Resource
641
+ # Manager API or the portal.
642
+ # @param server_name [String] The name of the server.
643
+ # @param job_agent_name [String] The name of the job agent.
644
+ # @param job_name [String] The name of the job.
645
+ # @param step_name [String] The name of the job step to delete.
646
+ # @param [Hash{String => String}] A hash of custom headers that will be added
647
+ # to the HTTP request.
648
+ #
649
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
650
+ #
651
+ def delete_async(resource_group_name, server_name, job_agent_name, job_name, step_name, custom_headers:nil)
652
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
653
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
654
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
655
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
656
+ fail ArgumentError, 'step_name is nil' if step_name.nil?
657
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
658
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
659
+
660
+
661
+ request_headers = {}
662
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
663
+
664
+ # Set Headers
665
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
666
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
667
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}'
668
+
669
+ request_url = @base_url || @client.base_url
670
+
671
+ options = {
672
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
673
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'stepName' => step_name,'subscriptionId' => @client.subscription_id},
674
+ query_params: {'api-version' => @client.api_version},
675
+ headers: request_headers.merge(custom_headers || {}),
676
+ base_url: request_url
677
+ }
678
+ promise = @client.make_request_async(:delete, path_template, options)
679
+
680
+ promise = promise.then do |result|
681
+ http_response = result.response
682
+ status_code = http_response.status
683
+ response_content = http_response.body
684
+ unless status_code == 200 || status_code == 204
685
+ error_model = JSON.load(response_content)
686
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
687
+ end
688
+
689
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
690
+
691
+ result
692
+ end
693
+
694
+ promise.execute
695
+ end
696
+
697
+ #
698
+ # Gets all job steps in the specified job version.
699
+ #
700
+ # @param next_page_link [String] The NextLink from the previous successful call
701
+ # to List operation.
702
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
703
+ # will be added to the HTTP request.
704
+ #
705
+ # @return [JobStepListResult] operation results.
706
+ #
707
+ def list_by_version_next(next_page_link, custom_headers:nil)
708
+ response = list_by_version_next_async(next_page_link, custom_headers:custom_headers).value!
709
+ response.body unless response.nil?
710
+ end
711
+
712
+ #
713
+ # Gets all job steps in the specified job version.
714
+ #
715
+ # @param next_page_link [String] The NextLink from the previous successful call
716
+ # to List operation.
717
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
718
+ # will be added to the HTTP request.
719
+ #
720
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
721
+ #
722
+ def list_by_version_next_with_http_info(next_page_link, custom_headers:nil)
723
+ list_by_version_next_async(next_page_link, custom_headers:custom_headers).value!
724
+ end
725
+
726
+ #
727
+ # Gets all job steps in the specified job version.
728
+ #
729
+ # @param next_page_link [String] The NextLink from the previous successful call
730
+ # to List operation.
731
+ # @param [Hash{String => String}] A hash of custom headers that will be added
732
+ # to the HTTP request.
733
+ #
734
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
735
+ #
736
+ def list_by_version_next_async(next_page_link, custom_headers:nil)
737
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
738
+
739
+
740
+ request_headers = {}
741
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
742
+
743
+ # Set Headers
744
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
745
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
746
+ path_template = '{nextLink}'
747
+
748
+ request_url = @base_url || @client.base_url
749
+
750
+ options = {
751
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
752
+ skip_encoding_path_params: {'nextLink' => next_page_link},
753
+ headers: request_headers.merge(custom_headers || {}),
754
+ base_url: request_url
755
+ }
756
+ promise = @client.make_request_async(:get, path_template, options)
757
+
758
+ promise = promise.then do |result|
759
+ http_response = result.response
760
+ status_code = http_response.status
761
+ response_content = http_response.body
762
+ unless status_code == 200
763
+ error_model = JSON.load(response_content)
764
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
765
+ end
766
+
767
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
768
+ # Deserialize Response
769
+ if status_code == 200
770
+ begin
771
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
772
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.mapper()
773
+ result.body = @client.deserialize(result_mapper, parsed_response)
774
+ rescue Exception => e
775
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
776
+ end
777
+ end
778
+
779
+ result
780
+ end
781
+
782
+ promise.execute
783
+ end
784
+
785
+ #
786
+ # Gets all job steps for a job's current version.
787
+ #
788
+ # @param next_page_link [String] The NextLink from the previous successful call
789
+ # to List operation.
790
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
791
+ # will be added to the HTTP request.
792
+ #
793
+ # @return [JobStepListResult] operation results.
794
+ #
795
+ def list_by_job_next(next_page_link, custom_headers:nil)
796
+ response = list_by_job_next_async(next_page_link, custom_headers:custom_headers).value!
797
+ response.body unless response.nil?
798
+ end
799
+
800
+ #
801
+ # Gets all job steps for a job's current version.
802
+ #
803
+ # @param next_page_link [String] The NextLink from the previous successful call
804
+ # to List operation.
805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
806
+ # will be added to the HTTP request.
807
+ #
808
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
809
+ #
810
+ def list_by_job_next_with_http_info(next_page_link, custom_headers:nil)
811
+ list_by_job_next_async(next_page_link, custom_headers:custom_headers).value!
812
+ end
813
+
814
+ #
815
+ # Gets all job steps for a job's current version.
816
+ #
817
+ # @param next_page_link [String] The NextLink from the previous successful call
818
+ # to List operation.
819
+ # @param [Hash{String => String}] A hash of custom headers that will be added
820
+ # to the HTTP request.
821
+ #
822
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
823
+ #
824
+ def list_by_job_next_async(next_page_link, custom_headers:nil)
825
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
826
+
827
+
828
+ request_headers = {}
829
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
830
+
831
+ # Set Headers
832
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
833
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
834
+ path_template = '{nextLink}'
835
+
836
+ request_url = @base_url || @client.base_url
837
+
838
+ options = {
839
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
840
+ skip_encoding_path_params: {'nextLink' => next_page_link},
841
+ headers: request_headers.merge(custom_headers || {}),
842
+ base_url: request_url
843
+ }
844
+ promise = @client.make_request_async(:get, path_template, options)
845
+
846
+ promise = promise.then do |result|
847
+ http_response = result.response
848
+ status_code = http_response.status
849
+ response_content = http_response.body
850
+ unless status_code == 200
851
+ error_model = JSON.load(response_content)
852
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
853
+ end
854
+
855
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
856
+ # Deserialize Response
857
+ if status_code == 200
858
+ begin
859
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
860
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobStepListResult.mapper()
861
+ result.body = @client.deserialize(result_mapper, parsed_response)
862
+ rescue Exception => e
863
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
864
+ end
865
+ end
866
+
867
+ result
868
+ end
869
+
870
+ promise.execute
871
+ end
872
+
873
+ #
874
+ # Gets all job steps in the specified job version.
875
+ #
876
+ # @param resource_group_name [String] The name of the resource group that
877
+ # contains the resource. You can obtain this value from the Azure Resource
878
+ # Manager API or the portal.
879
+ # @param server_name [String] The name of the server.
880
+ # @param job_agent_name [String] The name of the job agent.
881
+ # @param job_name [String] The name of the job to get.
882
+ # @param job_version [Integer] The version of the job to get.
883
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
884
+ # will be added to the HTTP request.
885
+ #
886
+ # @return [JobStepListResult] which provide lazy access to pages of the
887
+ # response.
888
+ #
889
+ def list_by_version_as_lazy(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:nil)
890
+ response = list_by_version_async(resource_group_name, server_name, job_agent_name, job_name, job_version, custom_headers:custom_headers).value!
891
+ unless response.nil?
892
+ page = response.body
893
+ page.next_method = Proc.new do |next_page_link|
894
+ list_by_version_next_async(next_page_link, custom_headers:custom_headers)
895
+ end
896
+ page
897
+ end
898
+ end
899
+
900
+ #
901
+ # Gets all job steps for a job's current version.
902
+ #
903
+ # @param resource_group_name [String] The name of the resource group that
904
+ # contains the resource. You can obtain this value from the Azure Resource
905
+ # Manager API or the portal.
906
+ # @param server_name [String] The name of the server.
907
+ # @param job_agent_name [String] The name of the job agent.
908
+ # @param job_name [String] The name of the job to get.
909
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
910
+ # will be added to the HTTP request.
911
+ #
912
+ # @return [JobStepListResult] which provide lazy access to pages of the
913
+ # response.
914
+ #
915
+ def list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
916
+ response = list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
917
+ unless response.nil?
918
+ page = response.body
919
+ page.next_method = Proc.new do |next_page_link|
920
+ list_by_job_next_async(next_page_link, custom_headers:custom_headers)
921
+ end
922
+ page
923
+ end
924
+ end
925
+
926
+ end
927
+ end