azure_mgmt_api_management 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (578) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb +7 -6
  3. data/lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb +7 -6
  4. data/lib/2017-03-01/generated/azure_mgmt_api_management.rb +290 -0
  5. data/lib/2017-03-01/generated/azure_mgmt_api_management/api.rb +1141 -0
  6. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_diagnostic.rb +877 -0
  7. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_diagnostic_logger.rb +647 -0
  8. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_export.rb +134 -0
  9. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issu_attachment.rb +142 -0
  10. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issu_comment.rb +142 -0
  11. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issue.rb +508 -0
  12. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issue_attachment.rb +434 -0
  13. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issue_attachments.rb +288 -0
  14. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issue_comment.rb +431 -0
  15. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issue_comments.rb +288 -0
  16. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_issues.rb +279 -0
  17. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_management_client.rb +385 -0
  18. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_management_operations.rb +222 -0
  19. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_management_service.rb +1904 -0
  20. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_operation.rb +895 -0
  21. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_operation_policy.rb +637 -0
  22. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_policy.rb +587 -0
  23. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_product.rb +272 -0
  24. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_release.rb +789 -0
  25. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_revisions.rb +280 -0
  26. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_schema.rb +725 -0
  27. data/lib/2017-03-01/generated/azure_mgmt_api_management/api_version_set.rb +867 -0
  28. data/lib/2017-03-01/generated/azure_mgmt_api_management/authorization_server.rb +807 -0
  29. data/lib/2017-03-01/generated/azure_mgmt_api_management/backend.rb +924 -0
  30. data/lib/2017-03-01/generated/azure_mgmt_api_management/certificate.rb +733 -0
  31. data/lib/2017-03-01/generated/azure_mgmt_api_management/delegation_settings.rb +416 -0
  32. data/lib/2017-03-01/generated/azure_mgmt_api_management/diagnostic.rb +815 -0
  33. data/lib/2017-03-01/generated/azure_mgmt_api_management/diagnostic_logger.rb +612 -0
  34. data/lib/2017-03-01/generated/azure_mgmt_api_management/email_template.rb +889 -0
  35. data/lib/2017-03-01/generated/azure_mgmt_api_management/group.rb +832 -0
  36. data/lib/2017-03-01/generated/azure_mgmt_api_management/group_user.rb +655 -0
  37. data/lib/2017-03-01/generated/azure_mgmt_api_management/identity_provider.rb +675 -0
  38. data/lib/2017-03-01/generated/azure_mgmt_api_management/logger.rb +812 -0
  39. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/access_information_contract.rb +80 -0
  40. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +48 -0
  41. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/additional_location.rb +107 -0
  42. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_collection.rb +100 -0
  43. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_contract.rb +260 -0
  44. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_contract_properties.rb +200 -0
  45. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb +271 -0
  46. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb +57 -0
  47. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb +151 -0
  48. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_export_result.rb +47 -0
  49. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb +49 -0
  50. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +84 -0
  51. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb +298 -0
  52. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +47 -0
  53. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +47 -0
  54. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_identity.rb +73 -0
  55. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +100 -0
  56. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +81 -0
  57. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +418 -0
  58. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +60 -0
  59. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +77 -0
  60. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb +407 -0
  61. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +72 -0
  62. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_release_collection.rb +100 -0
  63. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_release_contract.rb +110 -0
  64. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_revision_collection.rb +98 -0
  65. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_revision_contract.rb +172 -0
  66. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb +88 -0
  67. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_type.rb +16 -0
  68. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_update_contract.rb +221 -0
  69. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_version_set_collection.rb +98 -0
  70. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_version_set_contract.rb +133 -0
  71. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_version_set_contract_properties.rb +95 -0
  72. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb +79 -0
  73. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb +106 -0
  74. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/apim_resource.rb +91 -0
  75. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/async_operation_status.rb +18 -0
  76. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +48 -0
  77. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/authorization_method.rb +22 -0
  78. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +109 -0
  79. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/authorization_server_contract.rb +309 -0
  80. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb +211 -0
  81. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb +309 -0
  82. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb +65 -0
  83. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_base_parameters.rb +131 -0
  84. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_collection.rb +98 -0
  85. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_contract.rb +185 -0
  86. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb +124 -0
  87. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_properties.rb +48 -0
  88. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_protocol.rb +16 -0
  89. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb +74 -0
  90. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb +78 -0
  91. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb +119 -0
  92. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_tls_properties.rb +63 -0
  93. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +158 -0
  94. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb +16 -0
  95. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/certificate_collection.rb +98 -0
  96. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/certificate_configuration.rb +84 -0
  97. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/certificate_contract.rb +98 -0
  98. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +58 -0
  99. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/certificate_information.rb +70 -0
  100. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/client_authentication_method.rb +16 -0
  101. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/confirmation.rb +16 -0
  102. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb +107 -0
  103. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/connectivity_status_type.rb +17 -0
  104. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/content_format.rb +20 -0
  105. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +59 -0
  106. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/diagnostic_collection.rb +98 -0
  107. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/diagnostic_contract.rb +74 -0
  108. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/email_template_collection.rb +98 -0
  109. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/email_template_contract.rb +147 -0
  110. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb +83 -0
  111. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb +107 -0
  112. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/error_field_contract.rb +68 -0
  113. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/error_response.rb +79 -0
  114. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +46 -0
  115. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/grant_type.rb +18 -0
  116. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/group_collection.rb +98 -0
  117. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/group_contract.rb +131 -0
  118. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/group_create_parameters.rb +88 -0
  119. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/group_type.rb +17 -0
  120. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/group_update_parameters.rb +88 -0
  121. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/hostname_configuration.rb +139 -0
  122. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb +71 -0
  123. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/hostname_type.rb +18 -0
  124. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb +131 -0
  125. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +191 -0
  126. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/identity_provider_list.rb +67 -0
  127. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/identity_provider_type.rb +20 -0
  128. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +164 -0
  129. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb +100 -0
  130. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb +97 -0
  131. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/issue_collection.rb +100 -0
  132. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/issue_comment_collection.rb +100 -0
  133. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/issue_comment_contract.rb +96 -0
  134. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/issue_contract.rb +130 -0
  135. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/key_type.rb +16 -0
  136. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/logger_collection.rb +109 -0
  137. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/logger_contract.rb +134 -0
  138. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/logger_sampling_contract.rb +160 -0
  139. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/logger_type.rb +16 -0
  140. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/logger_update_contract.rb +89 -0
  141. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/name_availability_reason.rb +17 -0
  142. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/network_status_contract.rb +75 -0
  143. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/notification_collection.rb +98 -0
  144. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/notification_contract.rb +100 -0
  145. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/notification_name.rb +21 -0
  146. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +57 -0
  147. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +98 -0
  148. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +122 -0
  149. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +95 -0
  150. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation.rb +80 -0
  151. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_collection.rb +100 -0
  152. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_contract.rb +185 -0
  153. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_display.rb +80 -0
  154. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb +114 -0
  155. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_entity_contract.rb +149 -0
  156. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_list_result.rb +101 -0
  157. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_result_contract.rb +134 -0
  158. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb +69 -0
  159. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/operation_update_contract.rb +158 -0
  160. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/parameter_contract.rb +109 -0
  161. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/policy_collection.rb +66 -0
  162. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/policy_contract.rb +73 -0
  163. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/policy_scope_contract.rb +19 -0
  164. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +83 -0
  165. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb +55 -0
  166. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb +111 -0
  167. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/portal_signin_settings.rb +73 -0
  168. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/portal_signup_settings.rb +86 -0
  169. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/product_collection.rb +98 -0
  170. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/product_contract.rb +167 -0
  171. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb +125 -0
  172. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/product_state.rb +16 -0
  173. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/product_update_parameters.rb +140 -0
  174. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/property_collection.rb +98 -0
  175. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/property_contract.rb +130 -0
  176. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb +70 -0
  177. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/property_update_parameters.rb +103 -0
  178. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/protocol.rb +16 -0
  179. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +77 -0
  180. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +104 -0
  181. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +57 -0
  182. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb +57 -0
  183. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/recipient_email_collection.rb +66 -0
  184. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/recipient_email_contract.rb +73 -0
  185. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/recipient_user_collection.rb +66 -0
  186. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/recipient_user_contract.rb +73 -0
  187. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb +73 -0
  188. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/region_contract.rb +69 -0
  189. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/region_list_result.rb +77 -0
  190. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb +46 -0
  191. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/report_collection.rb +109 -0
  192. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/report_record_contract.rb +338 -0
  193. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/representation_contract.rb +106 -0
  194. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/request_contract.rb +109 -0
  195. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/request_report_collection.rb +66 -0
  196. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/request_report_record_contract.rb +245 -0
  197. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/resource.rb +71 -0
  198. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/response_contract.rb +99 -0
  199. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/sampling_type.rb +16 -0
  200. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +60 -0
  201. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/schema_collection.rb +100 -0
  202. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/schema_contract.rb +87 -0
  203. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/sku_type.rb +18 -0
  204. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/state.rb +19 -0
  205. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_collection.rb +98 -0
  206. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_contract.rb +244 -0
  207. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +128 -0
  208. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +57 -0
  209. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_state.rb +20 -0
  210. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +146 -0
  211. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb +47 -0
  212. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_collection.rb +98 -0
  213. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_contract.rb +77 -0
  214. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb +50 -0
  215. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_description_collection.rb +98 -0
  216. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_description_contract.rb +114 -0
  217. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb +72 -0
  218. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_resource_collection.rb +98 -0
  219. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tag_resource_contract.rb +110 -0
  220. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/template_name.rb +28 -0
  221. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +121 -0
  222. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb +68 -0
  223. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +57 -0
  224. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_collection.rb +98 -0
  225. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_contract.rb +178 -0
  226. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_create_parameters.rb +154 -0
  227. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb +83 -0
  228. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_identity_collection.rb +77 -0
  229. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_identity_contract.rb +57 -0
  230. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_state.rb +18 -0
  231. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_token_parameters.rb +64 -0
  232. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_token_result.rb +46 -0
  233. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/user_update_parameters.rb +140 -0
  234. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/versioning_scheme.rb +17 -0
  235. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +76 -0
  236. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/virtual_network_type.rb +17 -0
  237. data/lib/2017-03-01/generated/azure_mgmt_api_management/models/x509certificate_name.rb +57 -0
  238. data/lib/2017-03-01/generated/azure_mgmt_api_management/module_definition.rb +9 -0
  239. data/lib/2017-03-01/generated/azure_mgmt_api_management/network_status.rb +238 -0
  240. data/lib/2017-03-01/generated/azure_mgmt_api_management/notification.rb +462 -0
  241. data/lib/2017-03-01/generated/azure_mgmt_api_management/notification_recipient_email.rb +472 -0
  242. data/lib/2017-03-01/generated/azure_mgmt_api_management/notification_recipient_user.rb +493 -0
  243. data/lib/2017-03-01/generated/azure_mgmt_api_management/open_id_connect_provider.rb +800 -0
  244. data/lib/2017-03-01/generated/azure_mgmt_api_management/operation_operations.rb +312 -0
  245. data/lib/2017-03-01/generated/azure_mgmt_api_management/policy.rb +438 -0
  246. data/lib/2017-03-01/generated/azure_mgmt_api_management/policy_snippets.rb +126 -0
  247. data/lib/2017-03-01/generated/azure_mgmt_api_management/product.rb +855 -0
  248. data/lib/2017-03-01/generated/azure_mgmt_api_management/product_api.rb +643 -0
  249. data/lib/2017-03-01/generated/azure_mgmt_api_management/product_group.rb +641 -0
  250. data/lib/2017-03-01/generated/azure_mgmt_api_management/product_policy.rb +469 -0
  251. data/lib/2017-03-01/generated/azure_mgmt_api_management/product_subscriptions.rb +312 -0
  252. data/lib/2017-03-01/generated/azure_mgmt_api_management/property.rb +797 -0
  253. data/lib/2017-03-01/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +262 -0
  254. data/lib/2017-03-01/generated/azure_mgmt_api_management/quota_by_period_keys.rb +261 -0
  255. data/lib/2017-03-01/generated/azure_mgmt_api_management/regions.rb +120 -0
  256. data/lib/2017-03-01/generated/azure_mgmt_api_management/reports.rb +1690 -0
  257. data/lib/2017-03-01/generated/azure_mgmt_api_management/sign_in_settings.rb +416 -0
  258. data/lib/2017-03-01/generated/azure_mgmt_api_management/sign_up_settings.rb +416 -0
  259. data/lib/2017-03-01/generated/azure_mgmt_api_management/subscription.rb +1039 -0
  260. data/lib/2017-03-01/generated/azure_mgmt_api_management/tag.rb +3058 -0
  261. data/lib/2017-03-01/generated/azure_mgmt_api_management/tag_description.rb +774 -0
  262. data/lib/2017-03-01/generated/azure_mgmt_api_management/tag_resource.rb +356 -0
  263. data/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_access.rb +401 -0
  264. data/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_access_git.rb +291 -0
  265. data/lib/2017-03-01/generated/azure_mgmt_api_management/tenant_configuration.rb +607 -0
  266. data/lib/2017-03-01/generated/azure_mgmt_api_management/user.rb +1086 -0
  267. data/lib/2017-03-01/generated/azure_mgmt_api_management/user_group.rb +287 -0
  268. data/lib/2017-03-01/generated/azure_mgmt_api_management/user_identities.rb +130 -0
  269. data/lib/2017-03-01/generated/azure_mgmt_api_management/user_subscription.rb +312 -0
  270. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management.rb +100 -89
  271. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/api_issue.rb +762 -0
  272. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/api_issue_attachment.rb +814 -0
  273. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/api_issue_comment.rb +811 -0
  274. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/api_management_client.rb +19 -6
  275. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/additional_location.rb +26 -2
  276. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_collection.rb +2 -0
  277. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_contract.rb +28 -0
  278. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_contract_properties.rb +22 -0
  279. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb +28 -0
  280. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb +28 -0
  281. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb +5 -4
  282. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +5 -4
  283. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb +5 -4
  284. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_release_collection.rb +2 -0
  285. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_revision_collection.rb +2 -0
  286. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb +22 -0
  287. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/api_update_contract.rb +28 -0
  288. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/error_response.rb +4 -4
  289. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/error_response_body.rb +79 -0
  290. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb +100 -0
  291. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb +97 -0
  292. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/issue_collection.rb +100 -0
  293. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/issue_comment_collection.rb +100 -0
  294. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/issue_comment_contract.rb +96 -0
  295. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/issue_contract.rb +130 -0
  296. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/operation_collection.rb +2 -0
  297. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/operation_result_contract.rb +2 -2
  298. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/policy_content_format.rb +2 -0
  299. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/policy_contract.rb +2 -1
  300. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/schema_collection.rb +2 -0
  301. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/models/state.rb +19 -0
  302. data/lib/2018-01-01-preview/generated/azure_mgmt_api_management/product_api.rb +33 -24
  303. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management.rb +296 -0
  304. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api.rb +1144 -0
  305. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_diagnostic.rb +874 -0
  306. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_export.rb +147 -0
  307. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_issue.rb +762 -0
  308. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_issue_attachment.rb +814 -0
  309. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_issue_comment.rb +811 -0
  310. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_management_client.rb +357 -0
  311. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_management_operations.rb +222 -0
  312. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_management_service.rb +1914 -0
  313. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_operation.rb +905 -0
  314. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_operation_policy.rb +639 -0
  315. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_policy.rb +589 -0
  316. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_product.rb +272 -0
  317. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_release.rb +893 -0
  318. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_revisions.rb +280 -0
  319. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_schema.rb +738 -0
  320. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/api_version_set.rb +864 -0
  321. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/authorization_server.rb +819 -0
  322. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/backend.rb +931 -0
  323. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/certificate.rb +730 -0
  324. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/delegation_settings.rb +416 -0
  325. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/diagnostic.rb +812 -0
  326. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/email_template.rb +896 -0
  327. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/group.rb +839 -0
  328. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/group_user.rb +657 -0
  329. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/identity_provider.rb +796 -0
  330. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/logger.rb +819 -0
  331. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/access_information_contract.rb +80 -0
  332. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/access_information_update_parameters.rb +48 -0
  333. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/additional_location.rb +131 -0
  334. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/always_log.rb +15 -0
  335. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_collection.rb +100 -0
  336. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_contract.rb +288 -0
  337. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_contract_properties.rb +222 -0
  338. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_create_or_update_parameter.rb +313 -0
  339. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_create_or_update_properties_wsdl_selector.rb +57 -0
  340. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_entity_base_contract.rb +179 -0
  341. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_export_result.rb +47 -0
  342. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_apply_network_configuration_parameters.rb +49 -0
  343. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_backup_restore_parameters.rb +84 -0
  344. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_base_properties.rb +322 -0
  345. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_check_name_availability_parameters.rb +47 -0
  346. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_get_sso_token_result.rb +47 -0
  347. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_identity.rb +73 -0
  348. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_list_result.rb +100 -0
  349. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_name_availability_result.rb +81 -0
  350. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_resource.rb +442 -0
  351. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_sku_properties.rb +60 -0
  352. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_update_hostname_parameters.rb +77 -0
  353. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_update_parameters.rb +431 -0
  354. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_management_service_upload_certificate_parameters.rb +72 -0
  355. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_release_collection.rb +100 -0
  356. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_release_contract.rb +110 -0
  357. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_revision_collection.rb +100 -0
  358. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_revision_contract.rb +145 -0
  359. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_revision_info_contract.rb +88 -0
  360. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_tag_resource_contract_properties.rb +221 -0
  361. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_type.rb +16 -0
  362. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_update_contract.rb +249 -0
  363. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_version_set_collection.rb +98 -0
  364. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_version_set_contract.rb +133 -0
  365. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_version_set_contract_details.rb +96 -0
  366. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_version_set_entity_base.rb +78 -0
  367. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/api_version_set_update_parameters.rb +106 -0
  368. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/apim_resource.rb +91 -0
  369. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/async_operation_status.rb +18 -0
  370. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/authentication_settings_contract.rb +48 -0
  371. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/authorization_method.rb +22 -0
  372. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/authorization_server_collection.rb +109 -0
  373. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/authorization_server_contract.rb +309 -0
  374. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/authorization_server_contract_base_properties.rb +211 -0
  375. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/authorization_server_update_contract.rb +309 -0
  376. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_authorization_header_credentials.rb +65 -0
  377. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_base_parameters.rb +131 -0
  378. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_collection.rb +98 -0
  379. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_contract.rb +185 -0
  380. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_credentials_contract.rb +124 -0
  381. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_properties.rb +48 -0
  382. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_protocol.rb +16 -0
  383. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_proxy_contract.rb +74 -0
  384. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_reconnect_contract.rb +74 -0
  385. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_service_fabric_cluster_properties.rb +119 -0
  386. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_tls_properties.rb +63 -0
  387. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/backend_update_parameters.rb +158 -0
  388. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/bearer_token_sending_method.rb +16 -0
  389. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/body_diagnostic_settings.rb +49 -0
  390. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/certificate_collection.rb +98 -0
  391. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/certificate_configuration.rb +85 -0
  392. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/certificate_contract.rb +98 -0
  393. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/certificate_create_or_update_parameters.rb +58 -0
  394. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/certificate_information.rb +70 -0
  395. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/client_authentication_method.rb +16 -0
  396. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/confirmation.rb +16 -0
  397. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/connectivity_status_contract.rb +107 -0
  398. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/connectivity_status_type.rb +17 -0
  399. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/content_format.rb +20 -0
  400. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/deploy_configuration_parameters.rb +59 -0
  401. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/diagnostic_collection.rb +98 -0
  402. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/diagnostic_contract.rb +123 -0
  403. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/email_template_collection.rb +98 -0
  404. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/email_template_contract.rb +147 -0
  405. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/email_template_parameters_contract_properties.rb +83 -0
  406. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/email_template_update_parameters.rb +107 -0
  407. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/error_field_contract.rb +68 -0
  408. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/error_response.rb +79 -0
  409. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/error_response_body.rb +79 -0
  410. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/export_format.rb +17 -0
  411. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/generate_sso_url_result.rb +46 -0
  412. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/grant_type.rb +18 -0
  413. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/group_collection.rb +98 -0
  414. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/group_contract.rb +131 -0
  415. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/group_contract_properties.rb +104 -0
  416. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/group_create_parameters.rb +88 -0
  417. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/group_type.rb +17 -0
  418. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/group_update_parameters.rb +88 -0
  419. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/hostname_configuration.rb +139 -0
  420. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/hostname_configuration_old.rb +71 -0
  421. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/hostname_type.rb +18 -0
  422. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/http_message_diagnostic.rb +66 -0
  423. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/identity_provider_base_parameters.rb +131 -0
  424. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/identity_provider_contract.rb +191 -0
  425. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/identity_provider_list.rb +99 -0
  426. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/identity_provider_type.rb +20 -0
  427. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/identity_provider_update_parameters.rb +164 -0
  428. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/issue_attachment_collection.rb +100 -0
  429. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/issue_attachment_contract.rb +97 -0
  430. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/issue_collection.rb +100 -0
  431. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/issue_comment_collection.rb +100 -0
  432. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/issue_comment_contract.rb +96 -0
  433. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/issue_contract.rb +130 -0
  434. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/key_type.rb +16 -0
  435. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/logger_collection.rb +109 -0
  436. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/logger_contract.rb +133 -0
  437. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/logger_type.rb +16 -0
  438. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/logger_update_contract.rb +89 -0
  439. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/name_availability_reason.rb +17 -0
  440. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/network_status_contract.rb +75 -0
  441. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/network_status_contract_by_location.rb +61 -0
  442. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/notification_collection.rb +98 -0
  443. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/notification_contract.rb +100 -0
  444. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/notification_name.rb +21 -0
  445. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/oauth2authentication_settings_contract.rb +57 -0
  446. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/open_id_connect_provider_collection.rb +98 -0
  447. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/openid_connect_provider_contract.rb +122 -0
  448. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/openid_connect_provider_update_contract.rb +95 -0
  449. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation.rb +80 -0
  450. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_collection.rb +100 -0
  451. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_contract.rb +185 -0
  452. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_display.rb +80 -0
  453. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_entity_base_contract.rb +114 -0
  454. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_list_result.rb +101 -0
  455. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_result_contract.rb +134 -0
  456. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_result_log_item_contract.rb +69 -0
  457. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_tag_resource_contract_properties.rb +134 -0
  458. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/operation_update_contract.rb +158 -0
  459. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/parameter_contract.rb +109 -0
  460. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/pipeline_diagnostic_settings.rb +59 -0
  461. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/policy_collection.rb +66 -0
  462. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/policy_content_format.rb +18 -0
  463. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/policy_contract.rb +87 -0
  464. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/policy_scope_contract.rb +19 -0
  465. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/policy_snippet_contract.rb +83 -0
  466. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/policy_snippets_collection.rb +55 -0
  467. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/portal_delegation_settings.rb +111 -0
  468. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/portal_signin_settings.rb +73 -0
  469. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/portal_signup_settings.rb +86 -0
  470. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/product_collection.rb +98 -0
  471. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/product_contract.rb +167 -0
  472. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/product_entity_base_parameters.rb +125 -0
  473. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/product_state.rb +16 -0
  474. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/product_tag_resource_contract_properties.rb +115 -0
  475. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/product_update_parameters.rb +140 -0
  476. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/property_collection.rb +98 -0
  477. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/property_contract.rb +130 -0
  478. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/property_entity_base_parameters.rb +70 -0
  479. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/property_update_parameters.rb +103 -0
  480. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/protocol.rb +16 -0
  481. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/quota_counter_collection.rb +77 -0
  482. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/quota_counter_contract.rb +104 -0
  483. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/quota_counter_value_contract.rb +57 -0
  484. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/quota_counter_value_contract_properties.rb +57 -0
  485. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/recipient_email_collection.rb +66 -0
  486. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/recipient_email_contract.rb +73 -0
  487. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/recipient_user_collection.rb +66 -0
  488. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/recipient_user_contract.rb +73 -0
  489. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/recipients_contract_properties.rb +73 -0
  490. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/region_contract.rb +69 -0
  491. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/region_list_result.rb +109 -0
  492. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/registration_delegation_settings_properties.rb +46 -0
  493. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/report_collection.rb +109 -0
  494. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/report_record_contract.rb +338 -0
  495. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/representation_contract.rb +106 -0
  496. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/request_contract.rb +109 -0
  497. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/request_report_collection.rb +66 -0
  498. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/request_report_record_contract.rb +245 -0
  499. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/resource.rb +71 -0
  500. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/response_contract.rb +99 -0
  501. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/sampling_settings.rb +61 -0
  502. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/sampling_type.rb +15 -0
  503. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/save_configuration_parameter.rb +60 -0
  504. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/schema_collection.rb +100 -0
  505. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/schema_contract.rb +87 -0
  506. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/sku_type.rb +18 -0
  507. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/soap_api_type.rb +16 -0
  508. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/state.rb +19 -0
  509. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscription_collection.rb +98 -0
  510. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscription_contract.rb +244 -0
  511. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb +128 -0
  512. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscription_key_parameter_names_contract.rb +57 -0
  513. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscription_state.rb +20 -0
  514. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscription_update_parameters.rb +146 -0
  515. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/subscriptions_delegation_settings_properties.rb +47 -0
  516. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_collection.rb +98 -0
  517. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_contract.rb +77 -0
  518. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_create_update_parameters.rb +50 -0
  519. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_description_collection.rb +98 -0
  520. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_description_contract.rb +114 -0
  521. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_description_create_parameters.rb +72 -0
  522. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_resource_collection.rb +109 -0
  523. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_resource_contract.rb +86 -0
  524. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tag_tag_resource_contract_properties.rb +61 -0
  525. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/template_name.rb +28 -0
  526. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/tenant_configuration_sync_state_contract.rb +121 -0
  527. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/terms_of_service_properties.rb +68 -0
  528. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/token_body_parameter_contract.rb +57 -0
  529. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_collection.rb +98 -0
  530. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_contract.rb +179 -0
  531. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_create_parameters.rb +154 -0
  532. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_entity_base_parameters.rb +83 -0
  533. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_identity_collection.rb +109 -0
  534. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_identity_contract.rb +57 -0
  535. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_state.rb +18 -0
  536. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_token_parameters.rb +64 -0
  537. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_token_result.rb +46 -0
  538. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/user_update_parameters.rb +140 -0
  539. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/versioning_scheme.rb +17 -0
  540. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/virtual_network_configuration.rb +76 -0
  541. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/virtual_network_type.rb +17 -0
  542. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/models/x509certificate_name.rb +57 -0
  543. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/module_definition.rb +9 -0
  544. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/network_status.rb +254 -0
  545. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/notification.rb +469 -0
  546. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/notification_recipient_email.rb +474 -0
  547. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/notification_recipient_user.rb +495 -0
  548. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/open_id_connect_provider.rb +807 -0
  549. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/operation_operations.rb +316 -0
  550. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/policy.rb +526 -0
  551. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/policy_snippets.rb +126 -0
  552. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/product.rb +862 -0
  553. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/product_api.rb +654 -0
  554. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/product_group.rb +643 -0
  555. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/product_policy.rb +571 -0
  556. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/product_subscriptions.rb +312 -0
  557. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/property.rb +804 -0
  558. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/quota_by_counter_keys.rb +262 -0
  559. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/quota_by_period_keys.rb +261 -0
  560. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/regions.rb +230 -0
  561. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/reports.rb +1690 -0
  562. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/sign_in_settings.rb +416 -0
  563. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/sign_up_settings.rb +416 -0
  564. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/subscription.rb +1070 -0
  565. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/tag.rb +3081 -0
  566. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/tag_description.rb +787 -0
  567. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/tag_resource.rb +356 -0
  568. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/tenant_access.rb +401 -0
  569. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/tenant_access_git.rb +291 -0
  570. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/tenant_configuration.rb +607 -0
  571. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/user.rb +1099 -0
  572. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/user_group.rb +287 -0
  573. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/user_identities.rb +242 -0
  574. data/lib/2018-06-01-preview/generated/azure_mgmt_api_management/user_subscription.rb +312 -0
  575. data/lib/azure_mgmt_api_management.rb +4 -2
  576. data/lib/profiles/latest/modules/apimanagement_profile_module.rb +616 -558
  577. data/lib/version.rb +1 -1
  578. metadata +553 -4
@@ -0,0 +1,222 @@
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::ApiManagement::Mgmt::V2017_03_01
7
+ #
8
+ # ApiManagement Client
9
+ #
10
+ class ApiManagementOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ApiManagementOperations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ApiManagementClient] reference to the ApiManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
26
+ # provider.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<Operation>] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
40
+ # provider.
41
+ #
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(custom_headers:nil)
48
+ list_async(custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
53
+ # provider.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'providers/Microsoft.ApiManagement/operations'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ query_params: {'api-version' => @client.api_version},
77
+ headers: request_headers.merge(custom_headers || {}),
78
+ base_url: request_url
79
+ }
80
+ promise = @client.make_request_async(:get, path_template, options)
81
+
82
+ promise = promise.then do |result|
83
+ http_response = result.response
84
+ status_code = http_response.status
85
+ response_content = http_response.body
86
+ unless status_code == 200
87
+ error_model = JSON.load(response_content)
88
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
89
+ end
90
+
91
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
92
+ # Deserialize Response
93
+ if status_code == 200
94
+ begin
95
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
96
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::OperationListResult.mapper()
97
+ result.body = @client.deserialize(result_mapper, parsed_response)
98
+ rescue Exception => e
99
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
100
+ end
101
+ end
102
+
103
+ result
104
+ end
105
+
106
+ promise.execute
107
+ end
108
+
109
+ #
110
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
111
+ # provider.
112
+ #
113
+ # @param next_page_link [String] The NextLink from the previous successful call
114
+ # to List operation.
115
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
116
+ # will be added to the HTTP request.
117
+ #
118
+ # @return [OperationListResult] operation results.
119
+ #
120
+ def list_next(next_page_link, custom_headers:nil)
121
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
122
+ response.body unless response.nil?
123
+ end
124
+
125
+ #
126
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
127
+ # provider.
128
+ #
129
+ # @param next_page_link [String] The NextLink from the previous successful call
130
+ # to List operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
135
+ #
136
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
137
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
138
+ end
139
+
140
+ #
141
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
142
+ # provider.
143
+ #
144
+ # @param next_page_link [String] The NextLink from the previous successful call
145
+ # to List operation.
146
+ # @param [Hash{String => String}] A hash of custom headers that will be added
147
+ # to the HTTP request.
148
+ #
149
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
150
+ #
151
+ def list_next_async(next_page_link, custom_headers:nil)
152
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
153
+
154
+
155
+ request_headers = {}
156
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
157
+
158
+ # Set Headers
159
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
160
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
161
+ path_template = '{nextLink}'
162
+
163
+ request_url = @base_url || @client.base_url
164
+
165
+ options = {
166
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
167
+ skip_encoding_path_params: {'nextLink' => next_page_link},
168
+ headers: request_headers.merge(custom_headers || {}),
169
+ base_url: request_url
170
+ }
171
+ promise = @client.make_request_async(:get, path_template, options)
172
+
173
+ promise = promise.then do |result|
174
+ http_response = result.response
175
+ status_code = http_response.status
176
+ response_content = http_response.body
177
+ unless status_code == 200
178
+ error_model = JSON.load(response_content)
179
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
180
+ end
181
+
182
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
183
+ # Deserialize Response
184
+ if status_code == 200
185
+ begin
186
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
187
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::OperationListResult.mapper()
188
+ result.body = @client.deserialize(result_mapper, parsed_response)
189
+ rescue Exception => e
190
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
191
+ end
192
+ end
193
+
194
+ result
195
+ end
196
+
197
+ promise.execute
198
+ end
199
+
200
+ #
201
+ # Lists all of the available REST API operations of the Microsoft.ApiManagement
202
+ # provider.
203
+ #
204
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
205
+ # will be added to the HTTP request.
206
+ #
207
+ # @return [OperationListResult] which provide lazy access to pages of the
208
+ # response.
209
+ #
210
+ def list_as_lazy(custom_headers:nil)
211
+ response = list_async(custom_headers:custom_headers).value!
212
+ unless response.nil?
213
+ page = response.body
214
+ page.next_method = Proc.new do |next_page_link|
215
+ list_next_async(next_page_link, custom_headers:custom_headers)
216
+ end
217
+ page
218
+ end
219
+ end
220
+
221
+ end
222
+ end
@@ -0,0 +1,1904 @@
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::ApiManagement::Mgmt::V2017_03_01
7
+ #
8
+ # ApiManagement Client
9
+ #
10
+ class ApiManagementService
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ApiManagementService class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ApiManagementClient] reference to the ApiManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Restores a backup of an API Management service created using the
26
+ # ApiManagementService_Backup operation on the current service. This is a long
27
+ # running operation and could take several minutes to complete.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group.
30
+ # @param service_name [String] The name of the API Management service.
31
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
32
+ # supplied to the Restore API Management service from backup operation.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [ApiManagementServiceResource] operation results.
37
+ #
38
+ def restore(resource_group_name, service_name, parameters, custom_headers:nil)
39
+ response = restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group.
45
+ # @param service_name [String] The name of the API Management service.
46
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
47
+ # supplied to the Restore API Management service from backup operation.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [Concurrent::Promise] promise which provides async access to http
52
+ # response.
53
+ #
54
+ def restore_async(resource_group_name, service_name, parameters, custom_headers:nil)
55
+ # Send request
56
+ promise = begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers)
57
+
58
+ promise = promise.then do |response|
59
+ # Defining deserialization method.
60
+ deserialize_method = lambda do |parsed_response|
61
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
62
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
63
+ end
64
+
65
+ # Waiting for response.
66
+ @client.get_long_running_operation_result(response, deserialize_method)
67
+ end
68
+
69
+ promise
70
+ end
71
+
72
+ #
73
+ # Creates a backup of the API Management service to the given Azure Storage
74
+ # Account. This is long running operation and could take several minutes to
75
+ # complete.
76
+ #
77
+ # @param resource_group_name [String] The name of the resource group.
78
+ # @param service_name [String] The name of the API Management service.
79
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
80
+ # supplied to the ApiManagementService_Backup operation.
81
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
82
+ # will be added to the HTTP request.
83
+ #
84
+ # @return [ApiManagementServiceResource] operation results.
85
+ #
86
+ def backup(resource_group_name, service_name, parameters, custom_headers:nil)
87
+ response = backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
88
+ response.body unless response.nil?
89
+ end
90
+
91
+ #
92
+ # @param resource_group_name [String] The name of the resource group.
93
+ # @param service_name [String] The name of the API Management service.
94
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
95
+ # supplied to the ApiManagementService_Backup operation.
96
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
97
+ # will be added to the HTTP request.
98
+ #
99
+ # @return [Concurrent::Promise] promise which provides async access to http
100
+ # response.
101
+ #
102
+ def backup_async(resource_group_name, service_name, parameters, custom_headers:nil)
103
+ # Send request
104
+ promise = begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers)
105
+
106
+ promise = promise.then do |response|
107
+ # Defining deserialization method.
108
+ deserialize_method = lambda do |parsed_response|
109
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
110
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
111
+ end
112
+
113
+ # Waiting for response.
114
+ @client.get_long_running_operation_result(response, deserialize_method)
115
+ end
116
+
117
+ promise
118
+ end
119
+
120
+ #
121
+ # Creates or updates an API Management service. This is long running operation
122
+ # and could take several minutes to complete.
123
+ #
124
+ # @param resource_group_name [String] The name of the resource group.
125
+ # @param service_name [String] The name of the API Management service.
126
+ # @param parameters [ApiManagementServiceResource] Parameters supplied to the
127
+ # CreateOrUpdate API Management service operation.
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [ApiManagementServiceResource] operation results.
132
+ #
133
+ def create_or_update(resource_group_name, service_name, parameters, custom_headers:nil)
134
+ response = create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
135
+ response.body unless response.nil?
136
+ end
137
+
138
+ #
139
+ # @param resource_group_name [String] The name of the resource group.
140
+ # @param service_name [String] The name of the API Management service.
141
+ # @param parameters [ApiManagementServiceResource] Parameters supplied to the
142
+ # CreateOrUpdate API Management service operation.
143
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
+ # will be added to the HTTP request.
145
+ #
146
+ # @return [Concurrent::Promise] promise which provides async access to http
147
+ # response.
148
+ #
149
+ def create_or_update_async(resource_group_name, service_name, parameters, custom_headers:nil)
150
+ # Send request
151
+ promise = begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers)
152
+
153
+ promise = promise.then do |response|
154
+ # Defining deserialization method.
155
+ deserialize_method = lambda do |parsed_response|
156
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
157
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
158
+ end
159
+
160
+ # Waiting for response.
161
+ @client.get_long_running_operation_result(response, deserialize_method)
162
+ end
163
+
164
+ promise
165
+ end
166
+
167
+ #
168
+ # Updates an existing API Management service.
169
+ #
170
+ # @param resource_group_name [String] The name of the resource group.
171
+ # @param service_name [String] The name of the API Management service.
172
+ # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied
173
+ # to the CreateOrUpdate API Management service operation.
174
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
175
+ # will be added to the HTTP request.
176
+ #
177
+ # @return [ApiManagementServiceResource] operation results.
178
+ #
179
+ def update(resource_group_name, service_name, parameters, custom_headers:nil)
180
+ response = update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
181
+ response.body unless response.nil?
182
+ end
183
+
184
+ #
185
+ # @param resource_group_name [String] The name of the resource group.
186
+ # @param service_name [String] The name of the API Management service.
187
+ # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied
188
+ # to the CreateOrUpdate API Management service operation.
189
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
190
+ # will be added to the HTTP request.
191
+ #
192
+ # @return [Concurrent::Promise] promise which provides async access to http
193
+ # response.
194
+ #
195
+ def update_async(resource_group_name, service_name, parameters, custom_headers:nil)
196
+ # Send request
197
+ promise = begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers)
198
+
199
+ promise = promise.then do |response|
200
+ # Defining deserialization method.
201
+ deserialize_method = lambda do |parsed_response|
202
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
203
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
204
+ end
205
+
206
+ # Waiting for response.
207
+ @client.get_long_running_operation_result(response, deserialize_method)
208
+ end
209
+
210
+ promise
211
+ end
212
+
213
+ #
214
+ # Gets an API Management service resource description.
215
+ #
216
+ # @param resource_group_name [String] The name of the resource group.
217
+ # @param service_name [String] The name of the API Management service.
218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
219
+ # will be added to the HTTP request.
220
+ #
221
+ # @return [ApiManagementServiceResource] operation results.
222
+ #
223
+ def get(resource_group_name, service_name, custom_headers:nil)
224
+ response = get_async(resource_group_name, service_name, custom_headers:custom_headers).value!
225
+ response.body unless response.nil?
226
+ end
227
+
228
+ #
229
+ # Gets an API Management service resource description.
230
+ #
231
+ # @param resource_group_name [String] The name of the resource group.
232
+ # @param service_name [String] The name of the API Management service.
233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
234
+ # will be added to the HTTP request.
235
+ #
236
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
237
+ #
238
+ def get_with_http_info(resource_group_name, service_name, custom_headers:nil)
239
+ get_async(resource_group_name, service_name, custom_headers:custom_headers).value!
240
+ end
241
+
242
+ #
243
+ # Gets an API Management service resource description.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group.
246
+ # @param service_name [String] The name of the API Management service.
247
+ # @param [Hash{String => String}] A hash of custom headers that will be added
248
+ # to the HTTP request.
249
+ #
250
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
251
+ #
252
+ def get_async(resource_group_name, service_name, custom_headers:nil)
253
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
254
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
255
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
256
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
257
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
258
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
259
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
260
+
261
+
262
+ request_headers = {}
263
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
264
+
265
+ # Set Headers
266
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
267
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
268
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'
269
+
270
+ request_url = @base_url || @client.base_url
271
+
272
+ options = {
273
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
274
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
275
+ query_params: {'api-version' => @client.api_version},
276
+ headers: request_headers.merge(custom_headers || {}),
277
+ base_url: request_url
278
+ }
279
+ promise = @client.make_request_async(:get, path_template, options)
280
+
281
+ promise = promise.then do |result|
282
+ http_response = result.response
283
+ status_code = http_response.status
284
+ response_content = http_response.body
285
+ unless status_code == 200
286
+ error_model = JSON.load(response_content)
287
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
288
+ end
289
+
290
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
291
+ # Deserialize Response
292
+ if status_code == 200
293
+ begin
294
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
295
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
296
+ result.body = @client.deserialize(result_mapper, parsed_response)
297
+ rescue Exception => e
298
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
299
+ end
300
+ end
301
+
302
+ result
303
+ end
304
+
305
+ promise.execute
306
+ end
307
+
308
+ #
309
+ # Deletes an existing API Management service.
310
+ #
311
+ # @param resource_group_name [String] The name of the resource group.
312
+ # @param service_name [String] The name of the API Management service.
313
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
314
+ # will be added to the HTTP request.
315
+ #
316
+ #
317
+ def delete(resource_group_name, service_name, custom_headers:nil)
318
+ response = delete_async(resource_group_name, service_name, custom_headers:custom_headers).value!
319
+ nil
320
+ end
321
+
322
+ #
323
+ # Deletes an existing API Management service.
324
+ #
325
+ # @param resource_group_name [String] The name of the resource group.
326
+ # @param service_name [String] The name of the API Management service.
327
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
328
+ # will be added to the HTTP request.
329
+ #
330
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
331
+ #
332
+ def delete_with_http_info(resource_group_name, service_name, custom_headers:nil)
333
+ delete_async(resource_group_name, service_name, custom_headers:custom_headers).value!
334
+ end
335
+
336
+ #
337
+ # Deletes an existing API Management service.
338
+ #
339
+ # @param resource_group_name [String] The name of the resource group.
340
+ # @param service_name [String] The name of the API Management service.
341
+ # @param [Hash{String => String}] A hash of custom headers that will be added
342
+ # to the HTTP request.
343
+ #
344
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
345
+ #
346
+ def delete_async(resource_group_name, service_name, custom_headers:nil)
347
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
348
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
349
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
350
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
351
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
352
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
353
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
354
+
355
+
356
+ request_headers = {}
357
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
358
+
359
+ # Set Headers
360
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
361
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
362
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'
363
+
364
+ request_url = @base_url || @client.base_url
365
+
366
+ options = {
367
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
368
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
369
+ query_params: {'api-version' => @client.api_version},
370
+ headers: request_headers.merge(custom_headers || {}),
371
+ base_url: request_url
372
+ }
373
+ promise = @client.make_request_async(:delete, path_template, options)
374
+
375
+ promise = promise.then do |result|
376
+ http_response = result.response
377
+ status_code = http_response.status
378
+ response_content = http_response.body
379
+ unless status_code == 200 || status_code == 204
380
+ error_model = JSON.load(response_content)
381
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
382
+ end
383
+
384
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
385
+
386
+ result
387
+ end
388
+
389
+ promise.execute
390
+ end
391
+
392
+ #
393
+ # List all API Management services within a resource group.
394
+ #
395
+ # @param resource_group_name [String] The name of the resource group.
396
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
397
+ # will be added to the HTTP request.
398
+ #
399
+ # @return [Array<ApiManagementServiceResource>] operation results.
400
+ #
401
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
402
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
403
+ first_page.get_all_items
404
+ end
405
+
406
+ #
407
+ # List all API Management services within a resource group.
408
+ #
409
+ # @param resource_group_name [String] The name of the resource group.
410
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
411
+ # will be added to the HTTP request.
412
+ #
413
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
414
+ #
415
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
416
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
417
+ end
418
+
419
+ #
420
+ # List all API Management services within a resource group.
421
+ #
422
+ # @param resource_group_name [String] The name of the resource group.
423
+ # @param [Hash{String => String}] A hash of custom headers that will be added
424
+ # to the HTTP request.
425
+ #
426
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
427
+ #
428
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
429
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
430
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
431
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
432
+
433
+
434
+ request_headers = {}
435
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
436
+
437
+ # Set Headers
438
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
439
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
440
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service'
441
+
442
+ request_url = @base_url || @client.base_url
443
+
444
+ options = {
445
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
446
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
447
+ query_params: {'api-version' => @client.api_version},
448
+ headers: request_headers.merge(custom_headers || {}),
449
+ base_url: request_url
450
+ }
451
+ promise = @client.make_request_async(:get, path_template, options)
452
+
453
+ promise = promise.then do |result|
454
+ http_response = result.response
455
+ status_code = http_response.status
456
+ response_content = http_response.body
457
+ unless status_code == 200
458
+ error_model = JSON.load(response_content)
459
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
460
+ end
461
+
462
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
463
+ # Deserialize Response
464
+ if status_code == 200
465
+ begin
466
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
467
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceListResult.mapper()
468
+ result.body = @client.deserialize(result_mapper, parsed_response)
469
+ rescue Exception => e
470
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
471
+ end
472
+ end
473
+
474
+ result
475
+ end
476
+
477
+ promise.execute
478
+ end
479
+
480
+ #
481
+ # Lists all API Management services within an Azure subscription.
482
+ #
483
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
484
+ # will be added to the HTTP request.
485
+ #
486
+ # @return [Array<ApiManagementServiceResource>] operation results.
487
+ #
488
+ def list(custom_headers:nil)
489
+ first_page = list_as_lazy(custom_headers:custom_headers)
490
+ first_page.get_all_items
491
+ end
492
+
493
+ #
494
+ # Lists all API Management services within an Azure subscription.
495
+ #
496
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
497
+ # will be added to the HTTP request.
498
+ #
499
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
500
+ #
501
+ def list_with_http_info(custom_headers:nil)
502
+ list_async(custom_headers:custom_headers).value!
503
+ end
504
+
505
+ #
506
+ # Lists all API Management services within an Azure subscription.
507
+ #
508
+ # @param [Hash{String => String}] A hash of custom headers that will be added
509
+ # to the HTTP request.
510
+ #
511
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
512
+ #
513
+ def list_async(custom_headers:nil)
514
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
515
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
516
+
517
+
518
+ request_headers = {}
519
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
520
+
521
+ # Set Headers
522
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
523
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
524
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service'
525
+
526
+ request_url = @base_url || @client.base_url
527
+
528
+ options = {
529
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
530
+ path_params: {'subscriptionId' => @client.subscription_id},
531
+ query_params: {'api-version' => @client.api_version},
532
+ headers: request_headers.merge(custom_headers || {}),
533
+ base_url: request_url
534
+ }
535
+ promise = @client.make_request_async(:get, path_template, options)
536
+
537
+ promise = promise.then do |result|
538
+ http_response = result.response
539
+ status_code = http_response.status
540
+ response_content = http_response.body
541
+ unless status_code == 200
542
+ error_model = JSON.load(response_content)
543
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
544
+ end
545
+
546
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
547
+ # Deserialize Response
548
+ if status_code == 200
549
+ begin
550
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
551
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceListResult.mapper()
552
+ result.body = @client.deserialize(result_mapper, parsed_response)
553
+ rescue Exception => e
554
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
555
+ end
556
+ end
557
+
558
+ result
559
+ end
560
+
561
+ promise.execute
562
+ end
563
+
564
+ #
565
+ # Gets the Single-Sign-On token for the API Management Service which is valid
566
+ # for 5 Minutes.
567
+ #
568
+ # @param resource_group_name [String] The name of the resource group.
569
+ # @param service_name [String] The name of the API Management service.
570
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
571
+ # will be added to the HTTP request.
572
+ #
573
+ # @return [ApiManagementServiceGetSsoTokenResult] operation results.
574
+ #
575
+ def get_sso_token(resource_group_name, service_name, custom_headers:nil)
576
+ response = get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value!
577
+ response.body unless response.nil?
578
+ end
579
+
580
+ #
581
+ # Gets the Single-Sign-On token for the API Management Service which is valid
582
+ # for 5 Minutes.
583
+ #
584
+ # @param resource_group_name [String] The name of the resource group.
585
+ # @param service_name [String] The name of the API Management service.
586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
587
+ # will be added to the HTTP request.
588
+ #
589
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
590
+ #
591
+ def get_sso_token_with_http_info(resource_group_name, service_name, custom_headers:nil)
592
+ get_sso_token_async(resource_group_name, service_name, custom_headers:custom_headers).value!
593
+ end
594
+
595
+ #
596
+ # Gets the Single-Sign-On token for the API Management Service which is valid
597
+ # for 5 Minutes.
598
+ #
599
+ # @param resource_group_name [String] The name of the resource group.
600
+ # @param service_name [String] The name of the API Management service.
601
+ # @param [Hash{String => String}] A hash of custom headers that will be added
602
+ # to the HTTP request.
603
+ #
604
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
605
+ #
606
+ def get_sso_token_async(resource_group_name, service_name, custom_headers:nil)
607
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
608
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
609
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
610
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
611
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
612
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
613
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
614
+
615
+
616
+ request_headers = {}
617
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
618
+
619
+ # Set Headers
620
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
621
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
622
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken'
623
+
624
+ request_url = @base_url || @client.base_url
625
+
626
+ options = {
627
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
628
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
629
+ query_params: {'api-version' => @client.api_version},
630
+ headers: request_headers.merge(custom_headers || {}),
631
+ base_url: request_url
632
+ }
633
+ promise = @client.make_request_async(:post, path_template, options)
634
+
635
+ promise = promise.then do |result|
636
+ http_response = result.response
637
+ status_code = http_response.status
638
+ response_content = http_response.body
639
+ unless status_code == 200
640
+ error_model = JSON.load(response_content)
641
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
642
+ end
643
+
644
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
645
+ # Deserialize Response
646
+ if status_code == 200
647
+ begin
648
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
649
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceGetSsoTokenResult.mapper()
650
+ result.body = @client.deserialize(result_mapper, parsed_response)
651
+ rescue Exception => e
652
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
653
+ end
654
+ end
655
+
656
+ result
657
+ end
658
+
659
+ promise.execute
660
+ end
661
+
662
+ #
663
+ # Checks availability and correctness of a name for an API Management service.
664
+ #
665
+ # @param parameters [ApiManagementServiceCheckNameAvailabilityParameters]
666
+ # Parameters supplied to the CheckNameAvailability operation.
667
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
668
+ # will be added to the HTTP request.
669
+ #
670
+ # @return [ApiManagementServiceNameAvailabilityResult] operation results.
671
+ #
672
+ def check_name_availability(parameters, custom_headers:nil)
673
+ response = check_name_availability_async(parameters, custom_headers:custom_headers).value!
674
+ response.body unless response.nil?
675
+ end
676
+
677
+ #
678
+ # Checks availability and correctness of a name for an API Management service.
679
+ #
680
+ # @param parameters [ApiManagementServiceCheckNameAvailabilityParameters]
681
+ # Parameters supplied to the CheckNameAvailability operation.
682
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
683
+ # will be added to the HTTP request.
684
+ #
685
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
686
+ #
687
+ def check_name_availability_with_http_info(parameters, custom_headers:nil)
688
+ check_name_availability_async(parameters, custom_headers:custom_headers).value!
689
+ end
690
+
691
+ #
692
+ # Checks availability and correctness of a name for an API Management service.
693
+ #
694
+ # @param parameters [ApiManagementServiceCheckNameAvailabilityParameters]
695
+ # Parameters supplied to the CheckNameAvailability operation.
696
+ # @param [Hash{String => String}] A hash of custom headers that will be added
697
+ # to the HTTP request.
698
+ #
699
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
700
+ #
701
+ def check_name_availability_async(parameters, custom_headers:nil)
702
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
703
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
704
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
705
+
706
+
707
+ request_headers = {}
708
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
709
+
710
+ # Set Headers
711
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
712
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
713
+
714
+ # Serialize Request
715
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceCheckNameAvailabilityParameters.mapper()
716
+ request_content = @client.serialize(request_mapper, parameters)
717
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
718
+
719
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability'
720
+
721
+ request_url = @base_url || @client.base_url
722
+
723
+ options = {
724
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
725
+ path_params: {'subscriptionId' => @client.subscription_id},
726
+ query_params: {'api-version' => @client.api_version},
727
+ body: request_content,
728
+ headers: request_headers.merge(custom_headers || {}),
729
+ base_url: request_url
730
+ }
731
+ promise = @client.make_request_async(:post, path_template, options)
732
+
733
+ promise = promise.then do |result|
734
+ http_response = result.response
735
+ status_code = http_response.status
736
+ response_content = http_response.body
737
+ unless status_code == 200
738
+ error_model = JSON.load(response_content)
739
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
740
+ end
741
+
742
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
743
+ # Deserialize Response
744
+ if status_code == 200
745
+ begin
746
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
747
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceNameAvailabilityResult.mapper()
748
+ result.body = @client.deserialize(result_mapper, parsed_response)
749
+ rescue Exception => e
750
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
751
+ end
752
+ end
753
+
754
+ result
755
+ end
756
+
757
+ promise.execute
758
+ end
759
+
760
+ #
761
+ # Updates the Microsoft.ApiManagement resource running in the Virtual network
762
+ # to pick the updated network settings.
763
+ #
764
+ # @param resource_group_name [String] The name of the resource group.
765
+ # @param service_name [String] The name of the API Management service.
766
+ # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters]
767
+ # Parameters supplied to the Apply Network Configuration operation. If the
768
+ # parameters are empty, all the regions in which the Api Management service is
769
+ # deployed will be updated sequentially without incurring downtime in the
770
+ # region.
771
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
772
+ # will be added to the HTTP request.
773
+ #
774
+ # @return [ApiManagementServiceResource] operation results.
775
+ #
776
+ def apply_network_configuration_updates(resource_group_name, service_name, parameters:nil, custom_headers:nil)
777
+ response = apply_network_configuration_updates_async(resource_group_name, service_name, parameters:parameters, custom_headers:custom_headers).value!
778
+ response.body unless response.nil?
779
+ end
780
+
781
+ #
782
+ # @param resource_group_name [String] The name of the resource group.
783
+ # @param service_name [String] The name of the API Management service.
784
+ # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters]
785
+ # Parameters supplied to the Apply Network Configuration operation. If the
786
+ # parameters are empty, all the regions in which the Api Management service is
787
+ # deployed will be updated sequentially without incurring downtime in the
788
+ # region.
789
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
790
+ # will be added to the HTTP request.
791
+ #
792
+ # @return [Concurrent::Promise] promise which provides async access to http
793
+ # response.
794
+ #
795
+ def apply_network_configuration_updates_async(resource_group_name, service_name, parameters:nil, custom_headers:nil)
796
+ # Send request
797
+ promise = begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters:parameters, custom_headers:custom_headers)
798
+
799
+ promise = promise.then do |response|
800
+ # Defining deserialization method.
801
+ deserialize_method = lambda do |parsed_response|
802
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
803
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
804
+ end
805
+
806
+ # Waiting for response.
807
+ @client.get_long_running_operation_result(response, deserialize_method)
808
+ end
809
+
810
+ promise
811
+ end
812
+
813
+ #
814
+ # Upload Custom Domain SSL certificate for an API Management service. This
815
+ # operation will be deprecated in future releases.
816
+ #
817
+ # @param resource_group_name [String] The name of the resource group.
818
+ # @param service_name [String] The name of the API Management service.
819
+ # @param parameters [ApiManagementServiceUploadCertificateParameters]
820
+ # Parameters supplied to the Upload SSL certificate for an API Management
821
+ # service operation.
822
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
823
+ # will be added to the HTTP request.
824
+ #
825
+ # @return [CertificateInformation] operation results.
826
+ #
827
+ def upload_certificate(resource_group_name, service_name, parameters, custom_headers:nil)
828
+ response = upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
829
+ response.body unless response.nil?
830
+ end
831
+
832
+ #
833
+ # Upload Custom Domain SSL certificate for an API Management service. This
834
+ # operation will be deprecated in future releases.
835
+ #
836
+ # @param resource_group_name [String] The name of the resource group.
837
+ # @param service_name [String] The name of the API Management service.
838
+ # @param parameters [ApiManagementServiceUploadCertificateParameters]
839
+ # Parameters supplied to the Upload SSL certificate for an API Management
840
+ # service operation.
841
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
842
+ # will be added to the HTTP request.
843
+ #
844
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
845
+ #
846
+ def upload_certificate_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
847
+ upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
848
+ end
849
+
850
+ #
851
+ # Upload Custom Domain SSL certificate for an API Management service. This
852
+ # operation will be deprecated in future releases.
853
+ #
854
+ # @param resource_group_name [String] The name of the resource group.
855
+ # @param service_name [String] The name of the API Management service.
856
+ # @param parameters [ApiManagementServiceUploadCertificateParameters]
857
+ # Parameters supplied to the Upload SSL certificate for an API Management
858
+ # service operation.
859
+ # @param [Hash{String => String}] A hash of custom headers that will be added
860
+ # to the HTTP request.
861
+ #
862
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
863
+ #
864
+ def upload_certificate_async(resource_group_name, service_name, parameters, custom_headers:nil)
865
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
866
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
867
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
868
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
869
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
870
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
871
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
872
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
873
+
874
+
875
+ request_headers = {}
876
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
877
+
878
+ # Set Headers
879
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
880
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
881
+
882
+ # Serialize Request
883
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceUploadCertificateParameters.mapper()
884
+ request_content = @client.serialize(request_mapper, parameters)
885
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
886
+
887
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/uploadcertificate'
888
+
889
+ request_url = @base_url || @client.base_url
890
+
891
+ options = {
892
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
893
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
894
+ query_params: {'api-version' => @client.api_version},
895
+ body: request_content,
896
+ headers: request_headers.merge(custom_headers || {}),
897
+ base_url: request_url
898
+ }
899
+ promise = @client.make_request_async(:post, path_template, options)
900
+
901
+ promise = promise.then do |result|
902
+ http_response = result.response
903
+ status_code = http_response.status
904
+ response_content = http_response.body
905
+ unless status_code == 200
906
+ error_model = JSON.load(response_content)
907
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
908
+ end
909
+
910
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
911
+ # Deserialize Response
912
+ if status_code == 200
913
+ begin
914
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
915
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::CertificateInformation.mapper()
916
+ result.body = @client.deserialize(result_mapper, parsed_response)
917
+ rescue Exception => e
918
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
919
+ end
920
+ end
921
+
922
+ result
923
+ end
924
+
925
+ promise.execute
926
+ end
927
+
928
+ #
929
+ # Creates, updates, or deletes the custom hostnames for an API Management
930
+ # service. The custom hostname can be applied to the Proxy and Portal endpoint.
931
+ # This is a long running operation and could take several minutes to complete.
932
+ # This operation will be deprecated in the next version update.
933
+ #
934
+ # @param resource_group_name [String] The name of the resource group.
935
+ # @param service_name [String] The name of the API Management service.
936
+ # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters
937
+ # supplied to the UpdateHostname operation.
938
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
939
+ # will be added to the HTTP request.
940
+ #
941
+ # @return [ApiManagementServiceResource] operation results.
942
+ #
943
+ def update_hostname(resource_group_name, service_name, parameters, custom_headers:nil)
944
+ response = update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
945
+ response.body unless response.nil?
946
+ end
947
+
948
+ #
949
+ # @param resource_group_name [String] The name of the resource group.
950
+ # @param service_name [String] The name of the API Management service.
951
+ # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters
952
+ # supplied to the UpdateHostname operation.
953
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
954
+ # will be added to the HTTP request.
955
+ #
956
+ # @return [Concurrent::Promise] promise which provides async access to http
957
+ # response.
958
+ #
959
+ def update_hostname_async(resource_group_name, service_name, parameters, custom_headers:nil)
960
+ # Send request
961
+ promise = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers)
962
+
963
+ promise = promise.then do |response|
964
+ # Defining deserialization method.
965
+ deserialize_method = lambda do |parsed_response|
966
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
967
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
968
+ end
969
+
970
+ # Waiting for response.
971
+ @client.get_long_running_operation_result(response, deserialize_method)
972
+ end
973
+
974
+ promise
975
+ end
976
+
977
+ #
978
+ # Restores a backup of an API Management service created using the
979
+ # ApiManagementService_Backup operation on the current service. This is a long
980
+ # running operation and could take several minutes to complete.
981
+ #
982
+ # @param resource_group_name [String] The name of the resource group.
983
+ # @param service_name [String] The name of the API Management service.
984
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
985
+ # supplied to the Restore API Management service from backup operation.
986
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
987
+ # will be added to the HTTP request.
988
+ #
989
+ # @return [ApiManagementServiceResource] operation results.
990
+ #
991
+ def begin_restore(resource_group_name, service_name, parameters, custom_headers:nil)
992
+ response = begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
993
+ response.body unless response.nil?
994
+ end
995
+
996
+ #
997
+ # Restores a backup of an API Management service created using the
998
+ # ApiManagementService_Backup operation on the current service. This is a long
999
+ # running operation and could take several minutes to complete.
1000
+ #
1001
+ # @param resource_group_name [String] The name of the resource group.
1002
+ # @param service_name [String] The name of the API Management service.
1003
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
1004
+ # supplied to the Restore API Management service from backup operation.
1005
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1006
+ # will be added to the HTTP request.
1007
+ #
1008
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1009
+ #
1010
+ def begin_restore_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
1011
+ begin_restore_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1012
+ end
1013
+
1014
+ #
1015
+ # Restores a backup of an API Management service created using the
1016
+ # ApiManagementService_Backup operation on the current service. This is a long
1017
+ # running operation and could take several minutes to complete.
1018
+ #
1019
+ # @param resource_group_name [String] The name of the resource group.
1020
+ # @param service_name [String] The name of the API Management service.
1021
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
1022
+ # supplied to the Restore API Management service from backup operation.
1023
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1024
+ # to the HTTP request.
1025
+ #
1026
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1027
+ #
1028
+ def begin_restore_async(resource_group_name, service_name, parameters, custom_headers:nil)
1029
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1030
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1031
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1032
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1033
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1034
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1035
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1036
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1037
+
1038
+
1039
+ request_headers = {}
1040
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1041
+
1042
+ # Set Headers
1043
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1044
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1045
+
1046
+ # Serialize Request
1047
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceBackupRestoreParameters.mapper()
1048
+ request_content = @client.serialize(request_mapper, parameters)
1049
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1050
+
1051
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore'
1052
+
1053
+ request_url = @base_url || @client.base_url
1054
+
1055
+ options = {
1056
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1057
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
1058
+ query_params: {'api-version' => @client.api_version},
1059
+ body: request_content,
1060
+ headers: request_headers.merge(custom_headers || {}),
1061
+ base_url: request_url
1062
+ }
1063
+ promise = @client.make_request_async(:post, path_template, options)
1064
+
1065
+ promise = promise.then do |result|
1066
+ http_response = result.response
1067
+ status_code = http_response.status
1068
+ response_content = http_response.body
1069
+ unless status_code == 200 || status_code == 202
1070
+ error_model = JSON.load(response_content)
1071
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1072
+ end
1073
+
1074
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1075
+ # Deserialize Response
1076
+ if status_code == 200
1077
+ begin
1078
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1079
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1080
+ result.body = @client.deserialize(result_mapper, parsed_response)
1081
+ rescue Exception => e
1082
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1083
+ end
1084
+ end
1085
+
1086
+ result
1087
+ end
1088
+
1089
+ promise.execute
1090
+ end
1091
+
1092
+ #
1093
+ # Creates a backup of the API Management service to the given Azure Storage
1094
+ # Account. This is long running operation and could take several minutes to
1095
+ # complete.
1096
+ #
1097
+ # @param resource_group_name [String] The name of the resource group.
1098
+ # @param service_name [String] The name of the API Management service.
1099
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
1100
+ # supplied to the ApiManagementService_Backup operation.
1101
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1102
+ # will be added to the HTTP request.
1103
+ #
1104
+ # @return [ApiManagementServiceResource] operation results.
1105
+ #
1106
+ def begin_backup(resource_group_name, service_name, parameters, custom_headers:nil)
1107
+ response = begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1108
+ response.body unless response.nil?
1109
+ end
1110
+
1111
+ #
1112
+ # Creates a backup of the API Management service to the given Azure Storage
1113
+ # Account. This is long running operation and could take several minutes to
1114
+ # complete.
1115
+ #
1116
+ # @param resource_group_name [String] The name of the resource group.
1117
+ # @param service_name [String] The name of the API Management service.
1118
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
1119
+ # supplied to the ApiManagementService_Backup operation.
1120
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1121
+ # will be added to the HTTP request.
1122
+ #
1123
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1124
+ #
1125
+ def begin_backup_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
1126
+ begin_backup_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1127
+ end
1128
+
1129
+ #
1130
+ # Creates a backup of the API Management service to the given Azure Storage
1131
+ # Account. This is long running operation and could take several minutes to
1132
+ # complete.
1133
+ #
1134
+ # @param resource_group_name [String] The name of the resource group.
1135
+ # @param service_name [String] The name of the API Management service.
1136
+ # @param parameters [ApiManagementServiceBackupRestoreParameters] Parameters
1137
+ # supplied to the ApiManagementService_Backup operation.
1138
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1139
+ # to the HTTP request.
1140
+ #
1141
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1142
+ #
1143
+ def begin_backup_async(resource_group_name, service_name, parameters, custom_headers:nil)
1144
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1145
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1146
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1147
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1148
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1149
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1150
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1151
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1152
+
1153
+
1154
+ request_headers = {}
1155
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1156
+
1157
+ # Set Headers
1158
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1159
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1160
+
1161
+ # Serialize Request
1162
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceBackupRestoreParameters.mapper()
1163
+ request_content = @client.serialize(request_mapper, parameters)
1164
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1165
+
1166
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup'
1167
+
1168
+ request_url = @base_url || @client.base_url
1169
+
1170
+ options = {
1171
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1172
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
1173
+ query_params: {'api-version' => @client.api_version},
1174
+ body: request_content,
1175
+ headers: request_headers.merge(custom_headers || {}),
1176
+ base_url: request_url
1177
+ }
1178
+ promise = @client.make_request_async(:post, path_template, options)
1179
+
1180
+ promise = promise.then do |result|
1181
+ http_response = result.response
1182
+ status_code = http_response.status
1183
+ response_content = http_response.body
1184
+ unless status_code == 200 || status_code == 202
1185
+ error_model = JSON.load(response_content)
1186
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1187
+ end
1188
+
1189
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1190
+ # Deserialize Response
1191
+ if status_code == 200
1192
+ begin
1193
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1194
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1195
+ result.body = @client.deserialize(result_mapper, parsed_response)
1196
+ rescue Exception => e
1197
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1198
+ end
1199
+ end
1200
+
1201
+ result
1202
+ end
1203
+
1204
+ promise.execute
1205
+ end
1206
+
1207
+ #
1208
+ # Creates or updates an API Management service. This is long running operation
1209
+ # and could take several minutes to complete.
1210
+ #
1211
+ # @param resource_group_name [String] The name of the resource group.
1212
+ # @param service_name [String] The name of the API Management service.
1213
+ # @param parameters [ApiManagementServiceResource] Parameters supplied to the
1214
+ # CreateOrUpdate API Management service operation.
1215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1216
+ # will be added to the HTTP request.
1217
+ #
1218
+ # @return [ApiManagementServiceResource] operation results.
1219
+ #
1220
+ def begin_create_or_update(resource_group_name, service_name, parameters, custom_headers:nil)
1221
+ response = begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1222
+ response.body unless response.nil?
1223
+ end
1224
+
1225
+ #
1226
+ # Creates or updates an API Management service. This is long running operation
1227
+ # and could take several minutes to complete.
1228
+ #
1229
+ # @param resource_group_name [String] The name of the resource group.
1230
+ # @param service_name [String] The name of the API Management service.
1231
+ # @param parameters [ApiManagementServiceResource] Parameters supplied to the
1232
+ # CreateOrUpdate API Management service operation.
1233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1234
+ # will be added to the HTTP request.
1235
+ #
1236
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1237
+ #
1238
+ def begin_create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
1239
+ begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1240
+ end
1241
+
1242
+ #
1243
+ # Creates or updates an API Management service. This is long running operation
1244
+ # and could take several minutes to complete.
1245
+ #
1246
+ # @param resource_group_name [String] The name of the resource group.
1247
+ # @param service_name [String] The name of the API Management service.
1248
+ # @param parameters [ApiManagementServiceResource] Parameters supplied to the
1249
+ # CreateOrUpdate API Management service operation.
1250
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1251
+ # to the HTTP request.
1252
+ #
1253
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1254
+ #
1255
+ def begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers:nil)
1256
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1257
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1258
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1259
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1260
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1261
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1262
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1263
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1264
+
1265
+
1266
+ request_headers = {}
1267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1268
+
1269
+ # Set Headers
1270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1272
+
1273
+ # Serialize Request
1274
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1275
+ request_content = @client.serialize(request_mapper, parameters)
1276
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1277
+
1278
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'
1279
+
1280
+ request_url = @base_url || @client.base_url
1281
+
1282
+ options = {
1283
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1284
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
1285
+ query_params: {'api-version' => @client.api_version},
1286
+ body: request_content,
1287
+ headers: request_headers.merge(custom_headers || {}),
1288
+ base_url: request_url
1289
+ }
1290
+ promise = @client.make_request_async(:put, path_template, options)
1291
+
1292
+ promise = promise.then do |result|
1293
+ http_response = result.response
1294
+ status_code = http_response.status
1295
+ response_content = http_response.body
1296
+ unless status_code == 200 || status_code == 201
1297
+ error_model = JSON.load(response_content)
1298
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1299
+ end
1300
+
1301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1302
+ # Deserialize Response
1303
+ if status_code == 200
1304
+ begin
1305
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1306
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1307
+ result.body = @client.deserialize(result_mapper, parsed_response)
1308
+ rescue Exception => e
1309
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1310
+ end
1311
+ end
1312
+ # Deserialize Response
1313
+ if status_code == 201
1314
+ begin
1315
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1316
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1317
+ result.body = @client.deserialize(result_mapper, parsed_response)
1318
+ rescue Exception => e
1319
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1320
+ end
1321
+ end
1322
+
1323
+ result
1324
+ end
1325
+
1326
+ promise.execute
1327
+ end
1328
+
1329
+ #
1330
+ # Updates an existing API Management service.
1331
+ #
1332
+ # @param resource_group_name [String] The name of the resource group.
1333
+ # @param service_name [String] The name of the API Management service.
1334
+ # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied
1335
+ # to the CreateOrUpdate API Management service operation.
1336
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1337
+ # will be added to the HTTP request.
1338
+ #
1339
+ # @return [ApiManagementServiceResource] operation results.
1340
+ #
1341
+ def begin_update(resource_group_name, service_name, parameters, custom_headers:nil)
1342
+ response = begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1343
+ response.body unless response.nil?
1344
+ end
1345
+
1346
+ #
1347
+ # Updates an existing API Management service.
1348
+ #
1349
+ # @param resource_group_name [String] The name of the resource group.
1350
+ # @param service_name [String] The name of the API Management service.
1351
+ # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied
1352
+ # to the CreateOrUpdate API Management service operation.
1353
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1354
+ # will be added to the HTTP request.
1355
+ #
1356
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1357
+ #
1358
+ def begin_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
1359
+ begin_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1360
+ end
1361
+
1362
+ #
1363
+ # Updates an existing API Management service.
1364
+ #
1365
+ # @param resource_group_name [String] The name of the resource group.
1366
+ # @param service_name [String] The name of the API Management service.
1367
+ # @param parameters [ApiManagementServiceUpdateParameters] Parameters supplied
1368
+ # to the CreateOrUpdate API Management service operation.
1369
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1370
+ # to the HTTP request.
1371
+ #
1372
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1373
+ #
1374
+ def begin_update_async(resource_group_name, service_name, parameters, custom_headers:nil)
1375
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1376
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1377
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1378
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1379
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1380
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1381
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1382
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1383
+
1384
+
1385
+ request_headers = {}
1386
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1387
+
1388
+ # Set Headers
1389
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1390
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1391
+
1392
+ # Serialize Request
1393
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceUpdateParameters.mapper()
1394
+ request_content = @client.serialize(request_mapper, parameters)
1395
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1396
+
1397
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}'
1398
+
1399
+ request_url = @base_url || @client.base_url
1400
+
1401
+ options = {
1402
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1403
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
1404
+ query_params: {'api-version' => @client.api_version},
1405
+ body: request_content,
1406
+ headers: request_headers.merge(custom_headers || {}),
1407
+ base_url: request_url
1408
+ }
1409
+ promise = @client.make_request_async(:patch, path_template, options)
1410
+
1411
+ promise = promise.then do |result|
1412
+ http_response = result.response
1413
+ status_code = http_response.status
1414
+ response_content = http_response.body
1415
+ unless status_code == 200 || status_code == 202
1416
+ error_model = JSON.load(response_content)
1417
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1418
+ end
1419
+
1420
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1421
+ # Deserialize Response
1422
+ if status_code == 200
1423
+ begin
1424
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1425
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1426
+ result.body = @client.deserialize(result_mapper, parsed_response)
1427
+ rescue Exception => e
1428
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1429
+ end
1430
+ end
1431
+
1432
+ result
1433
+ end
1434
+
1435
+ promise.execute
1436
+ end
1437
+
1438
+ #
1439
+ # Updates the Microsoft.ApiManagement resource running in the Virtual network
1440
+ # to pick the updated network settings.
1441
+ #
1442
+ # @param resource_group_name [String] The name of the resource group.
1443
+ # @param service_name [String] The name of the API Management service.
1444
+ # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters]
1445
+ # Parameters supplied to the Apply Network Configuration operation. If the
1446
+ # parameters are empty, all the regions in which the Api Management service is
1447
+ # deployed will be updated sequentially without incurring downtime in the
1448
+ # region.
1449
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1450
+ # will be added to the HTTP request.
1451
+ #
1452
+ # @return [ApiManagementServiceResource] operation results.
1453
+ #
1454
+ def begin_apply_network_configuration_updates(resource_group_name, service_name, parameters:nil, custom_headers:nil)
1455
+ response = begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters:parameters, custom_headers:custom_headers).value!
1456
+ response.body unless response.nil?
1457
+ end
1458
+
1459
+ #
1460
+ # Updates the Microsoft.ApiManagement resource running in the Virtual network
1461
+ # to pick the updated network settings.
1462
+ #
1463
+ # @param resource_group_name [String] The name of the resource group.
1464
+ # @param service_name [String] The name of the API Management service.
1465
+ # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters]
1466
+ # Parameters supplied to the Apply Network Configuration operation. If the
1467
+ # parameters are empty, all the regions in which the Api Management service is
1468
+ # deployed will be updated sequentially without incurring downtime in the
1469
+ # region.
1470
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1471
+ # will be added to the HTTP request.
1472
+ #
1473
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1474
+ #
1475
+ def begin_apply_network_configuration_updates_with_http_info(resource_group_name, service_name, parameters:nil, custom_headers:nil)
1476
+ begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters:parameters, custom_headers:custom_headers).value!
1477
+ end
1478
+
1479
+ #
1480
+ # Updates the Microsoft.ApiManagement resource running in the Virtual network
1481
+ # to pick the updated network settings.
1482
+ #
1483
+ # @param resource_group_name [String] The name of the resource group.
1484
+ # @param service_name [String] The name of the API Management service.
1485
+ # @param parameters [ApiManagementServiceApplyNetworkConfigurationParameters]
1486
+ # Parameters supplied to the Apply Network Configuration operation. If the
1487
+ # parameters are empty, all the regions in which the Api Management service is
1488
+ # deployed will be updated sequentially without incurring downtime in the
1489
+ # region.
1490
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1491
+ # to the HTTP request.
1492
+ #
1493
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1494
+ #
1495
+ def begin_apply_network_configuration_updates_async(resource_group_name, service_name, parameters:nil, custom_headers:nil)
1496
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1497
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1498
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1499
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1500
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1501
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1502
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1503
+
1504
+
1505
+ request_headers = {}
1506
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1507
+
1508
+ # Set Headers
1509
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1510
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1511
+
1512
+ # Serialize Request
1513
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceApplyNetworkConfigurationParameters.mapper()
1514
+ request_content = @client.serialize(request_mapper, parameters)
1515
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1516
+
1517
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates'
1518
+
1519
+ request_url = @base_url || @client.base_url
1520
+
1521
+ options = {
1522
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1523
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
1524
+ query_params: {'api-version' => @client.api_version},
1525
+ body: request_content,
1526
+ headers: request_headers.merge(custom_headers || {}),
1527
+ base_url: request_url
1528
+ }
1529
+ promise = @client.make_request_async(:post, path_template, options)
1530
+
1531
+ promise = promise.then do |result|
1532
+ http_response = result.response
1533
+ status_code = http_response.status
1534
+ response_content = http_response.body
1535
+ unless status_code == 202 || status_code == 200
1536
+ error_model = JSON.load(response_content)
1537
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1538
+ end
1539
+
1540
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1541
+ # Deserialize Response
1542
+ if status_code == 200
1543
+ begin
1544
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1545
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1546
+ result.body = @client.deserialize(result_mapper, parsed_response)
1547
+ rescue Exception => e
1548
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1549
+ end
1550
+ end
1551
+
1552
+ result
1553
+ end
1554
+
1555
+ promise.execute
1556
+ end
1557
+
1558
+ #
1559
+ # Creates, updates, or deletes the custom hostnames for an API Management
1560
+ # service. The custom hostname can be applied to the Proxy and Portal endpoint.
1561
+ # This is a long running operation and could take several minutes to complete.
1562
+ # This operation will be deprecated in the next version update.
1563
+ #
1564
+ # @param resource_group_name [String] The name of the resource group.
1565
+ # @param service_name [String] The name of the API Management service.
1566
+ # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters
1567
+ # supplied to the UpdateHostname operation.
1568
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1569
+ # will be added to the HTTP request.
1570
+ #
1571
+ # @return [ApiManagementServiceResource] operation results.
1572
+ #
1573
+ def begin_update_hostname(resource_group_name, service_name, parameters, custom_headers:nil)
1574
+ response = begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1575
+ response.body unless response.nil?
1576
+ end
1577
+
1578
+ #
1579
+ # Creates, updates, or deletes the custom hostnames for an API Management
1580
+ # service. The custom hostname can be applied to the Proxy and Portal endpoint.
1581
+ # This is a long running operation and could take several minutes to complete.
1582
+ # This operation will be deprecated in the next version update.
1583
+ #
1584
+ # @param resource_group_name [String] The name of the resource group.
1585
+ # @param service_name [String] The name of the API Management service.
1586
+ # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters
1587
+ # supplied to the UpdateHostname operation.
1588
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1589
+ # will be added to the HTTP request.
1590
+ #
1591
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1592
+ #
1593
+ def begin_update_hostname_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
1594
+ begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
1595
+ end
1596
+
1597
+ #
1598
+ # Creates, updates, or deletes the custom hostnames for an API Management
1599
+ # service. The custom hostname can be applied to the Proxy and Portal endpoint.
1600
+ # This is a long running operation and could take several minutes to complete.
1601
+ # This operation will be deprecated in the next version update.
1602
+ #
1603
+ # @param resource_group_name [String] The name of the resource group.
1604
+ # @param service_name [String] The name of the API Management service.
1605
+ # @param parameters [ApiManagementServiceUpdateHostnameParameters] Parameters
1606
+ # supplied to the UpdateHostname operation.
1607
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1608
+ # to the HTTP request.
1609
+ #
1610
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1611
+ #
1612
+ def begin_update_hostname_async(resource_group_name, service_name, parameters, custom_headers:nil)
1613
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1614
+ fail ArgumentError, 'service_name is nil' if service_name.nil?
1615
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50
1616
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1
1617
+ fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil?
1618
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1619
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1620
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1621
+
1622
+
1623
+ request_headers = {}
1624
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1625
+
1626
+ # Set Headers
1627
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1628
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1629
+
1630
+ # Serialize Request
1631
+ request_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceUpdateHostnameParameters.mapper()
1632
+ request_content = @client.serialize(request_mapper, parameters)
1633
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1634
+
1635
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatehostname'
1636
+
1637
+ request_url = @base_url || @client.base_url
1638
+
1639
+ options = {
1640
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1641
+ path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
1642
+ query_params: {'api-version' => @client.api_version},
1643
+ body: request_content,
1644
+ headers: request_headers.merge(custom_headers || {}),
1645
+ base_url: request_url
1646
+ }
1647
+ promise = @client.make_request_async(:post, path_template, options)
1648
+
1649
+ promise = promise.then do |result|
1650
+ http_response = result.response
1651
+ status_code = http_response.status
1652
+ response_content = http_response.body
1653
+ unless status_code == 200 || status_code == 202
1654
+ error_model = JSON.load(response_content)
1655
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1656
+ end
1657
+
1658
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1659
+ # Deserialize Response
1660
+ if status_code == 200
1661
+ begin
1662
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1663
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1664
+ result.body = @client.deserialize(result_mapper, parsed_response)
1665
+ rescue Exception => e
1666
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1667
+ end
1668
+ end
1669
+ # Deserialize Response
1670
+ if status_code == 202
1671
+ begin
1672
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1673
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceResource.mapper()
1674
+ result.body = @client.deserialize(result_mapper, parsed_response)
1675
+ rescue Exception => e
1676
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1677
+ end
1678
+ end
1679
+
1680
+ result
1681
+ end
1682
+
1683
+ promise.execute
1684
+ end
1685
+
1686
+ #
1687
+ # List all API Management services within a resource group.
1688
+ #
1689
+ # @param next_page_link [String] The NextLink from the previous successful call
1690
+ # to List operation.
1691
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1692
+ # will be added to the HTTP request.
1693
+ #
1694
+ # @return [ApiManagementServiceListResult] operation results.
1695
+ #
1696
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1697
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1698
+ response.body unless response.nil?
1699
+ end
1700
+
1701
+ #
1702
+ # List all API Management services within a resource group.
1703
+ #
1704
+ # @param next_page_link [String] The NextLink from the previous successful call
1705
+ # to List operation.
1706
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1707
+ # will be added to the HTTP request.
1708
+ #
1709
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1710
+ #
1711
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1712
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1713
+ end
1714
+
1715
+ #
1716
+ # List all API Management services within a resource group.
1717
+ #
1718
+ # @param next_page_link [String] The NextLink from the previous successful call
1719
+ # to List operation.
1720
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1721
+ # to the HTTP request.
1722
+ #
1723
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1724
+ #
1725
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1726
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1727
+
1728
+
1729
+ request_headers = {}
1730
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1731
+
1732
+ # Set Headers
1733
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1734
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1735
+ path_template = '{nextLink}'
1736
+
1737
+ request_url = @base_url || @client.base_url
1738
+
1739
+ options = {
1740
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1741
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1742
+ headers: request_headers.merge(custom_headers || {}),
1743
+ base_url: request_url
1744
+ }
1745
+ promise = @client.make_request_async(:get, path_template, options)
1746
+
1747
+ promise = promise.then do |result|
1748
+ http_response = result.response
1749
+ status_code = http_response.status
1750
+ response_content = http_response.body
1751
+ unless status_code == 200
1752
+ error_model = JSON.load(response_content)
1753
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1754
+ end
1755
+
1756
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1757
+ # Deserialize Response
1758
+ if status_code == 200
1759
+ begin
1760
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1761
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceListResult.mapper()
1762
+ result.body = @client.deserialize(result_mapper, parsed_response)
1763
+ rescue Exception => e
1764
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1765
+ end
1766
+ end
1767
+
1768
+ result
1769
+ end
1770
+
1771
+ promise.execute
1772
+ end
1773
+
1774
+ #
1775
+ # Lists all API Management services within an Azure subscription.
1776
+ #
1777
+ # @param next_page_link [String] The NextLink from the previous successful call
1778
+ # to List operation.
1779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1780
+ # will be added to the HTTP request.
1781
+ #
1782
+ # @return [ApiManagementServiceListResult] operation results.
1783
+ #
1784
+ def list_next(next_page_link, custom_headers:nil)
1785
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1786
+ response.body unless response.nil?
1787
+ end
1788
+
1789
+ #
1790
+ # Lists all API Management services within an Azure subscription.
1791
+ #
1792
+ # @param next_page_link [String] The NextLink from the previous successful call
1793
+ # to List operation.
1794
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1795
+ # will be added to the HTTP request.
1796
+ #
1797
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1798
+ #
1799
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1800
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1801
+ end
1802
+
1803
+ #
1804
+ # Lists all API Management services within an Azure subscription.
1805
+ #
1806
+ # @param next_page_link [String] The NextLink from the previous successful call
1807
+ # to List operation.
1808
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1809
+ # to the HTTP request.
1810
+ #
1811
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1812
+ #
1813
+ def list_next_async(next_page_link, custom_headers:nil)
1814
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1815
+
1816
+
1817
+ request_headers = {}
1818
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1819
+
1820
+ # Set Headers
1821
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1822
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1823
+ path_template = '{nextLink}'
1824
+
1825
+ request_url = @base_url || @client.base_url
1826
+
1827
+ options = {
1828
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1829
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1830
+ headers: request_headers.merge(custom_headers || {}),
1831
+ base_url: request_url
1832
+ }
1833
+ promise = @client.make_request_async(:get, path_template, options)
1834
+
1835
+ promise = promise.then do |result|
1836
+ http_response = result.response
1837
+ status_code = http_response.status
1838
+ response_content = http_response.body
1839
+ unless status_code == 200
1840
+ error_model = JSON.load(response_content)
1841
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1842
+ end
1843
+
1844
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1845
+ # Deserialize Response
1846
+ if status_code == 200
1847
+ begin
1848
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1849
+ result_mapper = Azure::ApiManagement::Mgmt::V2017_03_01::Models::ApiManagementServiceListResult.mapper()
1850
+ result.body = @client.deserialize(result_mapper, parsed_response)
1851
+ rescue Exception => e
1852
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1853
+ end
1854
+ end
1855
+
1856
+ result
1857
+ end
1858
+
1859
+ promise.execute
1860
+ end
1861
+
1862
+ #
1863
+ # List all API Management services within a resource group.
1864
+ #
1865
+ # @param resource_group_name [String] The name of the resource group.
1866
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1867
+ # will be added to the HTTP request.
1868
+ #
1869
+ # @return [ApiManagementServiceListResult] which provide lazy access to pages
1870
+ # of the response.
1871
+ #
1872
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1873
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1874
+ unless response.nil?
1875
+ page = response.body
1876
+ page.next_method = Proc.new do |next_page_link|
1877
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1878
+ end
1879
+ page
1880
+ end
1881
+ end
1882
+
1883
+ #
1884
+ # Lists all API Management services within an Azure subscription.
1885
+ #
1886
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1887
+ # will be added to the HTTP request.
1888
+ #
1889
+ # @return [ApiManagementServiceListResult] which provide lazy access to pages
1890
+ # of the response.
1891
+ #
1892
+ def list_as_lazy(custom_headers:nil)
1893
+ response = list_async(custom_headers:custom_headers).value!
1894
+ unless response.nil?
1895
+ page = response.body
1896
+ page.next_method = Proc.new do |next_page_link|
1897
+ list_next_async(next_page_link, custom_headers:custom_headers)
1898
+ end
1899
+ page
1900
+ end
1901
+ end
1902
+
1903
+ end
1904
+ end