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,1101 @@
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 JobExecutions
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the JobExecutions 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 all executions in a job agent.
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 create_time_min [DateTime] If specified, only job executions created
36
+ # at or after the specified time are included.
37
+ # @param create_time_max [DateTime] If specified, only job executions created
38
+ # before the specified time are included.
39
+ # @param end_time_min [DateTime] If specified, only job executions completed at
40
+ # or after the specified time are included.
41
+ # @param end_time_max [DateTime] If specified, only job executions completed
42
+ # before the specified time are included.
43
+ # @param is_active [Boolean] If specified, only active or only completed job
44
+ # executions are included.
45
+ # @param skip [Integer] The number of elements in the collection to skip.
46
+ # @param top [Integer] The number of elements to return from the collection.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [Array<JobExecution>] operation results.
51
+ #
52
+ def list_by_agent(resource_group_name, server_name, job_agent_name, 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)
53
+ first_page = list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, 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)
54
+ first_page.get_all_items
55
+ end
56
+
57
+ #
58
+ # Lists all executions in a job agent.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group that
61
+ # contains the resource. You can obtain this value from the Azure Resource
62
+ # Manager API or the portal.
63
+ # @param server_name [String] The name of the server.
64
+ # @param job_agent_name [String] The name of the job agent.
65
+ # @param create_time_min [DateTime] If specified, only job executions created
66
+ # at or after the specified time are included.
67
+ # @param create_time_max [DateTime] If specified, only job executions created
68
+ # before the specified time are included.
69
+ # @param end_time_min [DateTime] If specified, only job executions completed at
70
+ # or after the specified time are included.
71
+ # @param end_time_max [DateTime] If specified, only job executions completed
72
+ # before the specified time are included.
73
+ # @param is_active [Boolean] If specified, only active or only completed job
74
+ # executions are included.
75
+ # @param skip [Integer] The number of elements in the collection to skip.
76
+ # @param top [Integer] The number of elements to return from the collection.
77
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
78
+ # will be added to the HTTP request.
79
+ #
80
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
81
+ #
82
+ def list_by_agent_with_http_info(resource_group_name, server_name, job_agent_name, 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)
83
+ list_by_agent_async(resource_group_name, server_name, job_agent_name, 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!
84
+ end
85
+
86
+ #
87
+ # Lists all executions in a job agent.
88
+ #
89
+ # @param resource_group_name [String] The name of the resource group that
90
+ # contains the resource. You can obtain this value from the Azure Resource
91
+ # Manager API or the portal.
92
+ # @param server_name [String] The name of the server.
93
+ # @param job_agent_name [String] The name of the job agent.
94
+ # @param create_time_min [DateTime] If specified, only job executions created
95
+ # at or after the specified time are included.
96
+ # @param create_time_max [DateTime] If specified, only job executions created
97
+ # before the specified time are included.
98
+ # @param end_time_min [DateTime] If specified, only job executions completed at
99
+ # or after the specified time are included.
100
+ # @param end_time_max [DateTime] If specified, only job executions completed
101
+ # before the specified time are included.
102
+ # @param is_active [Boolean] If specified, only active or only completed job
103
+ # executions are included.
104
+ # @param skip [Integer] The number of elements in the collection to skip.
105
+ # @param top [Integer] The number of elements to return from the collection.
106
+ # @param [Hash{String => String}] A hash of custom headers that will be added
107
+ # to the HTTP request.
108
+ #
109
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
110
+ #
111
+ def list_by_agent_async(resource_group_name, server_name, job_agent_name, 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)
112
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
113
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
114
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
115
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
116
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
117
+
118
+
119
+ request_headers = {}
120
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
121
+
122
+ # Set Headers
123
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
124
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
125
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions'
126
+
127
+ request_url = @base_url || @client.base_url
128
+
129
+ options = {
130
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
131
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'subscriptionId' => @client.subscription_id},
132
+ 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},
133
+ headers: request_headers.merge(custom_headers || {}),
134
+ base_url: request_url
135
+ }
136
+ promise = @client.make_request_async(:get, path_template, options)
137
+
138
+ promise = promise.then do |result|
139
+ http_response = result.response
140
+ status_code = http_response.status
141
+ response_content = http_response.body
142
+ unless status_code == 200
143
+ error_model = JSON.load(response_content)
144
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
145
+ end
146
+
147
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
148
+ # Deserialize Response
149
+ if status_code == 200
150
+ begin
151
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
152
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper()
153
+ result.body = @client.deserialize(result_mapper, parsed_response)
154
+ rescue Exception => e
155
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
156
+ end
157
+ end
158
+
159
+ result
160
+ end
161
+
162
+ promise.execute
163
+ end
164
+
165
+ #
166
+ # Requests cancellation of a job execution.
167
+ #
168
+ # @param resource_group_name [String] The name of the resource group that
169
+ # contains the resource. You can obtain this value from the Azure Resource
170
+ # Manager API or the portal.
171
+ # @param server_name [String] The name of the server.
172
+ # @param job_agent_name [String] The name of the job agent.
173
+ # @param job_name [String] The name of the job.
174
+ # @param job_execution_id The id of the job execution to cancel.
175
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
176
+ # will be added to the HTTP request.
177
+ #
178
+ #
179
+ def cancel(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
180
+ response = cancel_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
181
+ nil
182
+ end
183
+
184
+ #
185
+ # Requests cancellation of a job execution.
186
+ #
187
+ # @param resource_group_name [String] The name of the resource group that
188
+ # contains the resource. You can obtain this value from the Azure Resource
189
+ # Manager API or the portal.
190
+ # @param server_name [String] The name of the server.
191
+ # @param job_agent_name [String] The name of the job agent.
192
+ # @param job_name [String] The name of the job.
193
+ # @param job_execution_id The id of the job execution to cancel.
194
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
195
+ # will be added to the HTTP request.
196
+ #
197
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
198
+ #
199
+ def cancel_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
200
+ cancel_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
201
+ end
202
+
203
+ #
204
+ # Requests cancellation of a job execution.
205
+ #
206
+ # @param resource_group_name [String] The name of the resource group that
207
+ # contains the resource. You can obtain this value from the Azure Resource
208
+ # Manager API or the portal.
209
+ # @param server_name [String] The name of the server.
210
+ # @param job_agent_name [String] The name of the job agent.
211
+ # @param job_name [String] The name of the job.
212
+ # @param job_execution_id The id of the job execution to cancel.
213
+ # @param [Hash{String => String}] A hash of custom headers that will be added
214
+ # to the HTTP request.
215
+ #
216
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
217
+ #
218
+ def cancel_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
219
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
220
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
221
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
222
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
223
+ fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil?
224
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
225
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
226
+
227
+
228
+ request_headers = {}
229
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
230
+
231
+ # Set Headers
232
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
233
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
234
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel'
235
+
236
+ request_url = @base_url || @client.base_url
237
+
238
+ options = {
239
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
240
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id},
241
+ query_params: {'api-version' => @client.api_version},
242
+ headers: request_headers.merge(custom_headers || {}),
243
+ base_url: request_url
244
+ }
245
+ promise = @client.make_request_async(:post, path_template, options)
246
+
247
+ promise = promise.then do |result|
248
+ http_response = result.response
249
+ status_code = http_response.status
250
+ response_content = http_response.body
251
+ unless status_code == 200
252
+ error_model = JSON.load(response_content)
253
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
254
+ end
255
+
256
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
257
+
258
+ result
259
+ end
260
+
261
+ promise.execute
262
+ end
263
+
264
+ #
265
+ # Starts an elastic job execution.
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group that
268
+ # contains the resource. You can obtain this value from the Azure Resource
269
+ # Manager API or the portal.
270
+ # @param server_name [String] The name of the server.
271
+ # @param job_agent_name [String] The name of the job agent.
272
+ # @param job_name [String] The name of the job to get.
273
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
274
+ # will be added to the HTTP request.
275
+ #
276
+ # @return [JobExecution] operation results.
277
+ #
278
+ def create(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
279
+ response = create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
280
+ response.body unless response.nil?
281
+ end
282
+
283
+ #
284
+ # @param resource_group_name [String] The name of the resource group that
285
+ # contains the resource. You can obtain this value from the Azure Resource
286
+ # Manager API or the portal.
287
+ # @param server_name [String] The name of the server.
288
+ # @param job_agent_name [String] The name of the job agent.
289
+ # @param job_name [String] The name of the job to get.
290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
291
+ # will be added to the HTTP request.
292
+ #
293
+ # @return [Concurrent::Promise] promise which provides async access to http
294
+ # response.
295
+ #
296
+ def create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
297
+ # Send request
298
+ promise = begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers)
299
+
300
+ promise = promise.then do |response|
301
+ # Defining deserialization method.
302
+ deserialize_method = lambda do |parsed_response|
303
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
304
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
305
+ end
306
+
307
+ # Waiting for response.
308
+ @client.get_long_running_operation_result(response, deserialize_method)
309
+ end
310
+
311
+ promise
312
+ end
313
+
314
+ #
315
+ # Lists a job's executions.
316
+ #
317
+ # @param resource_group_name [String] The name of the resource group that
318
+ # contains the resource. You can obtain this value from the Azure Resource
319
+ # Manager API or the portal.
320
+ # @param server_name [String] The name of the server.
321
+ # @param job_agent_name [String] The name of the job agent.
322
+ # @param job_name [String] The name of the job to get.
323
+ # @param create_time_min [DateTime] If specified, only job executions created
324
+ # at or after the specified time are included.
325
+ # @param create_time_max [DateTime] If specified, only job executions created
326
+ # before the specified time are included.
327
+ # @param end_time_min [DateTime] If specified, only job executions completed at
328
+ # or after the specified time are included.
329
+ # @param end_time_max [DateTime] If specified, only job executions completed
330
+ # before the specified time are included.
331
+ # @param is_active [Boolean] If specified, only active or only completed job
332
+ # executions are included.
333
+ # @param skip [Integer] The number of elements in the collection to skip.
334
+ # @param top [Integer] The number of elements to return from the collection.
335
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
336
+ # will be added to the HTTP request.
337
+ #
338
+ # @return [Array<JobExecution>] operation results.
339
+ #
340
+ def list_by_job(resource_group_name, server_name, job_agent_name, job_name, 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)
341
+ first_page = list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, 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)
342
+ first_page.get_all_items
343
+ end
344
+
345
+ #
346
+ # Lists a job's executions.
347
+ #
348
+ # @param resource_group_name [String] The name of the resource group that
349
+ # contains the resource. You can obtain this value from the Azure Resource
350
+ # Manager API or the portal.
351
+ # @param server_name [String] The name of the server.
352
+ # @param job_agent_name [String] The name of the job agent.
353
+ # @param job_name [String] The name of the job to get.
354
+ # @param create_time_min [DateTime] If specified, only job executions created
355
+ # at or after the specified time are included.
356
+ # @param create_time_max [DateTime] If specified, only job executions created
357
+ # before the specified time are included.
358
+ # @param end_time_min [DateTime] If specified, only job executions completed at
359
+ # or after the specified time are included.
360
+ # @param end_time_max [DateTime] If specified, only job executions completed
361
+ # before the specified time are included.
362
+ # @param is_active [Boolean] If specified, only active or only completed job
363
+ # executions are included.
364
+ # @param skip [Integer] The number of elements in the collection to skip.
365
+ # @param top [Integer] The number of elements to return from the collection.
366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
+ # will be added to the HTTP request.
368
+ #
369
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
370
+ #
371
+ def list_by_job_with_http_info(resource_group_name, server_name, job_agent_name, job_name, 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)
372
+ list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, 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!
373
+ end
374
+
375
+ #
376
+ # Lists a job's executions.
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 create_time_min [DateTime] If specified, only job executions created
385
+ # at or after the specified time are included.
386
+ # @param create_time_max [DateTime] If specified, only job executions created
387
+ # before the specified time are included.
388
+ # @param end_time_min [DateTime] If specified, only job executions completed at
389
+ # or after the specified time are included.
390
+ # @param end_time_max [DateTime] If specified, only job executions completed
391
+ # before the specified time are included.
392
+ # @param is_active [Boolean] If specified, only active or only completed job
393
+ # executions are included.
394
+ # @param skip [Integer] The number of elements in the collection to skip.
395
+ # @param top [Integer] The number of elements to return from the collection.
396
+ # @param [Hash{String => String}] A hash of custom headers that will be added
397
+ # to the HTTP request.
398
+ #
399
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
400
+ #
401
+ def list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, 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)
402
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
403
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
404
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
405
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
406
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
407
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
408
+
409
+
410
+ request_headers = {}
411
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
412
+
413
+ # Set Headers
414
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
415
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
416
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions'
417
+
418
+ request_url = @base_url || @client.base_url
419
+
420
+ options = {
421
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
422
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
423
+ 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},
424
+ headers: request_headers.merge(custom_headers || {}),
425
+ base_url: request_url
426
+ }
427
+ promise = @client.make_request_async(:get, path_template, options)
428
+
429
+ promise = promise.then do |result|
430
+ http_response = result.response
431
+ status_code = http_response.status
432
+ response_content = http_response.body
433
+ unless status_code == 200
434
+ error_model = JSON.load(response_content)
435
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
436
+ end
437
+
438
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
439
+ # Deserialize Response
440
+ if status_code == 200
441
+ begin
442
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
443
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper()
444
+ result.body = @client.deserialize(result_mapper, parsed_response)
445
+ rescue Exception => e
446
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
447
+ end
448
+ end
449
+
450
+ result
451
+ end
452
+
453
+ promise.execute
454
+ end
455
+
456
+ #
457
+ # Gets a job execution.
458
+ #
459
+ # @param resource_group_name [String] The name of the resource group that
460
+ # contains the resource. You can obtain this value from the Azure Resource
461
+ # Manager API or the portal.
462
+ # @param server_name [String] The name of the server.
463
+ # @param job_agent_name [String] The name of the job agent.
464
+ # @param job_name [String] The name of the job.
465
+ # @param job_execution_id The id of the job execution
466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
467
+ # will be added to the HTTP request.
468
+ #
469
+ # @return [JobExecution] operation results.
470
+ #
471
+ def get(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
472
+ response = get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
473
+ response.body unless response.nil?
474
+ end
475
+
476
+ #
477
+ # Gets a job execution.
478
+ #
479
+ # @param resource_group_name [String] The name of the resource group that
480
+ # contains the resource. You can obtain this value from the Azure Resource
481
+ # Manager API or the portal.
482
+ # @param server_name [String] The name of the server.
483
+ # @param job_agent_name [String] The name of the job agent.
484
+ # @param job_name [String] The name of the job.
485
+ # @param job_execution_id The id of the job execution
486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
487
+ # will be added to the HTTP request.
488
+ #
489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
490
+ #
491
+ def get_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
492
+ get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
493
+ end
494
+
495
+ #
496
+ # Gets a job execution.
497
+ #
498
+ # @param resource_group_name [String] The name of the resource group that
499
+ # contains the resource. You can obtain this value from the Azure Resource
500
+ # Manager API or the portal.
501
+ # @param server_name [String] The name of the server.
502
+ # @param job_agent_name [String] The name of the job agent.
503
+ # @param job_name [String] The name of the job.
504
+ # @param job_execution_id The id of the job execution
505
+ # @param [Hash{String => String}] A hash of custom headers that will be added
506
+ # to the HTTP request.
507
+ #
508
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
509
+ #
510
+ def get_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
511
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
512
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
513
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
514
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
515
+ fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil?
516
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
517
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
518
+
519
+
520
+ request_headers = {}
521
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
522
+
523
+ # Set Headers
524
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
525
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
526
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'
527
+
528
+ request_url = @base_url || @client.base_url
529
+
530
+ options = {
531
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
532
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id},
533
+ query_params: {'api-version' => @client.api_version},
534
+ headers: request_headers.merge(custom_headers || {}),
535
+ base_url: request_url
536
+ }
537
+ promise = @client.make_request_async(:get, path_template, options)
538
+
539
+ promise = promise.then do |result|
540
+ http_response = result.response
541
+ status_code = http_response.status
542
+ response_content = http_response.body
543
+ unless status_code == 200
544
+ error_model = JSON.load(response_content)
545
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
546
+ end
547
+
548
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
549
+ # Deserialize Response
550
+ if status_code == 200
551
+ begin
552
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
553
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
554
+ result.body = @client.deserialize(result_mapper, parsed_response)
555
+ rescue Exception => e
556
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
557
+ end
558
+ end
559
+
560
+ result
561
+ end
562
+
563
+ promise.execute
564
+ end
565
+
566
+ #
567
+ # Creates or updatess a job execution.
568
+ #
569
+ # @param resource_group_name [String] The name of the resource group that
570
+ # contains the resource. You can obtain this value from the Azure Resource
571
+ # Manager API or the portal.
572
+ # @param server_name [String] The name of the server.
573
+ # @param job_agent_name [String] The name of the job agent.
574
+ # @param job_name [String] The name of the job to get.
575
+ # @param job_execution_id The job execution id to create the job execution
576
+ # under.
577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
578
+ # will be added to the HTTP request.
579
+ #
580
+ # @return [JobExecution] operation results.
581
+ #
582
+ def create_or_update(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
583
+ response = create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
584
+ response.body unless response.nil?
585
+ end
586
+
587
+ #
588
+ # @param resource_group_name [String] The name of the resource group that
589
+ # contains the resource. You can obtain this value from the Azure Resource
590
+ # Manager API or the portal.
591
+ # @param server_name [String] The name of the server.
592
+ # @param job_agent_name [String] The name of the job agent.
593
+ # @param job_name [String] The name of the job to get.
594
+ # @param job_execution_id The job execution id to create the job execution
595
+ # under.
596
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
597
+ # will be added to the HTTP request.
598
+ #
599
+ # @return [Concurrent::Promise] promise which provides async access to http
600
+ # response.
601
+ #
602
+ def create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
603
+ # Send request
604
+ promise = begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers)
605
+
606
+ promise = promise.then do |response|
607
+ # Defining deserialization method.
608
+ deserialize_method = lambda do |parsed_response|
609
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
610
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
611
+ end
612
+
613
+ # Waiting for response.
614
+ @client.get_long_running_operation_result(response, deserialize_method)
615
+ end
616
+
617
+ promise
618
+ end
619
+
620
+ #
621
+ # Starts an elastic job execution.
622
+ #
623
+ # @param resource_group_name [String] The name of the resource group that
624
+ # contains the resource. You can obtain this value from the Azure Resource
625
+ # Manager API or the portal.
626
+ # @param server_name [String] The name of the server.
627
+ # @param job_agent_name [String] The name of the job agent.
628
+ # @param job_name [String] The name of the job to get.
629
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
630
+ # will be added to the HTTP request.
631
+ #
632
+ # @return [JobExecution] operation results.
633
+ #
634
+ def begin_create(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
635
+ response = begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
636
+ response.body unless response.nil?
637
+ end
638
+
639
+ #
640
+ # Starts an elastic job execution.
641
+ #
642
+ # @param resource_group_name [String] The name of the resource group that
643
+ # contains the resource. You can obtain this value from the Azure Resource
644
+ # Manager API or the portal.
645
+ # @param server_name [String] The name of the server.
646
+ # @param job_agent_name [String] The name of the job agent.
647
+ # @param job_name [String] The name of the job to get.
648
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
649
+ # will be added to the HTTP request.
650
+ #
651
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
652
+ #
653
+ def begin_create_with_http_info(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
654
+ begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:custom_headers).value!
655
+ end
656
+
657
+ #
658
+ # Starts an elastic job execution.
659
+ #
660
+ # @param resource_group_name [String] The name of the resource group that
661
+ # contains the resource. You can obtain this value from the Azure Resource
662
+ # Manager API or the portal.
663
+ # @param server_name [String] The name of the server.
664
+ # @param job_agent_name [String] The name of the job agent.
665
+ # @param job_name [String] The name of the job to get.
666
+ # @param [Hash{String => String}] A hash of custom headers that will be added
667
+ # to the HTTP request.
668
+ #
669
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
670
+ #
671
+ def begin_create_async(resource_group_name, server_name, job_agent_name, job_name, custom_headers:nil)
672
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
673
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
674
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
675
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
676
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
677
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
678
+
679
+
680
+ request_headers = {}
681
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
682
+
683
+ # Set Headers
684
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
685
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start'
687
+
688
+ request_url = @base_url || @client.base_url
689
+
690
+ options = {
691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
692
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
693
+ query_params: {'api-version' => @client.api_version},
694
+ headers: request_headers.merge(custom_headers || {}),
695
+ base_url: request_url
696
+ }
697
+ promise = @client.make_request_async(:post, path_template, options)
698
+
699
+ promise = promise.then do |result|
700
+ http_response = result.response
701
+ status_code = http_response.status
702
+ response_content = http_response.body
703
+ unless status_code == 200 || status_code == 202
704
+ error_model = JSON.load(response_content)
705
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
706
+ end
707
+
708
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
709
+ # Deserialize Response
710
+ if status_code == 200
711
+ begin
712
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
713
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
714
+ result.body = @client.deserialize(result_mapper, parsed_response)
715
+ rescue Exception => e
716
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
717
+ end
718
+ end
719
+
720
+ result
721
+ end
722
+
723
+ promise.execute
724
+ end
725
+
726
+ #
727
+ # Creates or updatess a job execution.
728
+ #
729
+ # @param resource_group_name [String] The name of the resource group that
730
+ # contains the resource. You can obtain this value from the Azure Resource
731
+ # Manager API or the portal.
732
+ # @param server_name [String] The name of the server.
733
+ # @param job_agent_name [String] The name of the job agent.
734
+ # @param job_name [String] The name of the job to get.
735
+ # @param job_execution_id The job execution id to create the job execution
736
+ # under.
737
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
738
+ # will be added to the HTTP request.
739
+ #
740
+ # @return [JobExecution] operation results.
741
+ #
742
+ def begin_create_or_update(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
743
+ response = begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
744
+ response.body unless response.nil?
745
+ end
746
+
747
+ #
748
+ # Creates or updatess a job execution.
749
+ #
750
+ # @param resource_group_name [String] The name of the resource group that
751
+ # contains the resource. You can obtain this value from the Azure Resource
752
+ # Manager API or the portal.
753
+ # @param server_name [String] The name of the server.
754
+ # @param job_agent_name [String] The name of the job agent.
755
+ # @param job_name [String] The name of the job to get.
756
+ # @param job_execution_id The job execution id to create the job execution
757
+ # under.
758
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
+ # will be added to the HTTP request.
760
+ #
761
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
762
+ #
763
+ def begin_create_or_update_with_http_info(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
764
+ begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:custom_headers).value!
765
+ end
766
+
767
+ #
768
+ # Creates or updatess a job execution.
769
+ #
770
+ # @param resource_group_name [String] The name of the resource group that
771
+ # contains the resource. You can obtain this value from the Azure Resource
772
+ # Manager API or the portal.
773
+ # @param server_name [String] The name of the server.
774
+ # @param job_agent_name [String] The name of the job agent.
775
+ # @param job_name [String] The name of the job to get.
776
+ # @param job_execution_id The job execution id to create the job execution
777
+ # under.
778
+ # @param [Hash{String => String}] A hash of custom headers that will be added
779
+ # to the HTTP request.
780
+ #
781
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
782
+ #
783
+ def begin_create_or_update_async(resource_group_name, server_name, job_agent_name, job_name, job_execution_id, custom_headers:nil)
784
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
785
+ fail ArgumentError, 'server_name is nil' if server_name.nil?
786
+ fail ArgumentError, 'job_agent_name is nil' if job_agent_name.nil?
787
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
788
+ fail ArgumentError, 'job_execution_id is nil' if job_execution_id.nil?
789
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
790
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
791
+
792
+
793
+ request_headers = {}
794
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
795
+
796
+ # Set Headers
797
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
798
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
799
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}'
800
+
801
+ request_url = @base_url || @client.base_url
802
+
803
+ options = {
804
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
805
+ path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'jobAgentName' => job_agent_name,'jobName' => job_name,'jobExecutionId' => job_execution_id,'subscriptionId' => @client.subscription_id},
806
+ query_params: {'api-version' => @client.api_version},
807
+ headers: request_headers.merge(custom_headers || {}),
808
+ base_url: request_url
809
+ }
810
+ promise = @client.make_request_async(:put, path_template, options)
811
+
812
+ promise = promise.then do |result|
813
+ http_response = result.response
814
+ status_code = http_response.status
815
+ response_content = http_response.body
816
+ unless status_code == 200 || status_code == 202 || status_code == 201
817
+ error_model = JSON.load(response_content)
818
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
819
+ end
820
+
821
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
822
+ # Deserialize Response
823
+ if status_code == 200
824
+ begin
825
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
826
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
827
+ result.body = @client.deserialize(result_mapper, parsed_response)
828
+ rescue Exception => e
829
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
830
+ end
831
+ end
832
+ # Deserialize Response
833
+ if status_code == 201
834
+ begin
835
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
836
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecution.mapper()
837
+ result.body = @client.deserialize(result_mapper, parsed_response)
838
+ rescue Exception => e
839
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
840
+ end
841
+ end
842
+
843
+ result
844
+ end
845
+
846
+ promise.execute
847
+ end
848
+
849
+ #
850
+ # Lists all executions in a job agent.
851
+ #
852
+ # @param next_page_link [String] The NextLink from the previous successful call
853
+ # to List operation.
854
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
855
+ # will be added to the HTTP request.
856
+ #
857
+ # @return [JobExecutionListResult] operation results.
858
+ #
859
+ def list_by_agent_next(next_page_link, custom_headers:nil)
860
+ response = list_by_agent_next_async(next_page_link, custom_headers:custom_headers).value!
861
+ response.body unless response.nil?
862
+ end
863
+
864
+ #
865
+ # Lists all executions in a job agent.
866
+ #
867
+ # @param next_page_link [String] The NextLink from the previous successful call
868
+ # to List operation.
869
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
870
+ # will be added to the HTTP request.
871
+ #
872
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
873
+ #
874
+ def list_by_agent_next_with_http_info(next_page_link, custom_headers:nil)
875
+ list_by_agent_next_async(next_page_link, custom_headers:custom_headers).value!
876
+ end
877
+
878
+ #
879
+ # Lists all executions in a job agent.
880
+ #
881
+ # @param next_page_link [String] The NextLink from the previous successful call
882
+ # to List operation.
883
+ # @param [Hash{String => String}] A hash of custom headers that will be added
884
+ # to the HTTP request.
885
+ #
886
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
887
+ #
888
+ def list_by_agent_next_async(next_page_link, custom_headers:nil)
889
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
890
+
891
+
892
+ request_headers = {}
893
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
894
+
895
+ # Set Headers
896
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
897
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
898
+ path_template = '{nextLink}'
899
+
900
+ request_url = @base_url || @client.base_url
901
+
902
+ options = {
903
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
904
+ skip_encoding_path_params: {'nextLink' => next_page_link},
905
+ headers: request_headers.merge(custom_headers || {}),
906
+ base_url: request_url
907
+ }
908
+ promise = @client.make_request_async(:get, path_template, options)
909
+
910
+ promise = promise.then do |result|
911
+ http_response = result.response
912
+ status_code = http_response.status
913
+ response_content = http_response.body
914
+ unless status_code == 200
915
+ error_model = JSON.load(response_content)
916
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
917
+ end
918
+
919
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
920
+ # Deserialize Response
921
+ if status_code == 200
922
+ begin
923
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
924
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper()
925
+ result.body = @client.deserialize(result_mapper, parsed_response)
926
+ rescue Exception => e
927
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
928
+ end
929
+ end
930
+
931
+ result
932
+ end
933
+
934
+ promise.execute
935
+ end
936
+
937
+ #
938
+ # Lists a job's executions.
939
+ #
940
+ # @param next_page_link [String] The NextLink from the previous successful call
941
+ # to List operation.
942
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
+ # will be added to the HTTP request.
944
+ #
945
+ # @return [JobExecutionListResult] operation results.
946
+ #
947
+ def list_by_job_next(next_page_link, custom_headers:nil)
948
+ response = list_by_job_next_async(next_page_link, custom_headers:custom_headers).value!
949
+ response.body unless response.nil?
950
+ end
951
+
952
+ #
953
+ # Lists a job's executions.
954
+ #
955
+ # @param next_page_link [String] The NextLink from the previous successful call
956
+ # to List operation.
957
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
958
+ # will be added to the HTTP request.
959
+ #
960
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
961
+ #
962
+ def list_by_job_next_with_http_info(next_page_link, custom_headers:nil)
963
+ list_by_job_next_async(next_page_link, custom_headers:custom_headers).value!
964
+ end
965
+
966
+ #
967
+ # Lists a job's executions.
968
+ #
969
+ # @param next_page_link [String] The NextLink from the previous successful call
970
+ # to List operation.
971
+ # @param [Hash{String => String}] A hash of custom headers that will be added
972
+ # to the HTTP request.
973
+ #
974
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
975
+ #
976
+ def list_by_job_next_async(next_page_link, custom_headers:nil)
977
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
978
+
979
+
980
+ request_headers = {}
981
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
982
+
983
+ # Set Headers
984
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
985
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
986
+ path_template = '{nextLink}'
987
+
988
+ request_url = @base_url || @client.base_url
989
+
990
+ options = {
991
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
992
+ skip_encoding_path_params: {'nextLink' => next_page_link},
993
+ headers: request_headers.merge(custom_headers || {}),
994
+ base_url: request_url
995
+ }
996
+ promise = @client.make_request_async(:get, path_template, options)
997
+
998
+ promise = promise.then do |result|
999
+ http_response = result.response
1000
+ status_code = http_response.status
1001
+ response_content = http_response.body
1002
+ unless status_code == 200
1003
+ error_model = JSON.load(response_content)
1004
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1005
+ end
1006
+
1007
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1008
+ # Deserialize Response
1009
+ if status_code == 200
1010
+ begin
1011
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1012
+ result_mapper = Azure::SQL::Mgmt::V2017_03_01_preview::Models::JobExecutionListResult.mapper()
1013
+ result.body = @client.deserialize(result_mapper, parsed_response)
1014
+ rescue Exception => e
1015
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1016
+ end
1017
+ end
1018
+
1019
+ result
1020
+ end
1021
+
1022
+ promise.execute
1023
+ end
1024
+
1025
+ #
1026
+ # Lists all executions in a job agent.
1027
+ #
1028
+ # @param resource_group_name [String] The name of the resource group that
1029
+ # contains the resource. You can obtain this value from the Azure Resource
1030
+ # Manager API or the portal.
1031
+ # @param server_name [String] The name of the server.
1032
+ # @param job_agent_name [String] The name of the job agent.
1033
+ # @param create_time_min [DateTime] If specified, only job executions created
1034
+ # at or after the specified time are included.
1035
+ # @param create_time_max [DateTime] If specified, only job executions created
1036
+ # before the specified time are included.
1037
+ # @param end_time_min [DateTime] If specified, only job executions completed at
1038
+ # or after the specified time are included.
1039
+ # @param end_time_max [DateTime] If specified, only job executions completed
1040
+ # before the specified time are included.
1041
+ # @param is_active [Boolean] If specified, only active or only completed job
1042
+ # executions are included.
1043
+ # @param skip [Integer] The number of elements in the collection to skip.
1044
+ # @param top [Integer] The number of elements to return from the collection.
1045
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1046
+ # will be added to the HTTP request.
1047
+ #
1048
+ # @return [JobExecutionListResult] which provide lazy access to pages of the
1049
+ # response.
1050
+ #
1051
+ def list_by_agent_as_lazy(resource_group_name, server_name, job_agent_name, 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)
1052
+ response = list_by_agent_async(resource_group_name, server_name, job_agent_name, 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!
1053
+ unless response.nil?
1054
+ page = response.body
1055
+ page.next_method = Proc.new do |next_page_link|
1056
+ list_by_agent_next_async(next_page_link, custom_headers:custom_headers)
1057
+ end
1058
+ page
1059
+ end
1060
+ end
1061
+
1062
+ #
1063
+ # Lists a job's executions.
1064
+ #
1065
+ # @param resource_group_name [String] The name of the resource group that
1066
+ # contains the resource. You can obtain this value from the Azure Resource
1067
+ # Manager API or the portal.
1068
+ # @param server_name [String] The name of the server.
1069
+ # @param job_agent_name [String] The name of the job agent.
1070
+ # @param job_name [String] The name of the job to get.
1071
+ # @param create_time_min [DateTime] If specified, only job executions created
1072
+ # at or after the specified time are included.
1073
+ # @param create_time_max [DateTime] If specified, only job executions created
1074
+ # before the specified time are included.
1075
+ # @param end_time_min [DateTime] If specified, only job executions completed at
1076
+ # or after the specified time are included.
1077
+ # @param end_time_max [DateTime] If specified, only job executions completed
1078
+ # before the specified time are included.
1079
+ # @param is_active [Boolean] If specified, only active or only completed job
1080
+ # executions are included.
1081
+ # @param skip [Integer] The number of elements in the collection to skip.
1082
+ # @param top [Integer] The number of elements to return from the collection.
1083
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1084
+ # will be added to the HTTP request.
1085
+ #
1086
+ # @return [JobExecutionListResult] which provide lazy access to pages of the
1087
+ # response.
1088
+ #
1089
+ def list_by_job_as_lazy(resource_group_name, server_name, job_agent_name, job_name, 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)
1090
+ response = list_by_job_async(resource_group_name, server_name, job_agent_name, job_name, 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!
1091
+ unless response.nil?
1092
+ page = response.body
1093
+ page.next_method = Proc.new do |next_page_link|
1094
+ list_by_job_next_async(next_page_link, custom_headers:custom_headers)
1095
+ end
1096
+ page
1097
+ end
1098
+ end
1099
+
1100
+ end
1101
+ end