azure_mgmt_web 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_web.rb +155 -145
  3. data/lib/generated/azure_mgmt_web/{certificate_orders.rb → app_service_certificate_orders.rb} +806 -530
  4. data/lib/generated/azure_mgmt_web/{hosting_environments.rb → app_service_environments.rb} +2528 -2077
  5. data/lib/generated/azure_mgmt_web/{server_farms.rb → app_service_plans.rb} +1964 -763
  6. data/lib/generated/azure_mgmt_web/certificates.rb +379 -105
  7. data/lib/generated/azure_mgmt_web/domains.rb +924 -249
  8. data/lib/generated/azure_mgmt_web/models/access_control_entry_action.rb +1 -1
  9. data/lib/generated/azure_mgmt_web/models/address.rb +1 -1
  10. data/lib/generated/azure_mgmt_web/models/address_response.rb +1 -1
  11. data/lib/generated/azure_mgmt_web/models/api_definition_info.rb +1 -1
  12. data/lib/generated/azure_mgmt_web/models/{certificate_order_certificate.rb → app_service_certificate.rb} +11 -9
  13. data/lib/generated/azure_mgmt_web/models/app_service_certificate_collection.rb +93 -0
  14. data/lib/generated/azure_mgmt_web/models/{certificate_order.rb → app_service_certificate_order.rb} +23 -12
  15. data/lib/generated/azure_mgmt_web/models/{classic_mobile_service_collection.rb → app_service_certificate_order_collection.rb} +11 -11
  16. data/lib/generated/azure_mgmt_web/models/{hosting_environment.rb → app_service_environment.rb} +50 -28
  17. data/lib/generated/azure_mgmt_web/models/{hosting_environment_collection.rb → app_service_environment_collection.rb} +10 -10
  18. data/lib/generated/azure_mgmt_web/models/{server_farm_with_rich_sku.rb → app_service_plan.rb} +13 -27
  19. data/lib/generated/azure_mgmt_web/models/{server_farm_collection.rb → app_service_plan_collection.rb} +10 -10
  20. data/lib/generated/azure_mgmt_web/models/application_logs_config.rb +1 -1
  21. data/lib/generated/azure_mgmt_web/models/arm_plan.rb +1 -1
  22. data/lib/generated/azure_mgmt_web/models/auto_heal_action_type.rb +1 -1
  23. data/lib/generated/azure_mgmt_web/models/auto_heal_actions.rb +1 -1
  24. data/lib/generated/azure_mgmt_web/models/auto_heal_custom_action.rb +1 -1
  25. data/lib/generated/azure_mgmt_web/models/auto_heal_rules.rb +1 -1
  26. data/lib/generated/azure_mgmt_web/models/auto_heal_triggers.rb +3 -3
  27. data/lib/generated/azure_mgmt_web/models/azure_blob_storage_application_logs_config.rb +1 -1
  28. data/lib/generated/azure_mgmt_web/models/azure_blob_storage_http_logs_config.rb +1 -1
  29. data/lib/generated/azure_mgmt_web/models/azure_resource_type.rb +1 -1
  30. data/lib/generated/azure_mgmt_web/models/azure_table_storage_application_logs_config.rb +1 -1
  31. data/lib/generated/azure_mgmt_web/models/backup_item.rb +5 -5
  32. data/lib/generated/azure_mgmt_web/models/backup_item_collection.rb +1 -1
  33. data/lib/generated/azure_mgmt_web/models/backup_item_status.rb +1 -1
  34. data/lib/generated/azure_mgmt_web/models/backup_request.rb +4 -4
  35. data/lib/generated/azure_mgmt_web/models/backup_restore_operation_type.rb +1 -1
  36. data/lib/generated/azure_mgmt_web/models/backup_schedule.rb +3 -3
  37. data/lib/generated/azure_mgmt_web/models/built_in_authentication_provider.rb +1 -1
  38. data/lib/generated/azure_mgmt_web/models/{conn_string_info.rb → capability.rb} +17 -19
  39. data/lib/generated/azure_mgmt_web/models/certificate.rb +3 -2
  40. data/lib/generated/azure_mgmt_web/models/certificate_collection.rb +1 -1
  41. data/lib/generated/azure_mgmt_web/models/certificate_details.rb +3 -2
  42. data/lib/generated/azure_mgmt_web/models/certificate_email.rb +3 -2
  43. data/lib/generated/azure_mgmt_web/models/certificate_order_action.rb +3 -2
  44. data/lib/generated/azure_mgmt_web/models/certificate_order_action_type.rb +1 -1
  45. data/lib/generated/azure_mgmt_web/models/certificate_order_status.rb +1 -1
  46. data/lib/generated/azure_mgmt_web/models/certificate_product_type.rb +1 -1
  47. data/lib/generated/azure_mgmt_web/models/channels.rb +1 -1
  48. data/lib/generated/azure_mgmt_web/models/check_name_resource_types.rb +17 -0
  49. data/lib/generated/azure_mgmt_web/models/classic_mobile_service.rb +3 -2
  50. data/lib/generated/azure_mgmt_web/models/clone_ability_result.rb +1 -1
  51. data/lib/generated/azure_mgmt_web/models/cloning_info.rb +6 -6
  52. data/lib/generated/azure_mgmt_web/models/compute_mode_options.rb +1 -1
  53. data/lib/generated/azure_mgmt_web/models/conn_string_value_type_pair.rb +5 -4
  54. data/lib/generated/azure_mgmt_web/models/connection_string_dictionary.rb +3 -2
  55. data/lib/generated/azure_mgmt_web/models/connection_string_type.rb +24 -0
  56. data/lib/generated/azure_mgmt_web/models/contact.rb +1 -1
  57. data/lib/generated/azure_mgmt_web/models/cors_settings.rb +4 -5
  58. data/lib/generated/azure_mgmt_web/models/csm_move_resource_envelope.rb +1 -1
  59. data/lib/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +1 -1
  60. data/lib/generated/azure_mgmt_web/models/csm_site_recovery_entity.rb +4 -4
  61. data/lib/generated/azure_mgmt_web/models/csm_slot_entity.rb +1 -1
  62. data/lib/generated/azure_mgmt_web/models/csm_usage_quota.rb +1 -1
  63. data/lib/generated/azure_mgmt_web/models/csm_usage_quota_collection.rb +1 -1
  64. data/lib/generated/azure_mgmt_web/models/csr.rb +3 -2
  65. data/lib/generated/azure_mgmt_web/models/custom_host_name_dns_record_type.rb +1 -1
  66. data/lib/generated/azure_mgmt_web/models/custom_hostname_analysis_result.rb +238 -0
  67. data/lib/generated/azure_mgmt_web/models/database_backup_setting.rb +3 -5
  68. data/lib/generated/azure_mgmt_web/models/deleted_site.rb +48 -41
  69. data/lib/generated/azure_mgmt_web/models/{deleted_site_collection.rb → deleted_web_app_collection.rb} +6 -6
  70. data/lib/generated/azure_mgmt_web/models/deployment.rb +3 -2
  71. data/lib/generated/azure_mgmt_web/models/deployment_collection.rb +1 -1
  72. data/lib/generated/azure_mgmt_web/models/dns_verification_test_result.rb +17 -0
  73. data/lib/generated/azure_mgmt_web/models/domain.rb +7 -7
  74. data/lib/generated/azure_mgmt_web/models/domain_availablility_check_result.rb +1 -1
  75. data/lib/generated/azure_mgmt_web/models/domain_collection.rb +1 -1
  76. data/lib/generated/azure_mgmt_web/models/domain_control_center_sso_request.rb +1 -1
  77. data/lib/generated/azure_mgmt_web/models/domain_purchase_consent.rb +1 -1
  78. data/lib/generated/azure_mgmt_web/models/domain_recommendation_search_parameters.rb +1 -1
  79. data/lib/generated/azure_mgmt_web/models/domain_registration_input.rb +7 -7
  80. data/lib/generated/azure_mgmt_web/models/domain_status.rb +1 -1
  81. data/lib/generated/azure_mgmt_web/models/domain_type.rb +1 -1
  82. data/lib/generated/azure_mgmt_web/models/enabled_config.rb +1 -1
  83. data/lib/generated/azure_mgmt_web/models/error_entity.rb +109 -0
  84. data/lib/generated/azure_mgmt_web/models/experiments.rb +1 -1
  85. data/lib/generated/azure_mgmt_web/models/file_system_application_logs_config.rb +1 -1
  86. data/lib/generated/azure_mgmt_web/models/file_system_http_logs_config.rb +2 -3
  87. data/lib/generated/azure_mgmt_web/models/frequency_unit.rb +1 -1
  88. data/lib/generated/azure_mgmt_web/models/geo_region.rb +3 -2
  89. data/lib/generated/azure_mgmt_web/models/geo_region_collection.rb +1 -1
  90. data/lib/generated/azure_mgmt_web/models/handler_mapping.rb +5 -5
  91. data/lib/generated/azure_mgmt_web/models/host_name.rb +6 -6
  92. data/lib/generated/azure_mgmt_web/models/host_name_binding.rb +3 -2
  93. data/lib/generated/azure_mgmt_web/models/host_name_binding_collection.rb +1 -1
  94. data/lib/generated/azure_mgmt_web/models/host_name_ssl_state.rb +1 -1
  95. data/lib/generated/azure_mgmt_web/models/host_name_type.rb +1 -1
  96. data/lib/generated/azure_mgmt_web/models/hosting_environment_diagnostics.rb +1 -1
  97. data/lib/generated/azure_mgmt_web/models/hosting_environment_profile.rb +1 -1
  98. data/lib/generated/azure_mgmt_web/models/hosting_environment_status.rb +1 -1
  99. data/lib/generated/azure_mgmt_web/models/http_logs_config.rb +1 -1
  100. data/lib/generated/azure_mgmt_web/models/hybrid_connection.rb +158 -0
  101. data/lib/generated/azure_mgmt_web/models/hybrid_connection_key.rb +105 -0
  102. data/lib/generated/azure_mgmt_web/models/internal_load_balancing_mode.rb +1 -1
  103. data/lib/generated/azure_mgmt_web/models/ip_security_restriction.rb +2 -2
  104. data/lib/generated/azure_mgmt_web/models/key_vault_secret_status.rb +2 -1
  105. data/lib/generated/azure_mgmt_web/models/localizable_string.rb +1 -1
  106. data/lib/generated/azure_mgmt_web/models/log_level.rb +1 -1
  107. data/lib/generated/azure_mgmt_web/models/managed_pipeline_mode.rb +1 -1
  108. data/lib/generated/azure_mgmt_web/models/metric_availabilily.rb +1 -1
  109. data/lib/generated/azure_mgmt_web/models/metric_definition.rb +3 -2
  110. data/lib/generated/azure_mgmt_web/models/metric_definition_collection.rb +1 -1
  111. data/lib/generated/azure_mgmt_web/models/migrate_my_sql_request.rb +95 -0
  112. data/lib/generated/azure_mgmt_web/models/name_identifier.rb +1 -1
  113. data/lib/generated/azure_mgmt_web/models/name_identifier_collection.rb +1 -1
  114. data/lib/generated/azure_mgmt_web/models/name_value_pair.rb +1 -1
  115. data/lib/generated/azure_mgmt_web/models/network_access_control_entry.rb +2 -2
  116. data/lib/generated/azure_mgmt_web/models/network_features.rb +22 -2
  117. data/lib/generated/azure_mgmt_web/models/notification_level.rb +1 -1
  118. data/lib/generated/azure_mgmt_web/models/operation.rb +125 -0
  119. data/lib/generated/azure_mgmt_web/models/operation_status.rb +19 -0
  120. data/lib/generated/azure_mgmt_web/models/{certificate_order_collection.rb → perf_mon_counter_collection.rb} +11 -11
  121. data/lib/generated/azure_mgmt_web/models/perf_mon_response.rb +65 -0
  122. data/lib/generated/azure_mgmt_web/models/perf_mon_sample.rb +64 -0
  123. data/lib/generated/azure_mgmt_web/models/perf_mon_set.rb +93 -0
  124. data/lib/generated/azure_mgmt_web/models/premier_add_on_request.rb +2 -2
  125. data/lib/generated/azure_mgmt_web/models/provisioning_state.rb +1 -1
  126. data/lib/generated/azure_mgmt_web/models/push_settings.rb +80 -0
  127. data/lib/generated/azure_mgmt_web/models/ramp_up_rule.rb +8 -9
  128. data/lib/generated/azure_mgmt_web/models/recommendation.rb +3 -3
  129. data/lib/generated/azure_mgmt_web/models/recommendation_rule.rb +1 -1
  130. data/lib/generated/azure_mgmt_web/models/recover_response.rb +95 -0
  131. data/lib/generated/azure_mgmt_web/models/reissue_certificate_order_request.rb +24 -2
  132. data/lib/generated/azure_mgmt_web/models/relay_service_connection_entity.rb +3 -2
  133. data/lib/generated/azure_mgmt_web/models/renew_certificate_order_request.rb +24 -2
  134. data/lib/generated/azure_mgmt_web/models/requests_based_trigger.rb +1 -1
  135. data/lib/generated/azure_mgmt_web/models/resource_metric.rb +23 -4
  136. data/lib/generated/azure_mgmt_web/models/resource_metric_collection.rb +1 -1
  137. data/lib/generated/azure_mgmt_web/models/resource_metric_name.rb +3 -1
  138. data/lib/generated/azure_mgmt_web/models/{key_value_pair_string_string.rb → resource_metric_property.rb} +8 -10
  139. data/lib/generated/azure_mgmt_web/models/resource_metric_value.rb +29 -4
  140. data/lib/generated/azure_mgmt_web/models/resource_name_availability.rb +3 -3
  141. data/lib/generated/azure_mgmt_web/models/resource_name_availability_request.rb +3 -2
  142. data/lib/generated/azure_mgmt_web/models/restore_request.rb +5 -4
  143. data/lib/generated/azure_mgmt_web/models/restore_response.rb +5 -4
  144. data/lib/generated/azure_mgmt_web/models/site.rb +48 -41
  145. data/lib/generated/azure_mgmt_web/models/site_auth_settings.rb +43 -54
  146. data/lib/generated/azure_mgmt_web/models/site_availability_state.rb +1 -1
  147. data/lib/generated/azure_mgmt_web/models/site_cloneability.rb +4 -5
  148. data/lib/generated/azure_mgmt_web/models/site_cloneability_criterion.rb +1 -1
  149. data/lib/generated/azure_mgmt_web/models/site_config.rb +32 -63
  150. data/lib/generated/azure_mgmt_web/models/site_instance.rb +3 -2
  151. data/lib/generated/azure_mgmt_web/models/site_instance_collection.rb +1 -1
  152. data/lib/generated/azure_mgmt_web/models/site_limits.rb +1 -1
  153. data/lib/generated/azure_mgmt_web/models/site_load_balancing.rb +1 -1
  154. data/lib/generated/azure_mgmt_web/models/site_logs_config.rb +3 -2
  155. data/lib/generated/azure_mgmt_web/models/site_machine_key.rb +74 -0
  156. data/lib/generated/azure_mgmt_web/models/site_source_control.rb +3 -2
  157. data/lib/generated/azure_mgmt_web/models/sku_capacity.rb +1 -1
  158. data/lib/generated/azure_mgmt_web/models/sku_description.rb +48 -1
  159. data/lib/generated/azure_mgmt_web/models/sku_info.rb +1 -1
  160. data/lib/generated/azure_mgmt_web/models/sku_info_collection.rb +1 -1
  161. data/lib/generated/azure_mgmt_web/models/slot_config_names_resource.rb +3 -2
  162. data/lib/generated/azure_mgmt_web/models/slot_difference.rb +5 -4
  163. data/lib/generated/azure_mgmt_web/models/slot_difference_collection.rb +1 -1
  164. data/lib/generated/azure_mgmt_web/models/slow_requests_based_trigger.rb +1 -1
  165. data/lib/generated/azure_mgmt_web/models/snapshot.rb +94 -0
  166. data/lib/generated/azure_mgmt_web/models/snapshot_collection.rb +94 -0
  167. data/lib/generated/azure_mgmt_web/models/source_control.rb +3 -2
  168. data/lib/generated/azure_mgmt_web/models/source_control_collection.rb +1 -1
  169. data/lib/generated/azure_mgmt_web/models/ssl_state.rb +1 -1
  170. data/lib/generated/azure_mgmt_web/models/stamp_capacity.rb +1 -1
  171. data/lib/generated/azure_mgmt_web/models/stamp_capacity_collection.rb +1 -1
  172. data/lib/generated/azure_mgmt_web/models/status_codes_based_trigger.rb +1 -1
  173. data/lib/generated/azure_mgmt_web/models/status_options.rb +1 -1
  174. data/lib/generated/azure_mgmt_web/models/storage_migration_options.rb +125 -0
  175. data/lib/generated/azure_mgmt_web/models/storage_migration_response.rb +95 -0
  176. data/lib/generated/azure_mgmt_web/models/string_dictionary.rb +3 -2
  177. data/lib/generated/azure_mgmt_web/models/tld_legal_agreement.rb +1 -1
  178. data/lib/generated/azure_mgmt_web/models/tld_legal_agreement_collection.rb +1 -1
  179. data/lib/generated/azure_mgmt_web/models/top_level_domain.rb +3 -2
  180. data/lib/generated/azure_mgmt_web/models/top_level_domain_agreement_option.rb +1 -1
  181. data/lib/generated/azure_mgmt_web/models/top_level_domain_collection.rb +1 -1
  182. data/lib/generated/azure_mgmt_web/models/unauthenticated_client_action.rb +1 -1
  183. data/lib/generated/azure_mgmt_web/models/usage.rb +3 -2
  184. data/lib/generated/azure_mgmt_web/models/usage_collection.rb +1 -1
  185. data/lib/generated/azure_mgmt_web/models/usage_state.rb +1 -1
  186. data/lib/generated/azure_mgmt_web/models/user.rb +17 -7
  187. data/lib/generated/azure_mgmt_web/models/validate_properties.rb +76 -0
  188. data/lib/generated/azure_mgmt_web/models/validate_request.rb +76 -0
  189. data/lib/generated/azure_mgmt_web/models/validate_resource_types.rb +16 -0
  190. data/lib/generated/azure_mgmt_web/models/validate_response.rb +56 -0
  191. data/lib/generated/azure_mgmt_web/models/validate_response_error.rb +54 -0
  192. data/lib/generated/azure_mgmt_web/models/virtual_application.rb +7 -6
  193. data/lib/generated/azure_mgmt_web/models/virtual_directory.rb +4 -4
  194. data/lib/generated/azure_mgmt_web/models/virtual_ipmapping.rb +1 -1
  195. data/lib/generated/azure_mgmt_web/models/virtual_network_profile.rb +3 -1
  196. data/lib/generated/azure_mgmt_web/models/vnet_gateway.rb +5 -4
  197. data/lib/generated/azure_mgmt_web/models/vnet_info.rb +5 -4
  198. data/lib/generated/azure_mgmt_web/models/vnet_route.rb +9 -9
  199. data/lib/generated/azure_mgmt_web/models/{site_collection.rb → web_app_collection.rb} +6 -6
  200. data/lib/generated/azure_mgmt_web/models/worker_pool.rb +5 -4
  201. data/lib/generated/azure_mgmt_web/models/worker_pool_collection.rb +1 -1
  202. data/lib/generated/azure_mgmt_web/models/worker_size_options.rb +1 -1
  203. data/lib/generated/azure_mgmt_web/module_definition.rb +1 -1
  204. data/lib/generated/azure_mgmt_web/recommendations.rb +128 -96
  205. data/lib/generated/azure_mgmt_web/top_level_domains.rb +118 -91
  206. data/lib/generated/azure_mgmt_web/version.rb +2 -2
  207. data/lib/generated/azure_mgmt_web/{sites.rb → web_apps.rb} +11407 -6127
  208. data/lib/generated/azure_mgmt_web/web_site_management_client.rb +1486 -51
  209. metadata +46 -36
  210. data/lib/generated/azure_mgmt_web/classic_mobile_services.rb +0 -400
  211. data/lib/generated/azure_mgmt_web/global.rb +0 -1888
  212. data/lib/generated/azure_mgmt_web/global_certificate_order.rb +0 -309
  213. data/lib/generated/azure_mgmt_web/global_domain_registration.rb +0 -699
  214. data/lib/generated/azure_mgmt_web/global_resource_groups.rb +0 -116
  215. data/lib/generated/azure_mgmt_web/managed_hosting_environments.rb +0 -1394
  216. data/lib/generated/azure_mgmt_web/models/certificate_order_certificate_collection.rb +0 -93
  217. data/lib/generated/azure_mgmt_web/models/database_server_type.rb +0 -18
  218. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment.rb +0 -218
  219. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment_collection.rb +0 -93
  220. data/lib/generated/azure_mgmt_web/models/managed_hosting_environment_status.rb +0 -17
  221. data/lib/generated/azure_mgmt_web/models/routing_rule.rb +0 -46
  222. data/lib/generated/azure_mgmt_web/models/site_properties.rb +0 -88
  223. data/lib/generated/azure_mgmt_web/models/slot_config_names.rb +0 -71
  224. data/lib/generated/azure_mgmt_web/provider.rb +0 -581
  225. data/lib/generated/azure_mgmt_web/usage_operations.rb +0 -122
@@ -1,1888 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::ARM::Web
7
- #
8
- # Use these APIs to manage Azure Websites resources through the Azure
9
- # Resource Manager. All task operations conform to the HTTP/1.1 protocol
10
- # specification and each operation returns an x-ms-request-id header that
11
- # can be used to obtain information about the request. You must make sure
12
- # that requests made to these resources are secure. For more information,
13
- # see <a
14
- # href="https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx">Authenticating
15
- # Azure Resource Manager requests.</a>
16
- #
17
- class Global
18
- include Azure::ARM::Web::Models
19
- include MsRestAzure
20
-
21
- #
22
- # Creates and initializes a new instance of the Global class.
23
- # @param client service class for accessing basic functionality.
24
- #
25
- def initialize(client)
26
- @client = client
27
- end
28
-
29
- # @return [WebSiteManagementClient] reference to the WebSiteManagementClient
30
- attr_reader :client
31
-
32
- #
33
- # Gets publishing credentials for the subscription owner
34
- #
35
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
- # will be added to the HTTP request.
37
- #
38
- # @return [User] operation results.
39
- #
40
- def get_subscription_publishing_credentials(custom_headers = nil)
41
- response = get_subscription_publishing_credentials_async(custom_headers).value!
42
- response.body unless response.nil?
43
- end
44
-
45
- #
46
- # Gets publishing credentials for the subscription owner
47
- #
48
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
- # will be added to the HTTP request.
50
- #
51
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
- #
53
- def get_subscription_publishing_credentials_with_http_info(custom_headers = nil)
54
- get_subscription_publishing_credentials_async(custom_headers).value!
55
- end
56
-
57
- #
58
- # Gets publishing credentials for the subscription owner
59
- #
60
- # @param [Hash{String => String}] A hash of custom headers that will be added
61
- # to the HTTP request.
62
- #
63
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
64
- #
65
- def get_subscription_publishing_credentials_async(custom_headers = nil)
66
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
67
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
-
69
-
70
- request_headers = {}
71
-
72
- # Set Headers
73
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials'
76
-
77
- request_url = @base_url || @client.base_url
78
-
79
- options = {
80
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
81
- path_params: {'subscriptionId' => @client.subscription_id},
82
- query_params: {'api-version' => @client.api_version},
83
- headers: request_headers.merge(custom_headers || {}),
84
- base_url: request_url
85
- }
86
- promise = @client.make_request_async(:get, path_template, options)
87
-
88
- promise = promise.then do |result|
89
- http_response = result.response
90
- status_code = http_response.status
91
- response_content = http_response.body
92
- unless status_code == 200
93
- error_model = JSON.load(response_content)
94
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
95
- end
96
-
97
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
98
- # Deserialize Response
99
- if status_code == 200
100
- begin
101
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
102
- result_mapper = User.mapper()
103
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
104
- rescue Exception => e
105
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
106
- end
107
- end
108
-
109
- result
110
- end
111
-
112
- promise.execute
113
- end
114
-
115
- #
116
- # Updates publishing credentials for the subscription owner
117
- #
118
- # @param request_message [User] requestMessage with new publishing credentials
119
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
120
- # will be added to the HTTP request.
121
- #
122
- # @return [User] operation results.
123
- #
124
- def update_subscription_publishing_credentials(request_message, custom_headers = nil)
125
- response = update_subscription_publishing_credentials_async(request_message, custom_headers).value!
126
- response.body unless response.nil?
127
- end
128
-
129
- #
130
- # Updates publishing credentials for the subscription owner
131
- #
132
- # @param request_message [User] requestMessage with new publishing credentials
133
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
- # will be added to the HTTP request.
135
- #
136
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
137
- #
138
- def update_subscription_publishing_credentials_with_http_info(request_message, custom_headers = nil)
139
- update_subscription_publishing_credentials_async(request_message, custom_headers).value!
140
- end
141
-
142
- #
143
- # Updates publishing credentials for the subscription owner
144
- #
145
- # @param request_message [User] requestMessage with new publishing credentials
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 update_subscription_publishing_credentials_async(request_message, custom_headers = nil)
152
- fail ArgumentError, 'request_message is nil' if request_message.nil?
153
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
154
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
155
-
156
-
157
- request_headers = {}
158
-
159
- # Set Headers
160
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
161
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
162
-
163
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
164
-
165
- # Serialize Request
166
- request_mapper = User.mapper()
167
- request_content = @client.serialize(request_mapper, request_message, 'request_message')
168
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
169
-
170
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials'
171
-
172
- request_url = @base_url || @client.base_url
173
-
174
- options = {
175
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
176
- path_params: {'subscriptionId' => @client.subscription_id},
177
- query_params: {'api-version' => @client.api_version},
178
- body: request_content,
179
- headers: request_headers.merge(custom_headers || {}),
180
- base_url: request_url
181
- }
182
- promise = @client.make_request_async(:put, path_template, options)
183
-
184
- promise = promise.then do |result|
185
- http_response = result.response
186
- status_code = http_response.status
187
- response_content = http_response.body
188
- unless status_code == 200
189
- error_model = JSON.load(response_content)
190
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
191
- end
192
-
193
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
194
- # Deserialize Response
195
- if status_code == 200
196
- begin
197
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
198
- result_mapper = User.mapper()
199
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
200
- rescue Exception => e
201
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
202
- end
203
- end
204
-
205
- result
206
- end
207
-
208
- promise.execute
209
- end
210
-
211
- #
212
- # Gets list of available geo regions
213
- #
214
- # @param sku [String] Filter only to regions that support this sku
215
- # @param linux_workers_enabled [Boolean] Filter only to regions that support
216
- # linux workers
217
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
218
- # will be added to the HTTP request.
219
- #
220
- # @return [GeoRegionCollection] which provide lazy access to pages of the
221
- # response.
222
- #
223
- def get_subscription_geo_regions_as_lazy(sku = nil, linux_workers_enabled = nil, custom_headers = nil)
224
- response = get_subscription_geo_regions_async(sku, linux_workers_enabled, custom_headers).value!
225
- unless response.nil?
226
- page = response.body
227
- page.next_method = Proc.new do |next_page_link|
228
- get_subscription_geo_regions_next_async(next_page_link, custom_headers)
229
- end
230
- page
231
- end
232
- end
233
-
234
- #
235
- # Gets list of available geo regions
236
- #
237
- # @param sku [String] Filter only to regions that support this sku
238
- # @param linux_workers_enabled [Boolean] Filter only to regions that support
239
- # linux workers
240
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
- # will be added to the HTTP request.
242
- #
243
- # @return [Array<GeoRegion>] operation results.
244
- #
245
- def get_subscription_geo_regions(sku = nil, linux_workers_enabled = nil, custom_headers = nil)
246
- first_page = get_subscription_geo_regions_as_lazy(sku, linux_workers_enabled, custom_headers)
247
- first_page.get_all_items
248
- end
249
-
250
- #
251
- # Gets list of available geo regions
252
- #
253
- # @param sku [String] Filter only to regions that support this sku
254
- # @param linux_workers_enabled [Boolean] Filter only to regions that support
255
- # linux workers
256
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
- # will be added to the HTTP request.
258
- #
259
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
260
- #
261
- def get_subscription_geo_regions_with_http_info(sku = nil, linux_workers_enabled = nil, custom_headers = nil)
262
- get_subscription_geo_regions_async(sku, linux_workers_enabled, custom_headers).value!
263
- end
264
-
265
- #
266
- # Gets list of available geo regions
267
- #
268
- # @param sku [String] Filter only to regions that support this sku
269
- # @param linux_workers_enabled [Boolean] Filter only to regions that support
270
- # linux workers
271
- # @param [Hash{String => String}] A hash of custom headers that will be added
272
- # to the HTTP request.
273
- #
274
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
275
- #
276
- def get_subscription_geo_regions_async(sku = nil, linux_workers_enabled = nil, custom_headers = nil)
277
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
278
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
279
-
280
-
281
- request_headers = {}
282
-
283
- # Set Headers
284
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
285
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
286
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'
287
-
288
- request_url = @base_url || @client.base_url
289
-
290
- options = {
291
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
292
- path_params: {'subscriptionId' => @client.subscription_id},
293
- query_params: {'sku' => sku,'linuxWorkersEnabled' => linux_workers_enabled,'api-version' => @client.api_version},
294
- headers: request_headers.merge(custom_headers || {}),
295
- base_url: request_url
296
- }
297
- promise = @client.make_request_async(:get, path_template, options)
298
-
299
- promise = promise.then do |result|
300
- http_response = result.response
301
- status_code = http_response.status
302
- response_content = http_response.body
303
- unless status_code == 200
304
- error_model = JSON.load(response_content)
305
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
306
- end
307
-
308
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
309
- # Deserialize Response
310
- if status_code == 200
311
- begin
312
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
313
- result_mapper = GeoRegionCollection.mapper()
314
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
315
- rescue Exception => e
316
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
317
- end
318
- end
319
-
320
- result
321
- end
322
-
323
- promise.execute
324
- end
325
-
326
- #
327
- # Get all certificates for a subscription
328
- #
329
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
- # will be added to the HTTP request.
331
- #
332
- # @return [CertificateCollection] which provide lazy access to pages of the
333
- # response.
334
- #
335
- def get_all_certificates_as_lazy(custom_headers = nil)
336
- response = get_all_certificates_async(custom_headers).value!
337
- unless response.nil?
338
- page = response.body
339
- page.next_method = Proc.new do |next_page_link|
340
- get_all_certificates_next_async(next_page_link, custom_headers)
341
- end
342
- page
343
- end
344
- end
345
-
346
- #
347
- # Get all certificates for a subscription
348
- #
349
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
350
- # will be added to the HTTP request.
351
- #
352
- # @return [Array<Certificate>] operation results.
353
- #
354
- def get_all_certificates(custom_headers = nil)
355
- first_page = get_all_certificates_as_lazy(custom_headers)
356
- first_page.get_all_items
357
- end
358
-
359
- #
360
- # Get all certificates for a subscription
361
- #
362
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
363
- # will be added to the HTTP request.
364
- #
365
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
366
- #
367
- def get_all_certificates_with_http_info(custom_headers = nil)
368
- get_all_certificates_async(custom_headers).value!
369
- end
370
-
371
- #
372
- # Get all certificates for a subscription
373
- #
374
- # @param [Hash{String => String}] A hash of custom headers that will be added
375
- # to the HTTP request.
376
- #
377
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
378
- #
379
- def get_all_certificates_async(custom_headers = nil)
380
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
381
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
382
-
383
-
384
- request_headers = {}
385
-
386
- # Set Headers
387
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
388
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
389
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'
390
-
391
- request_url = @base_url || @client.base_url
392
-
393
- options = {
394
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
395
- path_params: {'subscriptionId' => @client.subscription_id},
396
- query_params: {'api-version' => @client.api_version},
397
- headers: request_headers.merge(custom_headers || {}),
398
- base_url: request_url
399
- }
400
- promise = @client.make_request_async(:get, path_template, options)
401
-
402
- promise = promise.then do |result|
403
- http_response = result.response
404
- status_code = http_response.status
405
- response_content = http_response.body
406
- unless status_code == 200
407
- error_model = JSON.load(response_content)
408
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
409
- end
410
-
411
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
412
- # Deserialize Response
413
- if status_code == 200
414
- begin
415
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
416
- result_mapper = CertificateCollection.mapper()
417
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
418
- rescue Exception => e
419
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
420
- end
421
- end
422
-
423
- result
424
- end
425
-
426
- promise.execute
427
- end
428
-
429
- #
430
- # Gets all App Service Plans for a subcription
431
- #
432
- # @param detailed [Boolean] False to return a subset of App Service Plan
433
- # properties, true to return all of the properties.
434
- # Retrieval of all properties may increase the API latency.
435
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
436
- # will be added to the HTTP request.
437
- #
438
- # @return [ServerFarmCollection] which provide lazy access to pages of the
439
- # response.
440
- #
441
- def get_all_server_farms_as_lazy(detailed = nil, custom_headers = nil)
442
- response = get_all_server_farms_async(detailed, custom_headers).value!
443
- unless response.nil?
444
- page = response.body
445
- page.next_method = Proc.new do |next_page_link|
446
- get_all_server_farms_next_async(next_page_link, custom_headers)
447
- end
448
- page
449
- end
450
- end
451
-
452
- #
453
- # Gets all App Service Plans for a subcription
454
- #
455
- # @param detailed [Boolean] False to return a subset of App Service Plan
456
- # properties, true to return all of the properties.
457
- # Retrieval of all properties may increase the API latency.
458
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
459
- # will be added to the HTTP request.
460
- #
461
- # @return [Array<ServerFarmWithRichSku>] operation results.
462
- #
463
- def get_all_server_farms(detailed = nil, custom_headers = nil)
464
- first_page = get_all_server_farms_as_lazy(detailed, custom_headers)
465
- first_page.get_all_items
466
- end
467
-
468
- #
469
- # Gets all App Service Plans for a subcription
470
- #
471
- # @param detailed [Boolean] False to return a subset of App Service Plan
472
- # properties, true to return all of the properties.
473
- # Retrieval of all properties may increase the API latency.
474
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
475
- # will be added to the HTTP request.
476
- #
477
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
478
- #
479
- def get_all_server_farms_with_http_info(detailed = nil, custom_headers = nil)
480
- get_all_server_farms_async(detailed, custom_headers).value!
481
- end
482
-
483
- #
484
- # Gets all App Service Plans for a subcription
485
- #
486
- # @param detailed [Boolean] False to return a subset of App Service Plan
487
- # properties, true to return all of the properties.
488
- # Retrieval of all properties may increase the API latency.
489
- # @param [Hash{String => String}] A hash of custom headers that will be added
490
- # to the HTTP request.
491
- #
492
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
493
- #
494
- def get_all_server_farms_async(detailed = nil, custom_headers = nil)
495
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
496
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
497
-
498
-
499
- request_headers = {}
500
-
501
- # Set Headers
502
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
503
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
504
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'
505
-
506
- request_url = @base_url || @client.base_url
507
-
508
- options = {
509
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
510
- path_params: {'subscriptionId' => @client.subscription_id},
511
- query_params: {'detailed' => detailed,'api-version' => @client.api_version},
512
- headers: request_headers.merge(custom_headers || {}),
513
- base_url: request_url
514
- }
515
- promise = @client.make_request_async(:get, path_template, options)
516
-
517
- promise = promise.then do |result|
518
- http_response = result.response
519
- status_code = http_response.status
520
- response_content = http_response.body
521
- unless status_code == 200
522
- error_model = JSON.load(response_content)
523
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
524
- end
525
-
526
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
527
- # Deserialize Response
528
- if status_code == 200
529
- begin
530
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
531
- result_mapper = ServerFarmCollection.mapper()
532
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
533
- rescue Exception => e
534
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
535
- end
536
- end
537
-
538
- result
539
- end
540
-
541
- promise.execute
542
- end
543
-
544
- #
545
- # Gets all Web Apps for a subscription
546
- #
547
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
548
- # will be added to the HTTP request.
549
- #
550
- # @return [SiteCollection] which provide lazy access to pages of the response.
551
- #
552
- def get_all_sites_as_lazy(custom_headers = nil)
553
- response = get_all_sites_async(custom_headers).value!
554
- unless response.nil?
555
- page = response.body
556
- page.next_method = Proc.new do |next_page_link|
557
- get_all_sites_next_async(next_page_link, custom_headers)
558
- end
559
- page
560
- end
561
- end
562
-
563
- #
564
- # Gets all Web Apps for a subscription
565
- #
566
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
567
- # will be added to the HTTP request.
568
- #
569
- # @return [Array<Site>] operation results.
570
- #
571
- def get_all_sites(custom_headers = nil)
572
- first_page = get_all_sites_as_lazy(custom_headers)
573
- first_page.get_all_items
574
- end
575
-
576
- #
577
- # Gets all Web Apps for a subscription
578
- #
579
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
580
- # will be added to the HTTP request.
581
- #
582
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
583
- #
584
- def get_all_sites_with_http_info(custom_headers = nil)
585
- get_all_sites_async(custom_headers).value!
586
- end
587
-
588
- #
589
- # Gets all Web Apps for a subscription
590
- #
591
- # @param [Hash{String => String}] A hash of custom headers that will be added
592
- # to the HTTP request.
593
- #
594
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
595
- #
596
- def get_all_sites_async(custom_headers = nil)
597
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
598
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
599
-
600
-
601
- request_headers = {}
602
-
603
- # Set Headers
604
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
605
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
606
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'
607
-
608
- request_url = @base_url || @client.base_url
609
-
610
- options = {
611
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
612
- path_params: {'subscriptionId' => @client.subscription_id},
613
- query_params: {'api-version' => @client.api_version},
614
- headers: request_headers.merge(custom_headers || {}),
615
- base_url: request_url
616
- }
617
- promise = @client.make_request_async(:get, path_template, options)
618
-
619
- promise = promise.then do |result|
620
- http_response = result.response
621
- status_code = http_response.status
622
- response_content = http_response.body
623
- unless status_code == 200
624
- error_model = JSON.load(response_content)
625
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
626
- end
627
-
628
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
629
- # Deserialize Response
630
- if status_code == 200
631
- begin
632
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
633
- result_mapper = SiteCollection.mapper()
634
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
635
- rescue Exception => e
636
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
637
- end
638
- end
639
-
640
- result
641
- end
642
-
643
- promise.execute
644
- end
645
-
646
- #
647
- # Gets all hostingEnvironments (App Service Environment) for a subscription
648
- #
649
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
650
- # will be added to the HTTP request.
651
- #
652
- # @return [HostingEnvironmentCollection] which provide lazy access to pages of
653
- # the response.
654
- #
655
- def get_all_hosting_environments_as_lazy(custom_headers = nil)
656
- response = get_all_hosting_environments_async(custom_headers).value!
657
- unless response.nil?
658
- page = response.body
659
- page.next_method = Proc.new do |next_page_link|
660
- get_all_hosting_environments_next_async(next_page_link, custom_headers)
661
- end
662
- page
663
- end
664
- end
665
-
666
- #
667
- # Gets all hostingEnvironments (App Service Environment) for a subscription
668
- #
669
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
670
- # will be added to the HTTP request.
671
- #
672
- # @return [Array<HostingEnvironment>] operation results.
673
- #
674
- def get_all_hosting_environments(custom_headers = nil)
675
- first_page = get_all_hosting_environments_as_lazy(custom_headers)
676
- first_page.get_all_items
677
- end
678
-
679
- #
680
- # Gets all hostingEnvironments (App Service Environment) for a subscription
681
- #
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 get_all_hosting_environments_with_http_info(custom_headers = nil)
688
- get_all_hosting_environments_async(custom_headers).value!
689
- end
690
-
691
- #
692
- # Gets all hostingEnvironments (App Service Environment) for a subscription
693
- #
694
- # @param [Hash{String => String}] A hash of custom headers that will be added
695
- # to the HTTP request.
696
- #
697
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
698
- #
699
- def get_all_hosting_environments_async(custom_headers = nil)
700
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
701
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
702
-
703
-
704
- request_headers = {}
705
-
706
- # Set Headers
707
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
708
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
709
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'
710
-
711
- request_url = @base_url || @client.base_url
712
-
713
- options = {
714
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
715
- path_params: {'subscriptionId' => @client.subscription_id},
716
- query_params: {'api-version' => @client.api_version},
717
- headers: request_headers.merge(custom_headers || {}),
718
- base_url: request_url
719
- }
720
- promise = @client.make_request_async(:get, path_template, options)
721
-
722
- promise = promise.then do |result|
723
- http_response = result.response
724
- status_code = http_response.status
725
- response_content = http_response.body
726
- unless status_code == 200
727
- error_model = JSON.load(response_content)
728
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
729
- end
730
-
731
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
732
- # Deserialize Response
733
- if status_code == 200
734
- begin
735
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
736
- result_mapper = HostingEnvironmentCollection.mapper()
737
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
738
- rescue Exception => e
739
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
740
- end
741
- end
742
-
743
- result
744
- end
745
-
746
- promise.execute
747
- end
748
-
749
- #
750
- # Gets all managed hosting environments for a subscription
751
- #
752
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
753
- # will be added to the HTTP request.
754
- #
755
- # @return [ManagedHostingEnvironmentCollection] which provide lazy access to
756
- # pages of the response.
757
- #
758
- def get_all_managed_hosting_environments_as_lazy(custom_headers = nil)
759
- response = get_all_managed_hosting_environments_async(custom_headers).value!
760
- unless response.nil?
761
- page = response.body
762
- page.next_method = Proc.new do |next_page_link|
763
- get_all_managed_hosting_environments_next_async(next_page_link, custom_headers)
764
- end
765
- page
766
- end
767
- end
768
-
769
- #
770
- # Gets all managed hosting environments for a subscription
771
- #
772
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
773
- # will be added to the HTTP request.
774
- #
775
- # @return [Array<ManagedHostingEnvironment>] operation results.
776
- #
777
- def get_all_managed_hosting_environments(custom_headers = nil)
778
- first_page = get_all_managed_hosting_environments_as_lazy(custom_headers)
779
- first_page.get_all_items
780
- end
781
-
782
- #
783
- # Gets all managed hosting environments for a subscription
784
- #
785
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
786
- # will be added to the HTTP request.
787
- #
788
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
789
- #
790
- def get_all_managed_hosting_environments_with_http_info(custom_headers = nil)
791
- get_all_managed_hosting_environments_async(custom_headers).value!
792
- end
793
-
794
- #
795
- # Gets all managed hosting environments for a subscription
796
- #
797
- # @param [Hash{String => String}] A hash of custom headers that will be added
798
- # to the HTTP request.
799
- #
800
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
801
- #
802
- def get_all_managed_hosting_environments_async(custom_headers = nil)
803
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
804
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
805
-
806
-
807
- request_headers = {}
808
-
809
- # Set Headers
810
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
811
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
812
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/managedHostingEnvironments'
813
-
814
- request_url = @base_url || @client.base_url
815
-
816
- options = {
817
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
818
- path_params: {'subscriptionId' => @client.subscription_id},
819
- query_params: {'api-version' => @client.api_version},
820
- headers: request_headers.merge(custom_headers || {}),
821
- base_url: request_url
822
- }
823
- promise = @client.make_request_async(:get, path_template, options)
824
-
825
- promise = promise.then do |result|
826
- http_response = result.response
827
- status_code = http_response.status
828
- response_content = http_response.body
829
- unless status_code == 200
830
- error_model = JSON.load(response_content)
831
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
832
- end
833
-
834
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
835
- # Deserialize Response
836
- if status_code == 200
837
- begin
838
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
839
- result_mapper = ManagedHostingEnvironmentCollection.mapper()
840
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
841
- rescue Exception => e
842
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
843
- end
844
- end
845
-
846
- result
847
- end
848
-
849
- promise.execute
850
- end
851
-
852
- #
853
- # Gets all mobile services for a subscription
854
- #
855
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
856
- # will be added to the HTTP request.
857
- #
858
- # @return [ClassicMobileServiceCollection] which provide lazy access to pages
859
- # of the response.
860
- #
861
- def get_all_classic_mobile_services_as_lazy(custom_headers = nil)
862
- response = get_all_classic_mobile_services_async(custom_headers).value!
863
- unless response.nil?
864
- page = response.body
865
- page.next_method = Proc.new do |next_page_link|
866
- get_all_classic_mobile_services_next_async(next_page_link, custom_headers)
867
- end
868
- page
869
- end
870
- end
871
-
872
- #
873
- # Gets all mobile services for a subscription
874
- #
875
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
876
- # will be added to the HTTP request.
877
- #
878
- # @return [Array<ClassicMobileService>] operation results.
879
- #
880
- def get_all_classic_mobile_services(custom_headers = nil)
881
- first_page = get_all_classic_mobile_services_as_lazy(custom_headers)
882
- first_page.get_all_items
883
- end
884
-
885
- #
886
- # Gets all mobile services for a subscription
887
- #
888
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
889
- # will be added to the HTTP request.
890
- #
891
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
892
- #
893
- def get_all_classic_mobile_services_with_http_info(custom_headers = nil)
894
- get_all_classic_mobile_services_async(custom_headers).value!
895
- end
896
-
897
- #
898
- # Gets all mobile services for a subscription
899
- #
900
- # @param [Hash{String => String}] A hash of custom headers that will be added
901
- # to the HTTP request.
902
- #
903
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
904
- #
905
- def get_all_classic_mobile_services_async(custom_headers = nil)
906
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
907
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
908
-
909
-
910
- request_headers = {}
911
-
912
- # Set Headers
913
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
914
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
915
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/classicMobileServices'
916
-
917
- request_url = @base_url || @client.base_url
918
-
919
- options = {
920
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
921
- path_params: {'subscriptionId' => @client.subscription_id},
922
- query_params: {'api-version' => @client.api_version},
923
- headers: request_headers.merge(custom_headers || {}),
924
- base_url: request_url
925
- }
926
- promise = @client.make_request_async(:get, path_template, options)
927
-
928
- promise = promise.then do |result|
929
- http_response = result.response
930
- status_code = http_response.status
931
- response_content = http_response.body
932
- unless status_code == 200
933
- error_model = JSON.load(response_content)
934
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
935
- end
936
-
937
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
938
- # Deserialize Response
939
- if status_code == 200
940
- begin
941
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
942
- result_mapper = ClassicMobileServiceCollection.mapper()
943
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
944
- rescue Exception => e
945
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
946
- end
947
- end
948
-
949
- result
950
- end
951
-
952
- promise.execute
953
- end
954
-
955
- #
956
- # List premier add on offers
957
- #
958
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
- # will be added to the HTTP request.
960
- #
961
- # @return [Object] operation results.
962
- #
963
- def list_premier_add_on_offers(custom_headers = nil)
964
- response = list_premier_add_on_offers_async(custom_headers).value!
965
- response.body unless response.nil?
966
- end
967
-
968
- #
969
- # List premier add on offers
970
- #
971
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
972
- # will be added to the HTTP request.
973
- #
974
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
975
- #
976
- def list_premier_add_on_offers_with_http_info(custom_headers = nil)
977
- list_premier_add_on_offers_async(custom_headers).value!
978
- end
979
-
980
- #
981
- # List premier add on offers
982
- #
983
- # @param [Hash{String => String}] A hash of custom headers that will be added
984
- # to the HTTP request.
985
- #
986
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
987
- #
988
- def list_premier_add_on_offers_async(custom_headers = nil)
989
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
990
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
991
-
992
-
993
- request_headers = {}
994
-
995
- # Set Headers
996
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
997
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
998
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'
999
-
1000
- request_url = @base_url || @client.base_url
1001
-
1002
- options = {
1003
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1004
- path_params: {'subscriptionId' => @client.subscription_id},
1005
- query_params: {'api-version' => @client.api_version},
1006
- headers: request_headers.merge(custom_headers || {}),
1007
- base_url: request_url
1008
- }
1009
- promise = @client.make_request_async(:get, path_template, options)
1010
-
1011
- promise = promise.then do |result|
1012
- http_response = result.response
1013
- status_code = http_response.status
1014
- response_content = http_response.body
1015
- unless status_code == 200
1016
- error_model = JSON.load(response_content)
1017
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1018
- end
1019
-
1020
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1021
-
1022
- result
1023
- end
1024
-
1025
- promise.execute
1026
- end
1027
-
1028
- #
1029
- # Whether hosting environment name is available
1030
- #
1031
- # @param name [String] Hosting environment name
1032
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1033
- # will be added to the HTTP request.
1034
- #
1035
- # @return [Object] operation results.
1036
- #
1037
- def is_hosting_environment_name_available(name, custom_headers = nil)
1038
- response = is_hosting_environment_name_available_async(name, custom_headers).value!
1039
- response.body unless response.nil?
1040
- end
1041
-
1042
- #
1043
- # Whether hosting environment name is available
1044
- #
1045
- # @param name [String] Hosting environment name
1046
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1047
- # will be added to the HTTP request.
1048
- #
1049
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1050
- #
1051
- def is_hosting_environment_name_available_with_http_info(name, custom_headers = nil)
1052
- is_hosting_environment_name_available_async(name, custom_headers).value!
1053
- end
1054
-
1055
- #
1056
- # Whether hosting environment name is available
1057
- #
1058
- # @param name [String] Hosting environment name
1059
- # @param [Hash{String => String}] A hash of custom headers that will be added
1060
- # to the HTTP request.
1061
- #
1062
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1063
- #
1064
- def is_hosting_environment_name_available_async(name, custom_headers = nil)
1065
- fail ArgumentError, 'name is nil' if name.nil?
1066
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1067
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1068
-
1069
-
1070
- request_headers = {}
1071
-
1072
- # Set Headers
1073
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1074
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1075
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable'
1076
-
1077
- request_url = @base_url || @client.base_url
1078
-
1079
- options = {
1080
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1081
- path_params: {'subscriptionId' => @client.subscription_id},
1082
- query_params: {'name' => name,'api-version' => @client.api_version},
1083
- headers: request_headers.merge(custom_headers || {}),
1084
- base_url: request_url
1085
- }
1086
- promise = @client.make_request_async(:get, path_template, options)
1087
-
1088
- promise = promise.then do |result|
1089
- http_response = result.response
1090
- status_code = http_response.status
1091
- response_content = http_response.body
1092
- unless status_code == 200
1093
- error_model = JSON.load(response_content)
1094
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1095
- end
1096
-
1097
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1098
-
1099
- result
1100
- end
1101
-
1102
- promise.execute
1103
- end
1104
-
1105
- #
1106
- # Whether hosting environment name is available
1107
- #
1108
- # @param name [String] Hosting environment name
1109
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1110
- # will be added to the HTTP request.
1111
- #
1112
- # @return [Object] operation results.
1113
- #
1114
- def is_hosting_environment_with_legacy_name_available(name, custom_headers = nil)
1115
- response = is_hosting_environment_with_legacy_name_available_async(name, custom_headers).value!
1116
- response.body unless response.nil?
1117
- end
1118
-
1119
- #
1120
- # Whether hosting environment name is available
1121
- #
1122
- # @param name [String] Hosting environment name
1123
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1124
- # will be added to the HTTP request.
1125
- #
1126
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1127
- #
1128
- def is_hosting_environment_with_legacy_name_available_with_http_info(name, custom_headers = nil)
1129
- is_hosting_environment_with_legacy_name_available_async(name, custom_headers).value!
1130
- end
1131
-
1132
- #
1133
- # Whether hosting environment name is available
1134
- #
1135
- # @param name [String] Hosting environment name
1136
- # @param [Hash{String => String}] A hash of custom headers that will be added
1137
- # to the HTTP request.
1138
- #
1139
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1140
- #
1141
- def is_hosting_environment_with_legacy_name_available_async(name, custom_headers = nil)
1142
- fail ArgumentError, 'name is nil' if name.nil?
1143
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1144
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1145
-
1146
-
1147
- request_headers = {}
1148
-
1149
- # Set Headers
1150
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1151
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1152
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/ishostingenvironmentnameavailable/{name}'
1153
-
1154
- request_url = @base_url || @client.base_url
1155
-
1156
- options = {
1157
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1158
- path_params: {'name' => name,'subscriptionId' => @client.subscription_id},
1159
- query_params: {'api-version' => @client.api_version},
1160
- headers: request_headers.merge(custom_headers || {}),
1161
- base_url: request_url
1162
- }
1163
- promise = @client.make_request_async(:get, path_template, options)
1164
-
1165
- promise = promise.then do |result|
1166
- http_response = result.response
1167
- status_code = http_response.status
1168
- response_content = http_response.body
1169
- unless status_code == 200
1170
- error_model = JSON.load(response_content)
1171
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1172
- end
1173
-
1174
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1175
-
1176
- result
1177
- end
1178
-
1179
- promise.execute
1180
- end
1181
-
1182
- #
1183
- # Check if resource name is available
1184
- #
1185
- # @param request [ResourceNameAvailabilityRequest] Name availability request
1186
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1187
- # will be added to the HTTP request.
1188
- #
1189
- # @return [ResourceNameAvailability] operation results.
1190
- #
1191
- def check_name_availability(request, custom_headers = nil)
1192
- response = check_name_availability_async(request, custom_headers).value!
1193
- response.body unless response.nil?
1194
- end
1195
-
1196
- #
1197
- # Check if resource name is available
1198
- #
1199
- # @param request [ResourceNameAvailabilityRequest] Name availability request
1200
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1201
- # will be added to the HTTP request.
1202
- #
1203
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1204
- #
1205
- def check_name_availability_with_http_info(request, custom_headers = nil)
1206
- check_name_availability_async(request, custom_headers).value!
1207
- end
1208
-
1209
- #
1210
- # Check if resource name is available
1211
- #
1212
- # @param request [ResourceNameAvailabilityRequest] Name availability request
1213
- # @param [Hash{String => String}] A hash of custom headers that will be added
1214
- # to the HTTP request.
1215
- #
1216
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1217
- #
1218
- def check_name_availability_async(request, custom_headers = nil)
1219
- fail ArgumentError, 'request is nil' if request.nil?
1220
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1221
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1222
-
1223
-
1224
- request_headers = {}
1225
-
1226
- # Set Headers
1227
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1228
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1229
-
1230
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1231
-
1232
- # Serialize Request
1233
- request_mapper = ResourceNameAvailabilityRequest.mapper()
1234
- request_content = @client.serialize(request_mapper, request, 'request')
1235
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1236
-
1237
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'
1238
-
1239
- request_url = @base_url || @client.base_url
1240
-
1241
- options = {
1242
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1243
- path_params: {'subscriptionId' => @client.subscription_id},
1244
- query_params: {'api-version' => @client.api_version},
1245
- body: request_content,
1246
- headers: request_headers.merge(custom_headers || {}),
1247
- base_url: request_url
1248
- }
1249
- promise = @client.make_request_async(:post, path_template, options)
1250
-
1251
- promise = promise.then do |result|
1252
- http_response = result.response
1253
- status_code = http_response.status
1254
- response_content = http_response.body
1255
- unless status_code == 200
1256
- error_model = JSON.load(response_content)
1257
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1258
- end
1259
-
1260
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1261
- # Deserialize Response
1262
- if status_code == 200
1263
- begin
1264
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1265
- result_mapper = ResourceNameAvailability.mapper()
1266
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1267
- rescue Exception => e
1268
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1269
- end
1270
- end
1271
-
1272
- result
1273
- end
1274
-
1275
- promise.execute
1276
- end
1277
-
1278
- #
1279
- # Gets list of available geo regions
1280
- #
1281
- # @param next_page_link [String] The NextLink from the previous successful
1282
- # call to List operation.
1283
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1284
- # will be added to the HTTP request.
1285
- #
1286
- # @return [GeoRegionCollection] operation results.
1287
- #
1288
- def get_subscription_geo_regions_next(next_page_link, custom_headers = nil)
1289
- response = get_subscription_geo_regions_next_async(next_page_link, custom_headers).value!
1290
- response.body unless response.nil?
1291
- end
1292
-
1293
- #
1294
- # Gets list of available geo regions
1295
- #
1296
- # @param next_page_link [String] The NextLink from the previous successful
1297
- # call to List operation.
1298
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1299
- # will be added to the HTTP request.
1300
- #
1301
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1302
- #
1303
- def get_subscription_geo_regions_next_with_http_info(next_page_link, custom_headers = nil)
1304
- get_subscription_geo_regions_next_async(next_page_link, custom_headers).value!
1305
- end
1306
-
1307
- #
1308
- # Gets list of available geo regions
1309
- #
1310
- # @param next_page_link [String] The NextLink from the previous successful
1311
- # call to List operation.
1312
- # @param [Hash{String => String}] A hash of custom headers that will be added
1313
- # to the HTTP request.
1314
- #
1315
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1316
- #
1317
- def get_subscription_geo_regions_next_async(next_page_link, custom_headers = nil)
1318
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1319
-
1320
-
1321
- request_headers = {}
1322
-
1323
- # Set Headers
1324
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1325
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1326
- path_template = '{nextLink}'
1327
-
1328
- request_url = @base_url || @client.base_url
1329
-
1330
- options = {
1331
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1332
- skip_encoding_path_params: {'nextLink' => next_page_link},
1333
- headers: request_headers.merge(custom_headers || {}),
1334
- base_url: request_url
1335
- }
1336
- promise = @client.make_request_async(:get, path_template, options)
1337
-
1338
- promise = promise.then do |result|
1339
- http_response = result.response
1340
- status_code = http_response.status
1341
- response_content = http_response.body
1342
- unless status_code == 200
1343
- error_model = JSON.load(response_content)
1344
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1345
- end
1346
-
1347
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1348
- # Deserialize Response
1349
- if status_code == 200
1350
- begin
1351
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1352
- result_mapper = GeoRegionCollection.mapper()
1353
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1354
- rescue Exception => e
1355
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1356
- end
1357
- end
1358
-
1359
- result
1360
- end
1361
-
1362
- promise.execute
1363
- end
1364
-
1365
- #
1366
- # Get all certificates for a subscription
1367
- #
1368
- # @param next_page_link [String] The NextLink from the previous successful
1369
- # call to List operation.
1370
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1371
- # will be added to the HTTP request.
1372
- #
1373
- # @return [CertificateCollection] operation results.
1374
- #
1375
- def get_all_certificates_next(next_page_link, custom_headers = nil)
1376
- response = get_all_certificates_next_async(next_page_link, custom_headers).value!
1377
- response.body unless response.nil?
1378
- end
1379
-
1380
- #
1381
- # Get all certificates for a subscription
1382
- #
1383
- # @param next_page_link [String] The NextLink from the previous successful
1384
- # call to List operation.
1385
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1386
- # will be added to the HTTP request.
1387
- #
1388
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1389
- #
1390
- def get_all_certificates_next_with_http_info(next_page_link, custom_headers = nil)
1391
- get_all_certificates_next_async(next_page_link, custom_headers).value!
1392
- end
1393
-
1394
- #
1395
- # Get all certificates for a subscription
1396
- #
1397
- # @param next_page_link [String] The NextLink from the previous successful
1398
- # call to List operation.
1399
- # @param [Hash{String => String}] A hash of custom headers that will be added
1400
- # to the HTTP request.
1401
- #
1402
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1403
- #
1404
- def get_all_certificates_next_async(next_page_link, custom_headers = nil)
1405
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1406
-
1407
-
1408
- request_headers = {}
1409
-
1410
- # Set Headers
1411
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1412
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1413
- path_template = '{nextLink}'
1414
-
1415
- request_url = @base_url || @client.base_url
1416
-
1417
- options = {
1418
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1419
- skip_encoding_path_params: {'nextLink' => next_page_link},
1420
- headers: request_headers.merge(custom_headers || {}),
1421
- base_url: request_url
1422
- }
1423
- promise = @client.make_request_async(:get, path_template, options)
1424
-
1425
- promise = promise.then do |result|
1426
- http_response = result.response
1427
- status_code = http_response.status
1428
- response_content = http_response.body
1429
- unless status_code == 200
1430
- error_model = JSON.load(response_content)
1431
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1432
- end
1433
-
1434
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1435
- # Deserialize Response
1436
- if status_code == 200
1437
- begin
1438
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1439
- result_mapper = CertificateCollection.mapper()
1440
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1441
- rescue Exception => e
1442
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1443
- end
1444
- end
1445
-
1446
- result
1447
- end
1448
-
1449
- promise.execute
1450
- end
1451
-
1452
- #
1453
- # Gets all App Service Plans for a subcription
1454
- #
1455
- # @param next_page_link [String] The NextLink from the previous successful
1456
- # call to List operation.
1457
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1458
- # will be added to the HTTP request.
1459
- #
1460
- # @return [ServerFarmCollection] operation results.
1461
- #
1462
- def get_all_server_farms_next(next_page_link, custom_headers = nil)
1463
- response = get_all_server_farms_next_async(next_page_link, custom_headers).value!
1464
- response.body unless response.nil?
1465
- end
1466
-
1467
- #
1468
- # Gets all App Service Plans for a subcription
1469
- #
1470
- # @param next_page_link [String] The NextLink from the previous successful
1471
- # call to List operation.
1472
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1473
- # will be added to the HTTP request.
1474
- #
1475
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1476
- #
1477
- def get_all_server_farms_next_with_http_info(next_page_link, custom_headers = nil)
1478
- get_all_server_farms_next_async(next_page_link, custom_headers).value!
1479
- end
1480
-
1481
- #
1482
- # Gets all App Service Plans for a subcription
1483
- #
1484
- # @param next_page_link [String] The NextLink from the previous successful
1485
- # call to List operation.
1486
- # @param [Hash{String => String}] A hash of custom headers that will be added
1487
- # to the HTTP request.
1488
- #
1489
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1490
- #
1491
- def get_all_server_farms_next_async(next_page_link, custom_headers = nil)
1492
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1493
-
1494
-
1495
- request_headers = {}
1496
-
1497
- # Set Headers
1498
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1499
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1500
- path_template = '{nextLink}'
1501
-
1502
- request_url = @base_url || @client.base_url
1503
-
1504
- options = {
1505
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1506
- skip_encoding_path_params: {'nextLink' => next_page_link},
1507
- headers: request_headers.merge(custom_headers || {}),
1508
- base_url: request_url
1509
- }
1510
- promise = @client.make_request_async(:get, path_template, options)
1511
-
1512
- promise = promise.then do |result|
1513
- http_response = result.response
1514
- status_code = http_response.status
1515
- response_content = http_response.body
1516
- unless status_code == 200
1517
- error_model = JSON.load(response_content)
1518
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1519
- end
1520
-
1521
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1522
- # Deserialize Response
1523
- if status_code == 200
1524
- begin
1525
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1526
- result_mapper = ServerFarmCollection.mapper()
1527
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1528
- rescue Exception => e
1529
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1530
- end
1531
- end
1532
-
1533
- result
1534
- end
1535
-
1536
- promise.execute
1537
- end
1538
-
1539
- #
1540
- # Gets all Web Apps for a subscription
1541
- #
1542
- # @param next_page_link [String] The NextLink from the previous successful
1543
- # call to List operation.
1544
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1545
- # will be added to the HTTP request.
1546
- #
1547
- # @return [SiteCollection] operation results.
1548
- #
1549
- def get_all_sites_next(next_page_link, custom_headers = nil)
1550
- response = get_all_sites_next_async(next_page_link, custom_headers).value!
1551
- response.body unless response.nil?
1552
- end
1553
-
1554
- #
1555
- # Gets all Web Apps for a subscription
1556
- #
1557
- # @param next_page_link [String] The NextLink from the previous successful
1558
- # call to List operation.
1559
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1560
- # will be added to the HTTP request.
1561
- #
1562
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1563
- #
1564
- def get_all_sites_next_with_http_info(next_page_link, custom_headers = nil)
1565
- get_all_sites_next_async(next_page_link, custom_headers).value!
1566
- end
1567
-
1568
- #
1569
- # Gets all Web Apps for a subscription
1570
- #
1571
- # @param next_page_link [String] The NextLink from the previous successful
1572
- # call to List operation.
1573
- # @param [Hash{String => String}] A hash of custom headers that will be added
1574
- # to the HTTP request.
1575
- #
1576
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1577
- #
1578
- def get_all_sites_next_async(next_page_link, custom_headers = nil)
1579
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1580
-
1581
-
1582
- request_headers = {}
1583
-
1584
- # Set Headers
1585
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1586
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1587
- path_template = '{nextLink}'
1588
-
1589
- request_url = @base_url || @client.base_url
1590
-
1591
- options = {
1592
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1593
- skip_encoding_path_params: {'nextLink' => next_page_link},
1594
- headers: request_headers.merge(custom_headers || {}),
1595
- base_url: request_url
1596
- }
1597
- promise = @client.make_request_async(:get, path_template, options)
1598
-
1599
- promise = promise.then do |result|
1600
- http_response = result.response
1601
- status_code = http_response.status
1602
- response_content = http_response.body
1603
- unless status_code == 200
1604
- error_model = JSON.load(response_content)
1605
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1606
- end
1607
-
1608
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1609
- # Deserialize Response
1610
- if status_code == 200
1611
- begin
1612
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1613
- result_mapper = SiteCollection.mapper()
1614
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1615
- rescue Exception => e
1616
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1617
- end
1618
- end
1619
-
1620
- result
1621
- end
1622
-
1623
- promise.execute
1624
- end
1625
-
1626
- #
1627
- # Gets all hostingEnvironments (App Service Environment) for a subscription
1628
- #
1629
- # @param next_page_link [String] The NextLink from the previous successful
1630
- # call to List operation.
1631
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1632
- # will be added to the HTTP request.
1633
- #
1634
- # @return [HostingEnvironmentCollection] operation results.
1635
- #
1636
- def get_all_hosting_environments_next(next_page_link, custom_headers = nil)
1637
- response = get_all_hosting_environments_next_async(next_page_link, custom_headers).value!
1638
- response.body unless response.nil?
1639
- end
1640
-
1641
- #
1642
- # Gets all hostingEnvironments (App Service Environment) for a subscription
1643
- #
1644
- # @param next_page_link [String] The NextLink from the previous successful
1645
- # call to List operation.
1646
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1647
- # will be added to the HTTP request.
1648
- #
1649
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1650
- #
1651
- def get_all_hosting_environments_next_with_http_info(next_page_link, custom_headers = nil)
1652
- get_all_hosting_environments_next_async(next_page_link, custom_headers).value!
1653
- end
1654
-
1655
- #
1656
- # Gets all hostingEnvironments (App Service Environment) for a subscription
1657
- #
1658
- # @param next_page_link [String] The NextLink from the previous successful
1659
- # call to List operation.
1660
- # @param [Hash{String => String}] A hash of custom headers that will be added
1661
- # to the HTTP request.
1662
- #
1663
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1664
- #
1665
- def get_all_hosting_environments_next_async(next_page_link, custom_headers = nil)
1666
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1667
-
1668
-
1669
- request_headers = {}
1670
-
1671
- # Set Headers
1672
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1673
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1674
- path_template = '{nextLink}'
1675
-
1676
- request_url = @base_url || @client.base_url
1677
-
1678
- options = {
1679
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1680
- skip_encoding_path_params: {'nextLink' => next_page_link},
1681
- headers: request_headers.merge(custom_headers || {}),
1682
- base_url: request_url
1683
- }
1684
- promise = @client.make_request_async(:get, path_template, options)
1685
-
1686
- promise = promise.then do |result|
1687
- http_response = result.response
1688
- status_code = http_response.status
1689
- response_content = http_response.body
1690
- unless status_code == 200
1691
- error_model = JSON.load(response_content)
1692
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1693
- end
1694
-
1695
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1696
- # Deserialize Response
1697
- if status_code == 200
1698
- begin
1699
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1700
- result_mapper = HostingEnvironmentCollection.mapper()
1701
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1702
- rescue Exception => e
1703
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1704
- end
1705
- end
1706
-
1707
- result
1708
- end
1709
-
1710
- promise.execute
1711
- end
1712
-
1713
- #
1714
- # Gets all managed hosting environments for a subscription
1715
- #
1716
- # @param next_page_link [String] The NextLink from the previous successful
1717
- # call to List operation.
1718
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1719
- # will be added to the HTTP request.
1720
- #
1721
- # @return [ManagedHostingEnvironmentCollection] operation results.
1722
- #
1723
- def get_all_managed_hosting_environments_next(next_page_link, custom_headers = nil)
1724
- response = get_all_managed_hosting_environments_next_async(next_page_link, custom_headers).value!
1725
- response.body unless response.nil?
1726
- end
1727
-
1728
- #
1729
- # Gets all managed hosting environments for a subscription
1730
- #
1731
- # @param next_page_link [String] The NextLink from the previous successful
1732
- # call to List operation.
1733
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1734
- # will be added to the HTTP request.
1735
- #
1736
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1737
- #
1738
- def get_all_managed_hosting_environments_next_with_http_info(next_page_link, custom_headers = nil)
1739
- get_all_managed_hosting_environments_next_async(next_page_link, custom_headers).value!
1740
- end
1741
-
1742
- #
1743
- # Gets all managed hosting environments for a subscription
1744
- #
1745
- # @param next_page_link [String] The NextLink from the previous successful
1746
- # call to List operation.
1747
- # @param [Hash{String => String}] A hash of custom headers that will be added
1748
- # to the HTTP request.
1749
- #
1750
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1751
- #
1752
- def get_all_managed_hosting_environments_next_async(next_page_link, custom_headers = nil)
1753
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1754
-
1755
-
1756
- request_headers = {}
1757
-
1758
- # Set Headers
1759
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1760
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1761
- path_template = '{nextLink}'
1762
-
1763
- request_url = @base_url || @client.base_url
1764
-
1765
- options = {
1766
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1767
- skip_encoding_path_params: {'nextLink' => next_page_link},
1768
- headers: request_headers.merge(custom_headers || {}),
1769
- base_url: request_url
1770
- }
1771
- promise = @client.make_request_async(:get, path_template, options)
1772
-
1773
- promise = promise.then do |result|
1774
- http_response = result.response
1775
- status_code = http_response.status
1776
- response_content = http_response.body
1777
- unless status_code == 200
1778
- error_model = JSON.load(response_content)
1779
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1780
- end
1781
-
1782
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1783
- # Deserialize Response
1784
- if status_code == 200
1785
- begin
1786
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1787
- result_mapper = ManagedHostingEnvironmentCollection.mapper()
1788
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1789
- rescue Exception => e
1790
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1791
- end
1792
- end
1793
-
1794
- result
1795
- end
1796
-
1797
- promise.execute
1798
- end
1799
-
1800
- #
1801
- # Gets all mobile services for a subscription
1802
- #
1803
- # @param next_page_link [String] The NextLink from the previous successful
1804
- # call to List operation.
1805
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1806
- # will be added to the HTTP request.
1807
- #
1808
- # @return [ClassicMobileServiceCollection] operation results.
1809
- #
1810
- def get_all_classic_mobile_services_next(next_page_link, custom_headers = nil)
1811
- response = get_all_classic_mobile_services_next_async(next_page_link, custom_headers).value!
1812
- response.body unless response.nil?
1813
- end
1814
-
1815
- #
1816
- # Gets all mobile services for a subscription
1817
- #
1818
- # @param next_page_link [String] The NextLink from the previous successful
1819
- # call to List operation.
1820
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1821
- # will be added to the HTTP request.
1822
- #
1823
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1824
- #
1825
- def get_all_classic_mobile_services_next_with_http_info(next_page_link, custom_headers = nil)
1826
- get_all_classic_mobile_services_next_async(next_page_link, custom_headers).value!
1827
- end
1828
-
1829
- #
1830
- # Gets all mobile services for a subscription
1831
- #
1832
- # @param next_page_link [String] The NextLink from the previous successful
1833
- # call to List operation.
1834
- # @param [Hash{String => String}] A hash of custom headers that will be added
1835
- # to the HTTP request.
1836
- #
1837
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1838
- #
1839
- def get_all_classic_mobile_services_next_async(next_page_link, custom_headers = nil)
1840
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1841
-
1842
-
1843
- request_headers = {}
1844
-
1845
- # Set Headers
1846
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1847
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1848
- path_template = '{nextLink}'
1849
-
1850
- request_url = @base_url || @client.base_url
1851
-
1852
- options = {
1853
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1854
- skip_encoding_path_params: {'nextLink' => next_page_link},
1855
- headers: request_headers.merge(custom_headers || {}),
1856
- base_url: request_url
1857
- }
1858
- promise = @client.make_request_async(:get, path_template, options)
1859
-
1860
- promise = promise.then do |result|
1861
- http_response = result.response
1862
- status_code = http_response.status
1863
- response_content = http_response.body
1864
- unless status_code == 200
1865
- error_model = JSON.load(response_content)
1866
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1867
- end
1868
-
1869
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1870
- # Deserialize Response
1871
- if status_code == 200
1872
- begin
1873
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1874
- result_mapper = ClassicMobileServiceCollection.mapper()
1875
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1876
- rescue Exception => e
1877
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1878
- end
1879
- end
1880
-
1881
- result
1882
- end
1883
-
1884
- promise.execute
1885
- end
1886
-
1887
- end
1888
- end