azure_mgmt_network 0.18.9 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (621) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-05-01-preview/generated/azure_mgmt_network/network_management_client.rb +1 -1
  3. data/lib/2015-06-15/generated/azure_mgmt_network/network_management_client.rb +1 -1
  4. data/lib/2016-03-30/generated/azure_mgmt_network/network_management_client.rb +1 -1
  5. data/lib/2016-06-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  6. data/lib/2016-09-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  7. data/lib/2016-12-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  8. data/lib/2017-03-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  9. data/lib/2017-03-30/generated/azure_mgmt_network/models/subnet.rb +22 -0
  10. data/lib/2017-03-30/generated/azure_mgmt_network/network_management_client.rb +1 -1
  11. data/lib/2017-09-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  12. data/lib/2017-10-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  13. data/lib/2017-11-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  14. data/lib/2018-01-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  15. data/lib/2018-02-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  16. data/lib/2018-04-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  17. data/lib/2018-06-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  18. data/lib/2018-07-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  19. data/lib/2018-08-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  20. data/lib/2018-10-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  21. data/lib/2018-11-01/generated/azure_mgmt_network.rb +138 -142
  22. data/lib/2018-11-01/generated/azure_mgmt_network/network_management_client.rb +1 -5
  23. data/lib/2018-12-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  24. data/lib/2019-02-01/generated/azure_mgmt_network/network_management_client.rb +1 -1
  25. data/lib/2019-04-01/generated/azure_mgmt_network.rb +143 -140
  26. data/lib/2019-04-01/generated/azure_mgmt_network/available_private_endpoint_types.rb +213 -0
  27. data/lib/2019-04-01/generated/azure_mgmt_network/models/auto_approved_private_link_service.rb +46 -0
  28. data/lib/2019-04-01/generated/azure_mgmt_network/models/auto_approved_private_link_services_result.rb +101 -0
  29. data/lib/2019-04-01/generated/azure_mgmt_network/models/available_private_endpoint_type.rb +14 -3
  30. data/lib/2019-04-01/generated/azure_mgmt_network/models/bastion_host_ipconfiguration.rb +0 -1
  31. data/lib/2019-04-01/generated/azure_mgmt_network/models/check_private_link_service_visibility_request.rb +46 -0
  32. data/lib/2019-04-01/generated/azure_mgmt_network/models/private_link_service.rb +3 -3
  33. data/lib/2019-04-01/generated/azure_mgmt_network/models/private_link_service_visibility.rb +46 -0
  34. data/lib/2019-04-01/generated/azure_mgmt_network/models/subnet.rb +22 -0
  35. data/lib/2019-04-01/generated/azure_mgmt_network/network_management_client.rb +5 -10
  36. data/lib/2019-04-01/generated/azure_mgmt_network/private_link_services.rb +645 -1
  37. data/lib/2019-06-01/generated/azure_mgmt_network.rb +605 -0
  38. data/lib/2019-06-01/generated/azure_mgmt_network/application_gateways.rb +2276 -0
  39. data/lib/2019-06-01/generated/azure_mgmt_network/application_security_groups.rb +973 -0
  40. data/lib/2019-06-01/generated/azure_mgmt_network/available_delegations.rb +233 -0
  41. data/lib/2019-06-01/generated/azure_mgmt_network/available_endpoint_services.rb +226 -0
  42. data/lib/2019-06-01/generated/azure_mgmt_network/available_private_endpoint_types.rb +446 -0
  43. data/lib/{2019-04-01/generated/azure_mgmt_network/available_resource_group_private_endpoint_types.rb → 2019-06-01/generated/azure_mgmt_network/available_resource_group_delegations.rb} +25 -25
  44. data/lib/2019-06-01/generated/azure_mgmt_network/azure_firewall_fqdn_tags.rb +221 -0
  45. data/lib/2019-06-01/generated/azure_mgmt_network/azure_firewalls.rb +909 -0
  46. data/lib/2019-06-01/generated/azure_mgmt_network/bastion_hosts.rb +801 -0
  47. data/lib/{2018-11-01 → 2019-06-01}/generated/azure_mgmt_network/bgp_service_communities.rb +3 -3
  48. data/lib/2019-06-01/generated/azure_mgmt_network/connection_monitors.rb +987 -0
  49. data/lib/2019-06-01/generated/azure_mgmt_network/ddos_custom_policies.rb +558 -0
  50. data/lib/2019-06-01/generated/azure_mgmt_network/ddos_protection_plans.rb +973 -0
  51. data/lib/2019-06-01/generated/azure_mgmt_network/default_security_rules.rb +339 -0
  52. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +631 -0
  53. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_circuit_connections.rb +683 -0
  54. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_circuit_peerings.rb +626 -0
  55. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_circuits.rb +1603 -0
  56. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_connections.rb +534 -0
  57. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_cross_connection_peerings.rb +648 -0
  58. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_cross_connections.rb +1308 -0
  59. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_gateways.rb +601 -0
  60. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_links.rb +343 -0
  61. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_ports.rb +970 -0
  62. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_ports_locations.rb +331 -0
  63. data/lib/2019-06-01/generated/azure_mgmt_network/express_route_service_providers.rb +221 -0
  64. data/lib/2019-06-01/generated/azure_mgmt_network/hub_virtual_network_connections.rb +336 -0
  65. data/lib/2019-06-01/generated/azure_mgmt_network/inbound_nat_rules.rb +629 -0
  66. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb +332 -0
  67. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb +332 -0
  68. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb +329 -0
  69. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancer_network_interfaces.rb +231 -0
  70. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancer_outbound_rules.rb +329 -0
  71. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancer_probes.rb +329 -0
  72. data/lib/2019-06-01/generated/azure_mgmt_network/load_balancers.rb +958 -0
  73. data/lib/2019-06-01/generated/azure_mgmt_network/local_network_gateways.rb +781 -0
  74. data/lib/2019-06-01/generated/azure_mgmt_network/models/access.rb +16 -0
  75. data/lib/2019-06-01/generated/azure_mgmt_network/models/address_space.rb +56 -0
  76. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway.rb +593 -0
  77. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb +102 -0
  78. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_autoscale_configuration.rb +65 -0
  79. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_available_ssl_options.rb +159 -0
  80. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb +102 -0
  81. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb +57 -0
  82. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +57 -0
  83. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +131 -0
  84. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_health.rb +56 -0
  85. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb +70 -0
  86. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_health_on_demand.rb +61 -0
  87. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb +69 -0
  88. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb +83 -0
  89. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb +19 -0
  90. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +262 -0
  91. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_connection_draining.rb +64 -0
  92. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +16 -0
  93. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_custom_error.rb +60 -0
  94. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_custom_error_status_code.rb +16 -0
  95. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb +67 -0
  96. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_firewall_exclusion.rb +71 -0
  97. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb +16 -0
  98. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb +57 -0
  99. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb +79 -0
  100. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_firewall_rule_set.rb +141 -0
  101. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +139 -0
  102. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +101 -0
  103. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_header_configuration.rb +57 -0
  104. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +184 -0
  105. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +104 -0
  106. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_list_result.rb +99 -0
  107. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_on_demand_probe.rb +132 -0
  108. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_operational_state.rb +18 -0
  109. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +161 -0
  110. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_probe.rb +219 -0
  111. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb +68 -0
  112. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_protocol.rb +16 -0
  113. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_redirect_configuration.rb +199 -0
  114. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_redirect_type.rb +18 -0
  115. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +179 -0
  116. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +16 -0
  117. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_rewrite_rule.rb +93 -0
  118. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_rewrite_rule_action_set.rb +77 -0
  119. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_rewrite_rule_condition.rb +82 -0
  120. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_rewrite_rule_set.rb +102 -0
  121. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_sku.rb +71 -0
  122. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_sku_name.rb +21 -0
  123. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +138 -0
  124. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_cipher_suite.rb +42 -0
  125. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb +113 -0
  126. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_policy_name.rb +17 -0
  127. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_policy_type.rb +16 -0
  128. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_predefined_policy.rb +87 -0
  129. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb +17 -0
  130. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_tier.rb +18 -0
  131. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_trusted_root_certificate.rb +113 -0
  132. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +164 -0
  133. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb +180 -0
  134. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_security_group.rb +127 -0
  135. data/lib/2019-06-01/generated/azure_mgmt_network/models/application_security_group_list_result.rb +100 -0
  136. data/lib/2019-06-01/generated/azure_mgmt_network/models/association_type.rb +16 -0
  137. data/lib/2019-06-01/generated/azure_mgmt_network/models/authentication_method.rb +16 -0
  138. data/lib/2019-06-01/generated/azure_mgmt_network/models/authorization_list_result.rb +100 -0
  139. data/lib/2019-06-01/generated/azure_mgmt_network/models/authorization_use_status.rb +16 -0
  140. data/lib/2019-06-01/generated/azure_mgmt_network/models/auto_approved_private_link_service.rb +46 -0
  141. data/lib/2019-06-01/generated/azure_mgmt_network/models/auto_approved_private_link_services_result.rb +101 -0
  142. data/lib/2019-06-01/generated/azure_mgmt_network/models/availability.rb +68 -0
  143. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_delegation.rb +101 -0
  144. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_delegations_result.rb +99 -0
  145. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_private_endpoint_type.rb +80 -0
  146. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_private_endpoint_types_result.rb +100 -0
  147. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_providers_list.rb +56 -0
  148. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_providers_list_city.rb +65 -0
  149. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_providers_list_country.rb +86 -0
  150. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_providers_list_parameters.rb +88 -0
  151. data/lib/2019-06-01/generated/azure_mgmt_network/models/available_providers_list_state.rb +86 -0
  152. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_async_operation_result.rb +67 -0
  153. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall.rb +226 -0
  154. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_application_rule.rb +135 -0
  155. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_application_rule_collection.rb +128 -0
  156. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_application_rule_protocol.rb +63 -0
  157. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_application_rule_protocol_type.rb +16 -0
  158. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_fqdn_tag.rb +122 -0
  159. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_fqdn_tag_list_result.rb +99 -0
  160. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_ipconfiguration.rb +119 -0
  161. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_list_result.rb +99 -0
  162. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_nat_rcaction.rb +47 -0
  163. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_nat_rcaction_type.rb +16 -0
  164. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_nat_rule.rb +157 -0
  165. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_nat_rule_collection.rb +129 -0
  166. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_network_rule.rb +134 -0
  167. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_network_rule_collection.rb +128 -0
  168. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_network_rule_protocol.rb +18 -0
  169. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_rcaction.rb +47 -0
  170. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_rcaction_type.rb +16 -0
  171. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_firewall_threat_intel_mode.rb +17 -0
  172. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_reachability_report.rb +81 -0
  173. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_reachability_report_item.rb +78 -0
  174. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_reachability_report_latency_info.rb +62 -0
  175. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_reachability_report_location.rb +68 -0
  176. data/lib/2019-06-01/generated/azure_mgmt_network/models/azure_reachability_report_parameters.rb +108 -0
  177. data/lib/2019-06-01/generated/azure_mgmt_network/models/backend_address_pool.rb +172 -0
  178. data/lib/2019-06-01/generated/azure_mgmt_network/models/bastion_host.rb +143 -0
  179. data/lib/2019-06-01/generated/azure_mgmt_network/models/bastion_host_ipconfiguration.rb +128 -0
  180. data/lib/2019-06-01/generated/azure_mgmt_network/models/bastion_host_list_result.rb +98 -0
  181. data/lib/2019-06-01/generated/azure_mgmt_network/models/bgp_peer_state.rb +19 -0
  182. data/lib/2019-06-01/generated/azure_mgmt_network/models/bgp_peer_status.rb +132 -0
  183. data/lib/2019-06-01/generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb +55 -0
  184. data/lib/{2018-11-01 → 2019-06-01}/generated/azure_mgmt_network/models/bgp_service_community.rb +1 -1
  185. data/lib/{2018-11-01 → 2019-06-01}/generated/azure_mgmt_network/models/bgp_service_community_list_result.rb +1 -1
  186. data/lib/2019-06-01/generated/azure_mgmt_network/models/bgp_settings.rb +70 -0
  187. data/lib/{2018-11-01 → 2019-06-01}/generated/azure_mgmt_network/models/bgpcommunity.rb +1 -1
  188. data/lib/2019-06-01/generated/azure_mgmt_network/models/check_private_link_service_visibility_request.rb +46 -0
  189. data/lib/2019-06-01/generated/azure_mgmt_network/models/circuit_connection_status.rb +17 -0
  190. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor.rb +116 -0
  191. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_destination.rb +70 -0
  192. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_list_result.rb +56 -0
  193. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_parameters.rb +86 -0
  194. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_query_result.rb +68 -0
  195. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_result.rb +202 -0
  196. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_source.rb +58 -0
  197. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_monitor_source_status.rb +17 -0
  198. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +51 -0
  199. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_shared_key.rb +54 -0
  200. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_state.rb +17 -0
  201. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_state_snapshot.rb +158 -0
  202. data/lib/2019-06-01/generated/azure_mgmt_network/models/connection_status.rb +18 -0
  203. data/lib/2019-06-01/generated/azure_mgmt_network/models/connectivity_destination.rb +70 -0
  204. data/lib/2019-06-01/generated/azure_mgmt_network/models/connectivity_hop.rb +124 -0
  205. data/lib/2019-06-01/generated/azure_mgmt_network/models/connectivity_information.rb +130 -0
  206. data/lib/2019-06-01/generated/azure_mgmt_network/models/connectivity_issue.rb +106 -0
  207. data/lib/2019-06-01/generated/azure_mgmt_network/models/connectivity_parameters.rb +84 -0
  208. data/lib/2019-06-01/generated/azure_mgmt_network/models/connectivity_source.rb +59 -0
  209. data/lib/2019-06-01/generated/azure_mgmt_network/models/container.rb +43 -0
  210. data/lib/2019-06-01/generated/azure_mgmt_network/models/container_network_interface.rb +139 -0
  211. data/lib/2019-06-01/generated/azure_mgmt_network/models/container_network_interface_configuration.rb +133 -0
  212. data/lib/2019-06-01/generated/azure_mgmt_network/models/container_network_interface_ip_configuration.rb +83 -0
  213. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_custom_policy.rb +170 -0
  214. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_custom_policy_protocol.rb +17 -0
  215. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_custom_policy_trigger_sensitivity_override.rb +18 -0
  216. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_protection_plan.rb +165 -0
  217. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_protection_plan_list_result.rb +99 -0
  218. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_settings.rb +61 -0
  219. data/lib/2019-06-01/generated/azure_mgmt_network/models/ddos_settings_protection_coverage.rb +16 -0
  220. data/lib/2019-06-01/generated/azure_mgmt_network/models/delegation.rb +111 -0
  221. data/lib/2019-06-01/generated/azure_mgmt_network/models/device_properties.rb +68 -0
  222. data/lib/2019-06-01/generated/azure_mgmt_network/models/dh_group.rb +22 -0
  223. data/lib/2019-06-01/generated/azure_mgmt_network/models/dhcp_options.rb +56 -0
  224. data/lib/2019-06-01/generated/azure_mgmt_network/models/dimension.rb +68 -0
  225. data/lib/2019-06-01/generated/azure_mgmt_network/models/direction.rb +16 -0
  226. data/lib/2019-06-01/generated/azure_mgmt_network/models/dns_name_availability_result.rb +46 -0
  227. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_network_security_group.rb +109 -0
  228. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_network_security_group_association.rb +59 -0
  229. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +68 -0
  230. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_network_security_rule.rb +260 -0
  231. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_route.rb +135 -0
  232. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_route_list_result.rb +67 -0
  233. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_route_source.rb +18 -0
  234. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_route_state.rb +16 -0
  235. data/lib/2019-06-01/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb +17 -0
  236. data/lib/2019-06-01/generated/azure_mgmt_network/models/endpoint_service_result.rb +67 -0
  237. data/lib/2019-06-01/generated/azure_mgmt_network/models/endpoint_services_list_result.rb +99 -0
  238. data/lib/2019-06-01/generated/azure_mgmt_network/models/error.rb +99 -0
  239. data/lib/2019-06-01/generated/azure_mgmt_network/models/error_details.rb +68 -0
  240. data/lib/2019-06-01/generated/azure_mgmt_network/models/error_response.rb +47 -0
  241. data/lib/2019-06-01/generated/azure_mgmt_network/models/evaluated_network_security_group.rb +92 -0
  242. data/lib/2019-06-01/generated/azure_mgmt_network/models/evaluation_state.rb +17 -0
  243. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit.rb +294 -0
  244. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb +79 -0
  245. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +115 -0
  246. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_connection.rb +156 -0
  247. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_connection_list_result.rb +101 -0
  248. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb +99 -0
  249. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +338 -0
  250. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +18 -0
  251. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb +121 -0
  252. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_peering_id.rb +46 -0
  253. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +100 -0
  254. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb +16 -0
  255. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_reference.rb +46 -0
  256. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb +91 -0
  257. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +93 -0
  258. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +69 -0
  259. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_sku.rb +70 -0
  260. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb +16 -0
  261. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +18 -0
  262. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuit_stats.rb +79 -0
  263. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +67 -0
  264. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +69 -0
  265. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +69 -0
  266. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_connection.rb +101 -0
  267. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_connection_id.rb +47 -0
  268. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_connection_list.rb +56 -0
  269. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_cross_connection.rb +228 -0
  270. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_cross_connection_list_result.rb +100 -0
  271. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_cross_connection_peering.rb +250 -0
  272. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_cross_connection_peering_list.rb +102 -0
  273. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_cross_connection_routes_table_summary.rb +83 -0
  274. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_cross_connections_routes_table_summary_list_result.rb +70 -0
  275. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_gateway.rb +158 -0
  276. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_gateway_list.rb +55 -0
  277. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_gateway_properties_auto_scale_configuration.rb +49 -0
  278. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_gateway_properties_auto_scale_configuration_bounds.rb +60 -0
  279. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_link.rb +157 -0
  280. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_link_admin_state.rb +16 -0
  281. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_link_connector_type.rb +16 -0
  282. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_link_list_result.rb +99 -0
  283. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_peering_state.rb +16 -0
  284. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_peering_type.rb +17 -0
  285. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_port.rb +254 -0
  286. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_port_list_result.rb +98 -0
  287. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_ports_encapsulation.rb +16 -0
  288. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_ports_location.rb +146 -0
  289. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_ports_location_bandwidths.rb +61 -0
  290. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_ports_location_list_result.rb +99 -0
  291. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_service_provider.rb +136 -0
  292. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +58 -0
  293. data/lib/2019-06-01/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb +99 -0
  294. data/lib/2019-06-01/generated/azure_mgmt_network/models/flow_log_format_parameters.rb +60 -0
  295. data/lib/2019-06-01/generated/azure_mgmt_network/models/flow_log_format_type.rb +15 -0
  296. data/lib/2019-06-01/generated/azure_mgmt_network/models/flow_log_information.rb +110 -0
  297. data/lib/2019-06-01/generated/azure_mgmt_network/models/flow_log_status_parameters.rb +48 -0
  298. data/lib/2019-06-01/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb +272 -0
  299. data/lib/2019-06-01/generated/azure_mgmt_network/models/gateway_route.rb +119 -0
  300. data/lib/2019-06-01/generated/azure_mgmt_network/models/gateway_route_list_result.rb +55 -0
  301. data/lib/2019-06-01/generated/azure_mgmt_network/models/get_vpn_sites_configuration_request.rb +67 -0
  302. data/lib/2019-06-01/generated/azure_mgmt_network/models/httpconfiguration.rb +85 -0
  303. data/lib/2019-06-01/generated/azure_mgmt_network/models/httpheader.rb +57 -0
  304. data/lib/2019-06-01/generated/azure_mgmt_network/models/httpmethod.rb +15 -0
  305. data/lib/2019-06-01/generated/azure_mgmt_network/models/hub_virtual_network_connection.rb +125 -0
  306. data/lib/2019-06-01/generated/azure_mgmt_network/models/hub_virtual_network_connection_status.rb +18 -0
  307. data/lib/2019-06-01/generated/azure_mgmt_network/models/ike_encryption.rb +21 -0
  308. data/lib/2019-06-01/generated/azure_mgmt_network/models/ike_integrity.rb +20 -0
  309. data/lib/2019-06-01/generated/azure_mgmt_network/models/inbound_nat_pool.rb +196 -0
  310. data/lib/2019-06-01/generated/azure_mgmt_network/models/inbound_nat_rule.rb +199 -0
  311. data/lib/2019-06-01/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb +100 -0
  312. data/lib/2019-06-01/generated/azure_mgmt_network/models/ip_flow_protocol.rb +16 -0
  313. data/lib/2019-06-01/generated/azure_mgmt_network/models/ip_tag.rb +58 -0
  314. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipaddress_availability_result.rb +66 -0
  315. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipallocation_method.rb +16 -0
  316. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipconfiguration.rb +126 -0
  317. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipconfiguration_profile.rb +104 -0
  318. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipsec_encryption.rb +23 -0
  319. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipsec_integrity.rb +20 -0
  320. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipsec_policy.rb +137 -0
  321. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb +94 -0
  322. data/lib/2019-06-01/generated/azure_mgmt_network/models/ipversion.rb +16 -0
  323. data/lib/2019-06-01/generated/azure_mgmt_network/models/issue_type.rb +23 -0
  324. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_hub_virtual_network_connections_result.rb +102 -0
  325. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_p2svpn_gateways_result.rb +100 -0
  326. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_p2svpn_server_configurations_result.rb +102 -0
  327. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_virtual_hubs_result.rb +100 -0
  328. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_virtual_wans_result.rb +100 -0
  329. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_vpn_connections_result.rb +101 -0
  330. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_vpn_gateways_result.rb +100 -0
  331. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_vpn_site_link_connections_result.rb +101 -0
  332. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_vpn_site_links_result.rb +100 -0
  333. data/lib/2019-06-01/generated/azure_mgmt_network/models/list_vpn_sites_result.rb +100 -0
  334. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer.rb +290 -0
  335. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb +101 -0
  336. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb +102 -0
  337. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_list_result.rb +100 -0
  338. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb +101 -0
  339. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_outbound_rule_list_result.rb +100 -0
  340. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_outbound_rule_protocol.rb +17 -0
  341. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb +99 -0
  342. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_sku.rb +47 -0
  343. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancer_sku_name.rb +16 -0
  344. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_balancing_rule.rb +235 -0
  345. data/lib/2019-06-01/generated/azure_mgmt_network/models/load_distribution.rb +17 -0
  346. data/lib/2019-06-01/generated/azure_mgmt_network/models/local_network_gateway.rb +157 -0
  347. data/lib/2019-06-01/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +100 -0
  348. data/lib/2019-06-01/generated/azure_mgmt_network/models/log_specification.rb +68 -0
  349. data/lib/2019-06-01/generated/azure_mgmt_network/models/managed_service_identity.rb +102 -0
  350. data/lib/2019-06-01/generated/azure_mgmt_network/models/managed_service_identity_user_assigned_identities_value.rb +61 -0
  351. data/lib/2019-06-01/generated/azure_mgmt_network/models/match_condition.rb +118 -0
  352. data/lib/2019-06-01/generated/azure_mgmt_network/models/match_variable.rb +60 -0
  353. data/lib/2019-06-01/generated/azure_mgmt_network/models/matched_rule.rb +58 -0
  354. data/lib/2019-06-01/generated/azure_mgmt_network/models/metric_specification.rb +207 -0
  355. data/lib/2019-06-01/generated/azure_mgmt_network/models/nat_gateway.rb +228 -0
  356. data/lib/2019-06-01/generated/azure_mgmt_network/models/nat_gateway_list_result.rb +99 -0
  357. data/lib/2019-06-01/generated/azure_mgmt_network/models/nat_gateway_sku.rb +47 -0
  358. data/lib/2019-06-01/generated/azure_mgmt_network/models/nat_gateway_sku_name.rb +15 -0
  359. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_configuration_diagnostic_parameters.rb +81 -0
  360. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_configuration_diagnostic_profile.rb +95 -0
  361. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_configuration_diagnostic_response.rb +57 -0
  362. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_configuration_diagnostic_result.rb +61 -0
  363. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_intent_policy.rb +97 -0
  364. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_intent_policy_configuration.rb +60 -0
  365. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface.rb +284 -0
  366. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_association.rb +67 -0
  367. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_dns_settings.rb +117 -0
  368. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +258 -0
  369. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb +102 -0
  370. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_list_result.rb +100 -0
  371. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb +100 -0
  372. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_tap_configuration.rb +106 -0
  373. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_interface_tap_configuration_list_result.rb +102 -0
  374. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_operation_status.rb +17 -0
  375. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_profile.rb +164 -0
  376. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_profile_list_result.rb +99 -0
  377. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_security_group.rb +206 -0
  378. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_security_group_list_result.rb +99 -0
  379. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_security_group_result.rb +70 -0
  380. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_security_rules_evaluation_result.rb +101 -0
  381. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_watcher.rb +109 -0
  382. data/lib/2019-06-01/generated/azure_mgmt_network/models/network_watcher_list_result.rb +55 -0
  383. data/lib/2019-06-01/generated/azure_mgmt_network/models/next_hop_parameters.rb +82 -0
  384. data/lib/2019-06-01/generated/azure_mgmt_network/models/next_hop_result.rb +73 -0
  385. data/lib/2019-06-01/generated/azure_mgmt_network/models/next_hop_type.rb +20 -0
  386. data/lib/2019-06-01/generated/azure_mgmt_network/models/office_traffic_category.rb +18 -0
  387. data/lib/2019-06-01/generated/azure_mgmt_network/models/operation.rb +83 -0
  388. data/lib/2019-06-01/generated/azure_mgmt_network/models/operation_display.rb +79 -0
  389. data/lib/2019-06-01/generated/azure_mgmt_network/models/operation_list_result.rb +101 -0
  390. data/lib/2019-06-01/generated/azure_mgmt_network/models/operation_properties_format_service_specification.rb +76 -0
  391. data/lib/2019-06-01/generated/azure_mgmt_network/models/origin.rb +17 -0
  392. data/lib/2019-06-01/generated/azure_mgmt_network/models/outbound_rule.rb +174 -0
  393. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_gateway.rb +187 -0
  394. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_profile_parameters.rb +47 -0
  395. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_server_config_radius_client_root_certificate.rb +93 -0
  396. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_server_config_radius_server_root_certificate.rb +93 -0
  397. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_server_config_vpn_client_revoked_certificate.rb +93 -0
  398. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_server_config_vpn_client_root_certificate.rb +93 -0
  399. data/lib/2019-06-01/generated/azure_mgmt_network/models/p2svpn_server_configuration.rb +277 -0
  400. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture.rb +119 -0
  401. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture_filter.rb +107 -0
  402. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture_list_result.rb +56 -0
  403. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture_parameters.rb +119 -0
  404. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture_query_status_result.rb +111 -0
  405. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture_result.rb +170 -0
  406. data/lib/2019-06-01/generated/azure_mgmt_network/models/packet_capture_storage_location.rb +74 -0
  407. data/lib/2019-06-01/generated/azure_mgmt_network/models/patch_route_filter.rb +176 -0
  408. data/lib/2019-06-01/generated/azure_mgmt_network/models/patch_route_filter_rule.rb +128 -0
  409. data/lib/2019-06-01/generated/azure_mgmt_network/models/pc_error.rb +19 -0
  410. data/lib/2019-06-01/generated/azure_mgmt_network/models/pc_protocol.rb +17 -0
  411. data/lib/2019-06-01/generated/azure_mgmt_network/models/pc_status.rb +19 -0
  412. data/lib/2019-06-01/generated/azure_mgmt_network/models/peer_express_route_circuit_connection.rb +170 -0
  413. data/lib/2019-06-01/generated/azure_mgmt_network/models/peer_express_route_circuit_connection_list_result.rb +104 -0
  414. data/lib/2019-06-01/generated/azure_mgmt_network/models/pfs_group.rb +23 -0
  415. data/lib/2019-06-01/generated/azure_mgmt_network/models/policy_settings.rb +61 -0
  416. data/lib/2019-06-01/generated/azure_mgmt_network/models/prepare_network_policies_request.rb +68 -0
  417. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_endpoint.rb +189 -0
  418. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_endpoint_connection.rb +81 -0
  419. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_endpoint_list_result.rb +100 -0
  420. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service.rb +252 -0
  421. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_connection.rb +111 -0
  422. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_connection_state.rb +71 -0
  423. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_ip_configuration.rb +118 -0
  424. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_list_result.rb +100 -0
  425. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_properties_auto_approval.rb +51 -0
  426. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_properties_visibility.rb +51 -0
  427. data/lib/2019-06-01/generated/azure_mgmt_network/models/private_link_service_visibility.rb +46 -0
  428. data/lib/2019-06-01/generated/azure_mgmt_network/models/probe.rb +183 -0
  429. data/lib/2019-06-01/generated/azure_mgmt_network/models/probe_protocol.rb +17 -0
  430. data/lib/2019-06-01/generated/azure_mgmt_network/models/processor_architecture.rb +16 -0
  431. data/lib/2019-06-01/generated/azure_mgmt_network/models/protocol.rb +18 -0
  432. data/lib/2019-06-01/generated/azure_mgmt_network/models/protocol_configuration.rb +48 -0
  433. data/lib/2019-06-01/generated/azure_mgmt_network/models/protocol_custom_settings_format.rb +87 -0
  434. data/lib/2019-06-01/generated/azure_mgmt_network/models/provisioning_state.rb +18 -0
  435. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipaddress.rb +273 -0
  436. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +77 -0
  437. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb +99 -0
  438. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipaddress_sku.rb +47 -0
  439. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb +16 -0
  440. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipprefix.rb +229 -0
  441. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipprefix_list_result.rb +99 -0
  442. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipprefix_sku.rb +47 -0
  443. data/lib/2019-06-01/generated/azure_mgmt_network/models/public_ipprefix_sku_name.rb +15 -0
  444. data/lib/2019-06-01/generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb +47 -0
  445. data/lib/2019-06-01/generated/azure_mgmt_network/models/referenced_public_ip_address.rb +46 -0
  446. data/lib/2019-06-01/generated/azure_mgmt_network/models/resource.rb +109 -0
  447. data/lib/2019-06-01/generated/azure_mgmt_network/models/resource_identity_type.rb +18 -0
  448. data/lib/2019-06-01/generated/azure_mgmt_network/models/resource_navigation_link.rb +115 -0
  449. data/lib/2019-06-01/generated/azure_mgmt_network/models/resource_navigation_links_list_result.rb +68 -0
  450. data/lib/2019-06-01/generated/azure_mgmt_network/models/resource_set.rb +54 -0
  451. data/lib/2019-06-01/generated/azure_mgmt_network/models/retention_policy_parameters.rb +61 -0
  452. data/lib/2019-06-01/generated/azure_mgmt_network/models/route.rb +116 -0
  453. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_filter.rb +174 -0
  454. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_filter_list_result.rb +99 -0
  455. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_filter_rule.rb +138 -0
  456. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_filter_rule_list_result.rb +99 -0
  457. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_list_result.rb +98 -0
  458. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_next_hop_type.rb +19 -0
  459. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_table.rb +163 -0
  460. data/lib/2019-06-01/generated/azure_mgmt_network/models/route_table_list_result.rb +99 -0
  461. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_group_network_interface.rb +59 -0
  462. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_group_view_parameters.rb +46 -0
  463. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_group_view_result.rb +56 -0
  464. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_rule.rb +312 -0
  465. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_rule_access.rb +16 -0
  466. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_rule_associations.rb +102 -0
  467. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_rule_direction.rb +16 -0
  468. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_rule_list_result.rb +100 -0
  469. data/lib/2019-06-01/generated/azure_mgmt_network/models/security_rule_protocol.rb +19 -0
  470. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_association_link.rb +144 -0
  471. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_association_links_list_result.rb +68 -0
  472. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_endpoint_policy.rb +165 -0
  473. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_endpoint_policy_definition.rb +121 -0
  474. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_endpoint_policy_definition_list_result.rb +103 -0
  475. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_endpoint_policy_list_result.rb +100 -0
  476. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_endpoint_properties_format.rb +76 -0
  477. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb +18 -0
  478. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_tag_information.rb +73 -0
  479. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_tag_information_properties_format.rb +91 -0
  480. data/lib/2019-06-01/generated/azure_mgmt_network/models/service_tags_list_result.rb +117 -0
  481. data/lib/2019-06-01/generated/azure_mgmt_network/models/severity.rb +16 -0
  482. data/lib/2019-06-01/generated/azure_mgmt_network/models/sub_resource.rb +46 -0
  483. data/lib/2019-06-01/generated/azure_mgmt_network/models/subnet.rb +353 -0
  484. data/lib/2019-06-01/generated/azure_mgmt_network/models/subnet_association.rb +67 -0
  485. data/lib/2019-06-01/generated/azure_mgmt_network/models/subnet_list_result.rb +99 -0
  486. data/lib/2019-06-01/generated/azure_mgmt_network/models/tags_object.rb +54 -0
  487. data/lib/2019-06-01/generated/azure_mgmt_network/models/topology.rb +92 -0
  488. data/lib/2019-06-01/generated/azure_mgmt_network/models/topology_association.rb +71 -0
  489. data/lib/2019-06-01/generated/azure_mgmt_network/models/topology_parameters.rb +71 -0
  490. data/lib/2019-06-01/generated/azure_mgmt_network/models/topology_resource.rb +89 -0
  491. data/lib/2019-06-01/generated/azure_mgmt_network/models/traffic_analytics_configuration_properties.rb +91 -0
  492. data/lib/2019-06-01/generated/azure_mgmt_network/models/traffic_analytics_properties.rb +48 -0
  493. data/lib/2019-06-01/generated/azure_mgmt_network/models/transport_protocol.rb +17 -0
  494. data/lib/2019-06-01/generated/azure_mgmt_network/models/troubleshooting_details.rb +100 -0
  495. data/lib/2019-06-01/generated/azure_mgmt_network/models/troubleshooting_parameters.rb +70 -0
  496. data/lib/2019-06-01/generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb +81 -0
  497. data/lib/2019-06-01/generated/azure_mgmt_network/models/troubleshooting_result.rb +89 -0
  498. data/lib/2019-06-01/generated/azure_mgmt_network/models/tunnel_connection_health.rb +98 -0
  499. data/lib/2019-06-01/generated/azure_mgmt_network/models/tunnel_connection_status.rb +18 -0
  500. data/lib/2019-06-01/generated/azure_mgmt_network/models/usage.rb +95 -0
  501. data/lib/2019-06-01/generated/azure_mgmt_network/models/usage_name.rb +57 -0
  502. data/lib/2019-06-01/generated/azure_mgmt_network/models/usages_list_result.rb +98 -0
  503. data/lib/2019-06-01/generated/azure_mgmt_network/models/verbosity_level.rb +17 -0
  504. data/lib/2019-06-01/generated/azure_mgmt_network/models/verification_ipflow_parameters.rb +133 -0
  505. data/lib/2019-06-01/generated/azure_mgmt_network/models/verification_ipflow_result.rb +59 -0
  506. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_hub.rb +205 -0
  507. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_hub_id.rb +48 -0
  508. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_hub_route.rb +65 -0
  509. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_hub_route_table.rb +55 -0
  510. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network.rb +228 -0
  511. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb +47 -0
  512. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway.rb +258 -0
  513. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +346 -0
  514. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb +347 -0
  515. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +103 -0
  516. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_connection_protocol.rb +16 -0
  517. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +18 -0
  518. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +18 -0
  519. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +116 -0
  520. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb +104 -0
  521. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +100 -0
  522. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb +74 -0
  523. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +27 -0
  524. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +27 -0
  525. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb +16 -0
  526. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_list_result.rb +99 -0
  527. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb +99 -0
  528. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_peering.rb +171 -0
  529. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb +100 -0
  530. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_peering_state.rb +17 -0
  531. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_tap.rb +183 -0
  532. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_tap_list_result.rb +99 -0
  533. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_usage.rb +97 -0
  534. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_network_usage_name.rb +59 -0
  535. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_wan.rb +229 -0
  536. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_wan_security_provider.rb +69 -0
  537. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_wan_security_provider_type.rb +16 -0
  538. data/lib/2019-06-01/generated/azure_mgmt_network/models/virtual_wan_security_providers.rb +56 -0
  539. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_configuration.rb +191 -0
  540. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_connection_health.rb +93 -0
  541. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_connection_health_detail.rb +179 -0
  542. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_connection_health_detail_list_result.rb +57 -0
  543. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_ipsec_parameters.rb +137 -0
  544. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_parameters.rb +94 -0
  545. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_protocol.rb +17 -0
  546. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +92 -0
  547. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb +92 -0
  548. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_connection.rb +270 -0
  549. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_connection_status.rb +18 -0
  550. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_device_script_parameters.rb +68 -0
  551. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_gateway.rb +166 -0
  552. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_gateway_tunneling_protocol.rb +16 -0
  553. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_link_bgp_settings.rb +58 -0
  554. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_link_provider_properties.rb +57 -0
  555. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_profile_response.rb +46 -0
  556. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_site.rb +212 -0
  557. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_site_id.rb +48 -0
  558. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_site_link.rb +127 -0
  559. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_site_link_connection.rb +250 -0
  560. data/lib/2019-06-01/generated/azure_mgmt_network/models/vpn_type.rb +16 -0
  561. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_action.rb +17 -0
  562. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_custom_rule.rb +119 -0
  563. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_enabled_state.rb +16 -0
  564. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_match_variable.rb +22 -0
  565. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_mode.rb +16 -0
  566. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_operator.rb +24 -0
  567. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_policy.rb +179 -0
  568. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_policy_list_result.rb +105 -0
  569. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_policy_resource_state.rb +20 -0
  570. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_rule_type.rb +16 -0
  571. data/lib/2019-06-01/generated/azure_mgmt_network/models/web_application_firewall_transform.rb +20 -0
  572. data/lib/2019-06-01/generated/azure_mgmt_network/module_definition.rb +9 -0
  573. data/lib/2019-06-01/generated/azure_mgmt_network/nat_gateways.rb +922 -0
  574. data/lib/2019-06-01/generated/azure_mgmt_network/network_interface_ipconfigurations.rb +329 -0
  575. data/lib/2019-06-01/generated/azure_mgmt_network/network_interface_load_balancers.rb +231 -0
  576. data/lib/2019-06-01/generated/azure_mgmt_network/network_interface_tap_configurations.rb +626 -0
  577. data/lib/2019-06-01/generated/azure_mgmt_network/network_interfaces.rb +1230 -0
  578. data/lib/2019-06-01/generated/azure_mgmt_network/network_management_client.rb +663 -0
  579. data/lib/2019-06-01/generated/azure_mgmt_network/network_profiles.rb +732 -0
  580. data/lib/2019-06-01/generated/azure_mgmt_network/network_security_groups.rb +976 -0
  581. data/lib/2019-06-01/generated/azure_mgmt_network/network_watchers.rb +2634 -0
  582. data/lib/2019-06-01/generated/azure_mgmt_network/operations.rb +219 -0
  583. data/lib/2019-06-01/generated/azure_mgmt_network/p2s_vpn_gateways.rb +1289 -0
  584. data/lib/2019-06-01/generated/azure_mgmt_network/p2s_vpn_server_configurations.rb +660 -0
  585. data/lib/2019-06-01/generated/azure_mgmt_network/packet_captures.rb +796 -0
  586. data/lib/2019-06-01/generated/azure_mgmt_network/peer_express_route_circuit_connections.rb +351 -0
  587. data/lib/2019-06-01/generated/azure_mgmt_network/private_endpoints.rb +804 -0
  588. data/lib/2019-06-01/generated/azure_mgmt_network/private_link_services.rb +1691 -0
  589. data/lib/2019-06-01/generated/azure_mgmt_network/public_ipaddresses.rb +958 -0
  590. data/lib/2019-06-01/generated/azure_mgmt_network/public_ipprefixes.rb +958 -0
  591. data/lib/2019-06-01/generated/azure_mgmt_network/resource_navigation_links.rb +123 -0
  592. data/lib/2019-06-01/generated/azure_mgmt_network/route_filter_rules.rb +786 -0
  593. data/lib/2019-06-01/generated/azure_mgmt_network/route_filters.rb +961 -0
  594. data/lib/2019-06-01/generated/azure_mgmt_network/route_tables.rb +958 -0
  595. data/lib/2019-06-01/generated/azure_mgmt_network/routes.rb +625 -0
  596. data/lib/2019-06-01/generated/azure_mgmt_network/security_rules.rb +643 -0
  597. data/lib/2019-06-01/generated/azure_mgmt_network/service_association_links.rb +123 -0
  598. data/lib/2019-06-01/generated/azure_mgmt_network/service_endpoint_policies.rb +976 -0
  599. data/lib/2019-06-01/generated/azure_mgmt_network/service_endpoint_policy_definitions.rb +668 -0
  600. data/lib/2019-06-01/generated/azure_mgmt_network/service_tags.rb +115 -0
  601. data/lib/2019-06-01/generated/azure_mgmt_network/subnets.rb +779 -0
  602. data/lib/2019-06-01/generated/azure_mgmt_network/usages.rb +227 -0
  603. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_hubs.rb +991 -0
  604. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +1249 -0
  605. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_network_gateways.rb +2922 -0
  606. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_network_peerings.rb +634 -0
  607. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_network_taps.rb +955 -0
  608. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_networks.rb +1262 -0
  609. data/lib/2019-06-01/generated/azure_mgmt_network/virtual_wans.rb +996 -0
  610. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_connections.rb +647 -0
  611. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_gateways.rb +1132 -0
  612. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_link_connections.rb +247 -0
  613. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_site_link_connections.rb +130 -0
  614. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_site_links.rb +332 -0
  615. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_sites.rb +974 -0
  616. data/lib/2019-06-01/generated/azure_mgmt_network/vpn_sites_configuration.rb +173 -0
  617. data/lib/2019-06-01/generated/azure_mgmt_network/web_application_firewall_policies.rb +758 -0
  618. data/lib/azure_mgmt_network.rb +18 -17
  619. data/lib/profiles/latest/modules/network_profile_module.rb +1267 -1223
  620. data/lib/version.rb +1 -1
  621. metadata +588 -8
@@ -0,0 +1,2922 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Network::Mgmt::V2019_06_01
7
+ #
8
+ # VirtualNetworkGateways
9
+ #
10
+ class VirtualNetworkGateways
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualNetworkGateways class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [NetworkManagementClient] reference to the NetworkManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Creates or updates a virtual network gateway in the specified resource group.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param virtual_network_gateway_name [String] The name of the virtual network
29
+ # gateway.
30
+ # @param parameters [VirtualNetworkGateway] Parameters supplied to create or
31
+ # update virtual network gateway operation.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [VirtualNetworkGateway] operation results.
36
+ #
37
+ def create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
38
+ response = create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group.
44
+ # @param virtual_network_gateway_name [String] The name of the virtual network
45
+ # gateway.
46
+ # @param parameters [VirtualNetworkGateway] Parameters supplied to create or
47
+ # update virtual network gateway operation.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [Concurrent::Promise] promise which provides async access to http
52
+ # response.
53
+ #
54
+ def create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
55
+ # Send request
56
+ promise = begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers)
57
+
58
+ promise = promise.then do |response|
59
+ # Defining deserialization method.
60
+ deserialize_method = lambda do |parsed_response|
61
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
62
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
63
+ end
64
+
65
+ # Waiting for response.
66
+ @client.get_long_running_operation_result(response, deserialize_method)
67
+ end
68
+
69
+ promise
70
+ end
71
+
72
+ #
73
+ # Gets the specified virtual network gateway by resource group.
74
+ #
75
+ # @param resource_group_name [String] The name of the resource group.
76
+ # @param virtual_network_gateway_name [String] The name of the virtual network
77
+ # gateway.
78
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
79
+ # will be added to the HTTP request.
80
+ #
81
+ # @return [VirtualNetworkGateway] operation results.
82
+ #
83
+ def get(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
84
+ response = get_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
85
+ response.body unless response.nil?
86
+ end
87
+
88
+ #
89
+ # Gets the specified virtual network gateway by resource group.
90
+ #
91
+ # @param resource_group_name [String] The name of the resource group.
92
+ # @param virtual_network_gateway_name [String] The name of the virtual network
93
+ # gateway.
94
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
95
+ # will be added to the HTTP request.
96
+ #
97
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
98
+ #
99
+ def get_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
100
+ get_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
101
+ end
102
+
103
+ #
104
+ # Gets the specified virtual network gateway by resource group.
105
+ #
106
+ # @param resource_group_name [String] The name of the resource group.
107
+ # @param virtual_network_gateway_name [String] The name of the virtual network
108
+ # gateway.
109
+ # @param [Hash{String => String}] A hash of custom headers that will be added
110
+ # to the HTTP request.
111
+ #
112
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
113
+ #
114
+ def get_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
115
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
116
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
117
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
118
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
119
+
120
+
121
+ request_headers = {}
122
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
123
+
124
+ # Set Headers
125
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
126
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
127
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
128
+
129
+ request_url = @base_url || @client.base_url
130
+
131
+ options = {
132
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
133
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
134
+ query_params: {'api-version' => @client.api_version},
135
+ headers: request_headers.merge(custom_headers || {}),
136
+ base_url: request_url
137
+ }
138
+ promise = @client.make_request_async(:get, path_template, options)
139
+
140
+ promise = promise.then do |result|
141
+ http_response = result.response
142
+ status_code = http_response.status
143
+ response_content = http_response.body
144
+ unless status_code == 200
145
+ error_model = JSON.load(response_content)
146
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
147
+ end
148
+
149
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
150
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
151
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
152
+ # Deserialize Response
153
+ if status_code == 200
154
+ begin
155
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
156
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
157
+ result.body = @client.deserialize(result_mapper, parsed_response)
158
+ rescue Exception => e
159
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
160
+ end
161
+ end
162
+
163
+ result
164
+ end
165
+
166
+ promise.execute
167
+ end
168
+
169
+ #
170
+ # Deletes the specified virtual network gateway.
171
+ #
172
+ # @param resource_group_name [String] The name of the resource group.
173
+ # @param virtual_network_gateway_name [String] The name of the virtual network
174
+ # gateway.
175
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
176
+ # will be added to the HTTP request.
177
+ #
178
+ def delete(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
179
+ response = delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
180
+ nil
181
+ end
182
+
183
+ #
184
+ # @param resource_group_name [String] The name of the resource group.
185
+ # @param virtual_network_gateway_name [String] The name of the virtual network
186
+ # gateway.
187
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
188
+ # will be added to the HTTP request.
189
+ #
190
+ # @return [Concurrent::Promise] promise which provides async access to http
191
+ # response.
192
+ #
193
+ def delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
194
+ # Send request
195
+ promise = begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
196
+
197
+ promise = promise.then do |response|
198
+ # Defining deserialization method.
199
+ deserialize_method = lambda do |parsed_response|
200
+ end
201
+
202
+ # Waiting for response.
203
+ @client.get_long_running_operation_result(response, deserialize_method)
204
+ end
205
+
206
+ promise
207
+ end
208
+
209
+ #
210
+ # Updates a virtual network gateway tags.
211
+ #
212
+ # @param resource_group_name [String] The name of the resource group.
213
+ # @param virtual_network_gateway_name [String] The name of the virtual network
214
+ # gateway.
215
+ # @param parameters [TagsObject] Parameters supplied to update virtual network
216
+ # gateway tags.
217
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
218
+ # will be added to the HTTP request.
219
+ #
220
+ # @return [VirtualNetworkGateway] operation results.
221
+ #
222
+ def update_tags(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
223
+ response = update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
224
+ response.body unless response.nil?
225
+ end
226
+
227
+ #
228
+ # @param resource_group_name [String] The name of the resource group.
229
+ # @param virtual_network_gateway_name [String] The name of the virtual network
230
+ # gateway.
231
+ # @param parameters [TagsObject] Parameters supplied to update virtual network
232
+ # gateway tags.
233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
234
+ # will be added to the HTTP request.
235
+ #
236
+ # @return [Concurrent::Promise] promise which provides async access to http
237
+ # response.
238
+ #
239
+ def update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
240
+ # Send request
241
+ promise = begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers)
242
+
243
+ promise = promise.then do |response|
244
+ # Defining deserialization method.
245
+ deserialize_method = lambda do |parsed_response|
246
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
247
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
248
+ end
249
+
250
+ # Waiting for response.
251
+ @client.get_long_running_operation_result(response, deserialize_method)
252
+ end
253
+
254
+ promise
255
+ end
256
+
257
+ #
258
+ # Gets all virtual network gateways by resource group.
259
+ #
260
+ # @param resource_group_name [String] The name of the resource group.
261
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
262
+ # will be added to the HTTP request.
263
+ #
264
+ # @return [Array<VirtualNetworkGateway>] operation results.
265
+ #
266
+ def list(resource_group_name, custom_headers:nil)
267
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
268
+ first_page.get_all_items
269
+ end
270
+
271
+ #
272
+ # Gets all virtual network gateways by resource group.
273
+ #
274
+ # @param resource_group_name [String] The name of the resource group.
275
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
276
+ # will be added to the HTTP request.
277
+ #
278
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
279
+ #
280
+ def list_with_http_info(resource_group_name, custom_headers:nil)
281
+ list_async(resource_group_name, custom_headers:custom_headers).value!
282
+ end
283
+
284
+ #
285
+ # Gets all virtual network gateways by resource group.
286
+ #
287
+ # @param resource_group_name [String] The name of the resource group.
288
+ # @param [Hash{String => String}] A hash of custom headers that will be added
289
+ # to the HTTP request.
290
+ #
291
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
292
+ #
293
+ def list_async(resource_group_name, custom_headers:nil)
294
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
295
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
296
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
297
+
298
+
299
+ request_headers = {}
300
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
301
+
302
+ # Set Headers
303
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
304
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
305
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways'
306
+
307
+ request_url = @base_url || @client.base_url
308
+
309
+ options = {
310
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
311
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
312
+ query_params: {'api-version' => @client.api_version},
313
+ headers: request_headers.merge(custom_headers || {}),
314
+ base_url: request_url
315
+ }
316
+ promise = @client.make_request_async(:get, path_template, options)
317
+
318
+ promise = promise.then do |result|
319
+ http_response = result.response
320
+ status_code = http_response.status
321
+ response_content = http_response.body
322
+ unless status_code == 200
323
+ error_model = JSON.load(response_content)
324
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
325
+ end
326
+
327
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
328
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
329
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
330
+ # Deserialize Response
331
+ if status_code == 200
332
+ begin
333
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
334
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGatewayListResult.mapper()
335
+ result.body = @client.deserialize(result_mapper, parsed_response)
336
+ rescue Exception => e
337
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
338
+ end
339
+ end
340
+
341
+ result
342
+ end
343
+
344
+ promise.execute
345
+ end
346
+
347
+ #
348
+ # Gets all the connections in a virtual network gateway.
349
+ #
350
+ # @param resource_group_name [String] The name of the resource group.
351
+ # @param virtual_network_gateway_name [String] The name of the virtual network
352
+ # gateway.
353
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
354
+ # will be added to the HTTP request.
355
+ #
356
+ # @return [Array<VirtualNetworkGatewayConnectionListEntity>] operation results.
357
+ #
358
+ def list_connections(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
359
+ first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
360
+ first_page.get_all_items
361
+ end
362
+
363
+ #
364
+ # Gets all the connections in a virtual network gateway.
365
+ #
366
+ # @param resource_group_name [String] The name of the resource group.
367
+ # @param virtual_network_gateway_name [String] The name of the virtual network
368
+ # gateway.
369
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
370
+ # will be added to the HTTP request.
371
+ #
372
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
373
+ #
374
+ def list_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
375
+ list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
376
+ end
377
+
378
+ #
379
+ # Gets all the connections in a virtual network gateway.
380
+ #
381
+ # @param resource_group_name [String] The name of the resource group.
382
+ # @param virtual_network_gateway_name [String] The name of the virtual network
383
+ # gateway.
384
+ # @param [Hash{String => String}] A hash of custom headers that will be added
385
+ # to the HTTP request.
386
+ #
387
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
388
+ #
389
+ def list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
390
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
391
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
392
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
393
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
394
+
395
+
396
+ request_headers = {}
397
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
398
+
399
+ # Set Headers
400
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
401
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
402
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections'
403
+
404
+ request_url = @base_url || @client.base_url
405
+
406
+ options = {
407
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
408
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
409
+ query_params: {'api-version' => @client.api_version},
410
+ headers: request_headers.merge(custom_headers || {}),
411
+ base_url: request_url
412
+ }
413
+ promise = @client.make_request_async(:get, path_template, options)
414
+
415
+ promise = promise.then do |result|
416
+ http_response = result.response
417
+ status_code = http_response.status
418
+ response_content = http_response.body
419
+ unless status_code == 200
420
+ error_model = JSON.load(response_content)
421
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
422
+ end
423
+
424
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
425
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
426
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
427
+ # Deserialize Response
428
+ if status_code == 200
429
+ begin
430
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
431
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGatewayListConnectionsResult.mapper()
432
+ result.body = @client.deserialize(result_mapper, parsed_response)
433
+ rescue Exception => e
434
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
435
+ end
436
+ end
437
+
438
+ result
439
+ end
440
+
441
+ promise.execute
442
+ end
443
+
444
+ #
445
+ # Resets the primary of the virtual network gateway in the specified resource
446
+ # group.
447
+ #
448
+ # @param resource_group_name [String] The name of the resource group.
449
+ # @param virtual_network_gateway_name [String] The name of the virtual network
450
+ # gateway.
451
+ # @param gateway_vip [String] Virtual network gateway vip address supplied to
452
+ # the begin reset of the active-active feature enabled gateway.
453
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
454
+ # will be added to the HTTP request.
455
+ #
456
+ # @return [VirtualNetworkGateway] operation results.
457
+ #
458
+ def reset(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil)
459
+ response = reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value!
460
+ response.body unless response.nil?
461
+ end
462
+
463
+ #
464
+ # @param resource_group_name [String] The name of the resource group.
465
+ # @param virtual_network_gateway_name [String] The name of the virtual network
466
+ # gateway.
467
+ # @param gateway_vip [String] Virtual network gateway vip address supplied to
468
+ # the begin reset of the active-active feature enabled gateway.
469
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
470
+ # will be added to the HTTP request.
471
+ #
472
+ # @return [Concurrent::Promise] promise which provides async access to http
473
+ # response.
474
+ #
475
+ def reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil)
476
+ # Send request
477
+ promise = begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers)
478
+
479
+ promise = promise.then do |response|
480
+ # Defining deserialization method.
481
+ deserialize_method = lambda do |parsed_response|
482
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
483
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
484
+ end
485
+
486
+ # Waiting for response.
487
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
488
+ end
489
+
490
+ promise
491
+ end
492
+
493
+ #
494
+ # Resets the VPN client shared key of the virtual network gateway in the
495
+ # specified resource group.
496
+ #
497
+ # @param resource_group_name [String] The name of the resource group.
498
+ # @param virtual_network_gateway_name [String] The name of the virtual network
499
+ # gateway.
500
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
501
+ # will be added to the HTTP request.
502
+ #
503
+ def reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
504
+ response = reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
505
+ nil
506
+ end
507
+
508
+ #
509
+ # @param resource_group_name [String] The name of the resource group.
510
+ # @param virtual_network_gateway_name [String] The name of the virtual network
511
+ # gateway.
512
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
513
+ # will be added to the HTTP request.
514
+ #
515
+ # @return [Concurrent::Promise] promise which provides async access to http
516
+ # response.
517
+ #
518
+ def reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
519
+ # Send request
520
+ promise = begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
521
+
522
+ promise = promise.then do |response|
523
+ # Defining deserialization method.
524
+ deserialize_method = lambda do |parsed_response|
525
+ end
526
+
527
+ # Waiting for response.
528
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
529
+ end
530
+
531
+ promise
532
+ end
533
+
534
+ #
535
+ # Generates VPN client package for P2S client of the virtual network gateway in
536
+ # the specified resource group.
537
+ #
538
+ # @param resource_group_name [String] The name of the resource group.
539
+ # @param virtual_network_gateway_name [String] The name of the virtual network
540
+ # gateway.
541
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
542
+ # virtual network gateway VPN client package operation.
543
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
544
+ # will be added to the HTTP request.
545
+ #
546
+ # @return [String] operation results.
547
+ #
548
+ def generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
549
+ response = generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
550
+ response.body unless response.nil?
551
+ end
552
+
553
+ #
554
+ # @param resource_group_name [String] The name of the resource group.
555
+ # @param virtual_network_gateway_name [String] The name of the virtual network
556
+ # gateway.
557
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
558
+ # virtual network gateway VPN client package operation.
559
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
560
+ # will be added to the HTTP request.
561
+ #
562
+ # @return [Concurrent::Promise] promise which provides async access to http
563
+ # response.
564
+ #
565
+ def generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
566
+ # Send request
567
+ promise = begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers)
568
+
569
+ promise = promise.then do |response|
570
+ # Defining deserialization method.
571
+ deserialize_method = lambda do |parsed_response|
572
+ result_mapper = {
573
+ client_side_validation: true,
574
+ required: false,
575
+ serialized_name: 'parsed_response',
576
+ type: {
577
+ name: 'String'
578
+ }
579
+ }
580
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
581
+ end
582
+
583
+ # Waiting for response.
584
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
585
+ end
586
+
587
+ promise
588
+ end
589
+
590
+ #
591
+ # Generates VPN profile for P2S client of the virtual network gateway in the
592
+ # specified resource group. Used for IKEV2 and radius based authentication.
593
+ #
594
+ # @param resource_group_name [String] The name of the resource group.
595
+ # @param virtual_network_gateway_name [String] The name of the virtual network
596
+ # gateway.
597
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
598
+ # virtual network gateway VPN client package operation.
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ # @return [String] operation results.
603
+ #
604
+ def generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
605
+ response = generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
606
+ response.body unless response.nil?
607
+ end
608
+
609
+ #
610
+ # @param resource_group_name [String] The name of the resource group.
611
+ # @param virtual_network_gateway_name [String] The name of the virtual network
612
+ # gateway.
613
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
614
+ # virtual network gateway VPN client package operation.
615
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
616
+ # will be added to the HTTP request.
617
+ #
618
+ # @return [Concurrent::Promise] promise which provides async access to http
619
+ # response.
620
+ #
621
+ def generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
622
+ # Send request
623
+ promise = begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers)
624
+
625
+ promise = promise.then do |response|
626
+ # Defining deserialization method.
627
+ deserialize_method = lambda do |parsed_response|
628
+ result_mapper = {
629
+ client_side_validation: true,
630
+ required: false,
631
+ serialized_name: 'parsed_response',
632
+ type: {
633
+ name: 'String'
634
+ }
635
+ }
636
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
637
+ end
638
+
639
+ # Waiting for response.
640
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
641
+ end
642
+
643
+ promise
644
+ end
645
+
646
+ #
647
+ # Gets pre-generated VPN profile for P2S client of the virtual network gateway
648
+ # in the specified resource group. The profile needs to be generated first
649
+ # using generateVpnProfile.
650
+ #
651
+ # @param resource_group_name [String] The name of the resource group.
652
+ # @param virtual_network_gateway_name [String] The name of the virtual network
653
+ # gateway.
654
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
655
+ # will be added to the HTTP request.
656
+ #
657
+ # @return [String] operation results.
658
+ #
659
+ def get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
660
+ response = get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
661
+ response.body unless response.nil?
662
+ end
663
+
664
+ #
665
+ # @param resource_group_name [String] The name of the resource group.
666
+ # @param virtual_network_gateway_name [String] The name of the virtual network
667
+ # gateway.
668
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
669
+ # will be added to the HTTP request.
670
+ #
671
+ # @return [Concurrent::Promise] promise which provides async access to http
672
+ # response.
673
+ #
674
+ def get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
675
+ # Send request
676
+ promise = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
677
+
678
+ promise = promise.then do |response|
679
+ # Defining deserialization method.
680
+ deserialize_method = lambda do |parsed_response|
681
+ result_mapper = {
682
+ client_side_validation: true,
683
+ required: false,
684
+ serialized_name: 'parsed_response',
685
+ type: {
686
+ name: 'String'
687
+ }
688
+ }
689
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
690
+ end
691
+
692
+ # Waiting for response.
693
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
694
+ end
695
+
696
+ promise
697
+ end
698
+
699
+ #
700
+ # The GetBgpPeerStatus operation retrieves the status of all BGP peers.
701
+ #
702
+ # @param resource_group_name [String] The name of the resource group.
703
+ # @param virtual_network_gateway_name [String] The name of the virtual network
704
+ # gateway.
705
+ # @param peer [String] The IP address of the peer to retrieve the status of.
706
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
707
+ # will be added to the HTTP request.
708
+ #
709
+ # @return [BgpPeerStatusListResult] operation results.
710
+ #
711
+ def get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
712
+ response = get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value!
713
+ response.body unless response.nil?
714
+ end
715
+
716
+ #
717
+ # @param resource_group_name [String] The name of the resource group.
718
+ # @param virtual_network_gateway_name [String] The name of the virtual network
719
+ # gateway.
720
+ # @param peer [String] The IP address of the peer to retrieve the status of.
721
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
722
+ # will be added to the HTTP request.
723
+ #
724
+ # @return [Concurrent::Promise] promise which provides async access to http
725
+ # response.
726
+ #
727
+ def get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
728
+ # Send request
729
+ promise = begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers)
730
+
731
+ promise = promise.then do |response|
732
+ # Defining deserialization method.
733
+ deserialize_method = lambda do |parsed_response|
734
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::BgpPeerStatusListResult.mapper()
735
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
736
+ end
737
+
738
+ # Waiting for response.
739
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
740
+ end
741
+
742
+ promise
743
+ end
744
+
745
+ #
746
+ # Gets a xml format representation for supported vpn devices.
747
+ #
748
+ # @param resource_group_name [String] The name of the resource group.
749
+ # @param virtual_network_gateway_name [String] The name of the virtual network
750
+ # gateway.
751
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
752
+ # will be added to the HTTP request.
753
+ #
754
+ # @return [String] operation results.
755
+ #
756
+ def supported_vpn_devices(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
757
+ response = supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
758
+ response.body unless response.nil?
759
+ end
760
+
761
+ #
762
+ # Gets a xml format representation for supported vpn devices.
763
+ #
764
+ # @param resource_group_name [String] The name of the resource group.
765
+ # @param virtual_network_gateway_name [String] The name of the virtual network
766
+ # gateway.
767
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
768
+ # will be added to the HTTP request.
769
+ #
770
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
771
+ #
772
+ def supported_vpn_devices_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
773
+ supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
774
+ end
775
+
776
+ #
777
+ # Gets a xml format representation for supported vpn devices.
778
+ #
779
+ # @param resource_group_name [String] The name of the resource group.
780
+ # @param virtual_network_gateway_name [String] The name of the virtual network
781
+ # gateway.
782
+ # @param [Hash{String => String}] A hash of custom headers that will be added
783
+ # to the HTTP request.
784
+ #
785
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
786
+ #
787
+ def supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
788
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
789
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
790
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
791
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
792
+
793
+
794
+ request_headers = {}
795
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
796
+
797
+ # Set Headers
798
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
799
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
800
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices'
801
+
802
+ request_url = @base_url || @client.base_url
803
+
804
+ options = {
805
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
806
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
807
+ query_params: {'api-version' => @client.api_version},
808
+ headers: request_headers.merge(custom_headers || {}),
809
+ base_url: request_url
810
+ }
811
+ promise = @client.make_request_async(:post, path_template, options)
812
+
813
+ promise = promise.then do |result|
814
+ http_response = result.response
815
+ status_code = http_response.status
816
+ response_content = http_response.body
817
+ unless status_code == 200
818
+ error_model = JSON.load(response_content)
819
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
820
+ end
821
+
822
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
823
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
824
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
825
+ # Deserialize Response
826
+ if status_code == 200
827
+ begin
828
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
829
+ result_mapper = {
830
+ client_side_validation: true,
831
+ required: false,
832
+ serialized_name: 'parsed_response',
833
+ type: {
834
+ name: 'String'
835
+ }
836
+ }
837
+ result.body = @client.deserialize(result_mapper, parsed_response)
838
+ rescue Exception => e
839
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
840
+ end
841
+ end
842
+
843
+ result
844
+ end
845
+
846
+ promise.execute
847
+ end
848
+
849
+ #
850
+ # This operation retrieves a list of routes the virtual network gateway has
851
+ # learned, including routes learned from BGP peers.
852
+ #
853
+ # @param resource_group_name [String] The name of the resource group.
854
+ # @param virtual_network_gateway_name [String] The name of the virtual network
855
+ # gateway.
856
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
857
+ # will be added to the HTTP request.
858
+ #
859
+ # @return [GatewayRouteListResult] operation results.
860
+ #
861
+ def get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
862
+ response = get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
863
+ response.body unless response.nil?
864
+ end
865
+
866
+ #
867
+ # @param resource_group_name [String] The name of the resource group.
868
+ # @param virtual_network_gateway_name [String] The name of the virtual network
869
+ # gateway.
870
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
871
+ # will be added to the HTTP request.
872
+ #
873
+ # @return [Concurrent::Promise] promise which provides async access to http
874
+ # response.
875
+ #
876
+ def get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
877
+ # Send request
878
+ promise = begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
879
+
880
+ promise = promise.then do |response|
881
+ # Defining deserialization method.
882
+ deserialize_method = lambda do |parsed_response|
883
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::GatewayRouteListResult.mapper()
884
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
885
+ end
886
+
887
+ # Waiting for response.
888
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
889
+ end
890
+
891
+ promise
892
+ end
893
+
894
+ #
895
+ # This operation retrieves a list of routes the virtual network gateway is
896
+ # advertising to the specified peer.
897
+ #
898
+ # @param resource_group_name [String] The name of the resource group.
899
+ # @param virtual_network_gateway_name [String] The name of the virtual network
900
+ # gateway.
901
+ # @param peer [String] The IP address of the peer.
902
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
903
+ # will be added to the HTTP request.
904
+ #
905
+ # @return [GatewayRouteListResult] operation results.
906
+ #
907
+ def get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil)
908
+ response = get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers).value!
909
+ response.body unless response.nil?
910
+ end
911
+
912
+ #
913
+ # @param resource_group_name [String] The name of the resource group.
914
+ # @param virtual_network_gateway_name [String] The name of the virtual network
915
+ # gateway.
916
+ # @param peer [String] The IP address of the peer.
917
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
918
+ # will be added to the HTTP request.
919
+ #
920
+ # @return [Concurrent::Promise] promise which provides async access to http
921
+ # response.
922
+ #
923
+ def get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil)
924
+ # Send request
925
+ promise = begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers)
926
+
927
+ promise = promise.then do |response|
928
+ # Defining deserialization method.
929
+ deserialize_method = lambda do |parsed_response|
930
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::GatewayRouteListResult.mapper()
931
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
932
+ end
933
+
934
+ # Waiting for response.
935
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
936
+ end
937
+
938
+ promise
939
+ end
940
+
941
+ #
942
+ # The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy
943
+ # for P2S client of virtual network gateway in the specified resource group
944
+ # through Network resource provider.
945
+ #
946
+ # @param resource_group_name [String] The name of the resource group.
947
+ # @param virtual_network_gateway_name [String] The name of the virtual network
948
+ # gateway.
949
+ # @param vpnclient_ipsec_params [VpnClientIPsecParameters] Parameters supplied
950
+ # to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S
951
+ # client operation through Network resource provider.
952
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
953
+ # will be added to the HTTP request.
954
+ #
955
+ # @return [VpnClientIPsecParameters] operation results.
956
+ #
957
+ def set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
958
+ response = set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value!
959
+ response.body unless response.nil?
960
+ end
961
+
962
+ #
963
+ # @param resource_group_name [String] The name of the resource group.
964
+ # @param virtual_network_gateway_name [String] The name of the virtual network
965
+ # gateway.
966
+ # @param vpnclient_ipsec_params [VpnClientIPsecParameters] Parameters supplied
967
+ # to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S
968
+ # client operation through Network resource provider.
969
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
970
+ # will be added to the HTTP request.
971
+ #
972
+ # @return [Concurrent::Promise] promise which provides async access to http
973
+ # response.
974
+ #
975
+ def set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
976
+ # Send request
977
+ promise = begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers)
978
+
979
+ promise = promise.then do |response|
980
+ # Defining deserialization method.
981
+ deserialize_method = lambda do |parsed_response|
982
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientIPsecParameters.mapper()
983
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
984
+ end
985
+
986
+ # Waiting for response.
987
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
988
+ end
989
+
990
+ promise
991
+ end
992
+
993
+ #
994
+ # The Get VpnclientIpsecParameters operation retrieves information about the
995
+ # vpnclient ipsec policy for P2S client of virtual network gateway in the
996
+ # specified resource group through Network resource provider.
997
+ #
998
+ # @param resource_group_name [String] The name of the resource group.
999
+ # @param virtual_network_gateway_name [String] The virtual network gateway
1000
+ # name.
1001
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1002
+ # will be added to the HTTP request.
1003
+ #
1004
+ # @return [VpnClientIPsecParameters] operation results.
1005
+ #
1006
+ def get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1007
+ response = get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1008
+ response.body unless response.nil?
1009
+ end
1010
+
1011
+ #
1012
+ # @param resource_group_name [String] The name of the resource group.
1013
+ # @param virtual_network_gateway_name [String] The virtual network gateway
1014
+ # name.
1015
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1016
+ # will be added to the HTTP request.
1017
+ #
1018
+ # @return [Concurrent::Promise] promise which provides async access to http
1019
+ # response.
1020
+ #
1021
+ def get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1022
+ # Send request
1023
+ promise = begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
1024
+
1025
+ promise = promise.then do |response|
1026
+ # Defining deserialization method.
1027
+ deserialize_method = lambda do |parsed_response|
1028
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientIPsecParameters.mapper()
1029
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1030
+ end
1031
+
1032
+ # Waiting for response.
1033
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1034
+ end
1035
+
1036
+ promise
1037
+ end
1038
+
1039
+ #
1040
+ # Gets a xml format representation for vpn device configuration script.
1041
+ #
1042
+ # @param resource_group_name [String] The name of the resource group.
1043
+ # @param virtual_network_gateway_connection_name [String] The name of the
1044
+ # virtual network gateway connection for which the configuration script is
1045
+ # generated.
1046
+ # @param parameters [VpnDeviceScriptParameters] Parameters supplied to the
1047
+ # generate vpn device script operation.
1048
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1049
+ # will be added to the HTTP request.
1050
+ #
1051
+ # @return [String] operation results.
1052
+ #
1053
+ def vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
1054
+ response = vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
1055
+ response.body unless response.nil?
1056
+ end
1057
+
1058
+ #
1059
+ # Gets a xml format representation for vpn device configuration script.
1060
+ #
1061
+ # @param resource_group_name [String] The name of the resource group.
1062
+ # @param virtual_network_gateway_connection_name [String] The name of the
1063
+ # virtual network gateway connection for which the configuration script is
1064
+ # generated.
1065
+ # @param parameters [VpnDeviceScriptParameters] Parameters supplied to the
1066
+ # generate vpn device script operation.
1067
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1068
+ # will be added to the HTTP request.
1069
+ #
1070
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1071
+ #
1072
+ def vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
1073
+ vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value!
1074
+ end
1075
+
1076
+ #
1077
+ # Gets a xml format representation for vpn device configuration script.
1078
+ #
1079
+ # @param resource_group_name [String] The name of the resource group.
1080
+ # @param virtual_network_gateway_connection_name [String] The name of the
1081
+ # virtual network gateway connection for which the configuration script is
1082
+ # generated.
1083
+ # @param parameters [VpnDeviceScriptParameters] Parameters supplied to the
1084
+ # generate vpn device script operation.
1085
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1086
+ # to the HTTP request.
1087
+ #
1088
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1089
+ #
1090
+ def vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil)
1091
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1092
+ fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil?
1093
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1094
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1095
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1096
+
1097
+
1098
+ request_headers = {}
1099
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1100
+
1101
+ # Set Headers
1102
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1103
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1104
+
1105
+ # Serialize Request
1106
+ request_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnDeviceScriptParameters.mapper()
1107
+ request_content = @client.serialize(request_mapper, parameters)
1108
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1109
+
1110
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'
1111
+
1112
+ request_url = @base_url || @client.base_url
1113
+
1114
+ options = {
1115
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1116
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_name,'subscriptionId' => @client.subscription_id},
1117
+ query_params: {'api-version' => @client.api_version},
1118
+ body: request_content,
1119
+ headers: request_headers.merge(custom_headers || {}),
1120
+ base_url: request_url
1121
+ }
1122
+ promise = @client.make_request_async(:post, path_template, options)
1123
+
1124
+ promise = promise.then do |result|
1125
+ http_response = result.response
1126
+ status_code = http_response.status
1127
+ response_content = http_response.body
1128
+ unless status_code == 200
1129
+ error_model = JSON.load(response_content)
1130
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1131
+ end
1132
+
1133
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1134
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1135
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1136
+ # Deserialize Response
1137
+ if status_code == 200
1138
+ begin
1139
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1140
+ result_mapper = {
1141
+ client_side_validation: true,
1142
+ required: false,
1143
+ serialized_name: 'parsed_response',
1144
+ type: {
1145
+ name: 'String'
1146
+ }
1147
+ }
1148
+ result.body = @client.deserialize(result_mapper, parsed_response)
1149
+ rescue Exception => e
1150
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1151
+ end
1152
+ end
1153
+
1154
+ result
1155
+ end
1156
+
1157
+ promise.execute
1158
+ end
1159
+
1160
+ #
1161
+ # Get VPN client connection health detail per P2S client connection of the
1162
+ # virtual network gateway in the specified resource group.
1163
+ #
1164
+ # @param resource_group_name [String] The name of the resource group.
1165
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1166
+ # gateway.
1167
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1168
+ # will be added to the HTTP request.
1169
+ #
1170
+ # @return [VpnClientConnectionHealthDetailListResult] operation results.
1171
+ #
1172
+ def get_vpnclient_connection_health(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1173
+ response = get_vpnclient_connection_health_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1174
+ response.body unless response.nil?
1175
+ end
1176
+
1177
+ #
1178
+ # @param resource_group_name [String] The name of the resource group.
1179
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1180
+ # gateway.
1181
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1182
+ # will be added to the HTTP request.
1183
+ #
1184
+ # @return [Concurrent::Promise] promise which provides async access to http
1185
+ # response.
1186
+ #
1187
+ def get_vpnclient_connection_health_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1188
+ # Send request
1189
+ promise = begin_get_vpnclient_connection_health_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers)
1190
+
1191
+ promise = promise.then do |response|
1192
+ # Defining deserialization method.
1193
+ deserialize_method = lambda do |parsed_response|
1194
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientConnectionHealthDetailListResult.mapper()
1195
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1196
+ end
1197
+
1198
+ # Waiting for response.
1199
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1200
+ end
1201
+
1202
+ promise
1203
+ end
1204
+
1205
+ #
1206
+ # Creates or updates a virtual network gateway in the specified resource group.
1207
+ #
1208
+ # @param resource_group_name [String] The name of the resource group.
1209
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1210
+ # gateway.
1211
+ # @param parameters [VirtualNetworkGateway] Parameters supplied to create or
1212
+ # update virtual network gateway operation.
1213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1214
+ # will be added to the HTTP request.
1215
+ #
1216
+ # @return [VirtualNetworkGateway] operation results.
1217
+ #
1218
+ def begin_create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1219
+ response = begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1220
+ response.body unless response.nil?
1221
+ end
1222
+
1223
+ #
1224
+ # Creates or updates a virtual network gateway in the specified resource group.
1225
+ #
1226
+ # @param resource_group_name [String] The name of the resource group.
1227
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1228
+ # gateway.
1229
+ # @param parameters [VirtualNetworkGateway] Parameters supplied to create or
1230
+ # update virtual network gateway operation.
1231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1232
+ # will be added to the HTTP request.
1233
+ #
1234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1235
+ #
1236
+ def begin_create_or_update_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1237
+ begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1238
+ end
1239
+
1240
+ #
1241
+ # Creates or updates a virtual network gateway in the specified resource group.
1242
+ #
1243
+ # @param resource_group_name [String] The name of the resource group.
1244
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1245
+ # gateway.
1246
+ # @param parameters [VirtualNetworkGateway] Parameters supplied to create or
1247
+ # update virtual network gateway operation.
1248
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1249
+ # to the HTTP request.
1250
+ #
1251
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1252
+ #
1253
+ def begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1254
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1255
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1256
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1257
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1258
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1259
+
1260
+
1261
+ request_headers = {}
1262
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1263
+
1264
+ # Set Headers
1265
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1266
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1267
+
1268
+ # Serialize Request
1269
+ request_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
1270
+ request_content = @client.serialize(request_mapper, parameters)
1271
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1272
+
1273
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
1274
+
1275
+ request_url = @base_url || @client.base_url
1276
+
1277
+ options = {
1278
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1279
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1280
+ query_params: {'api-version' => @client.api_version},
1281
+ body: request_content,
1282
+ headers: request_headers.merge(custom_headers || {}),
1283
+ base_url: request_url
1284
+ }
1285
+ promise = @client.make_request_async(:put, path_template, options)
1286
+
1287
+ promise = promise.then do |result|
1288
+ http_response = result.response
1289
+ status_code = http_response.status
1290
+ response_content = http_response.body
1291
+ unless status_code == 200 || status_code == 201
1292
+ error_model = JSON.load(response_content)
1293
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1294
+ end
1295
+
1296
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1297
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1298
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1299
+ # Deserialize Response
1300
+ if status_code == 200
1301
+ begin
1302
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1303
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
1304
+ result.body = @client.deserialize(result_mapper, parsed_response)
1305
+ rescue Exception => e
1306
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1307
+ end
1308
+ end
1309
+ # Deserialize Response
1310
+ if status_code == 201
1311
+ begin
1312
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1313
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
1314
+ result.body = @client.deserialize(result_mapper, parsed_response)
1315
+ rescue Exception => e
1316
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1317
+ end
1318
+ end
1319
+
1320
+ result
1321
+ end
1322
+
1323
+ promise.execute
1324
+ end
1325
+
1326
+ #
1327
+ # Deletes the specified virtual network gateway.
1328
+ #
1329
+ # @param resource_group_name [String] The name of the resource group.
1330
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1331
+ # gateway.
1332
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1333
+ # will be added to the HTTP request.
1334
+ #
1335
+ #
1336
+ def begin_delete(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1337
+ response = begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1338
+ nil
1339
+ end
1340
+
1341
+ #
1342
+ # Deletes the specified virtual network gateway.
1343
+ #
1344
+ # @param resource_group_name [String] The name of the resource group.
1345
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1346
+ # gateway.
1347
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1348
+ # will be added to the HTTP request.
1349
+ #
1350
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1351
+ #
1352
+ def begin_delete_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1353
+ begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1354
+ end
1355
+
1356
+ #
1357
+ # Deletes the specified virtual network gateway.
1358
+ #
1359
+ # @param resource_group_name [String] The name of the resource group.
1360
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1361
+ # gateway.
1362
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1363
+ # to the HTTP request.
1364
+ #
1365
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1366
+ #
1367
+ def begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1368
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1369
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1370
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1371
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1372
+
1373
+
1374
+ request_headers = {}
1375
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1376
+
1377
+ # Set Headers
1378
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1379
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1380
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
1381
+
1382
+ request_url = @base_url || @client.base_url
1383
+
1384
+ options = {
1385
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1386
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1387
+ query_params: {'api-version' => @client.api_version},
1388
+ headers: request_headers.merge(custom_headers || {}),
1389
+ base_url: request_url
1390
+ }
1391
+ promise = @client.make_request_async(:delete, path_template, options)
1392
+
1393
+ promise = promise.then do |result|
1394
+ http_response = result.response
1395
+ status_code = http_response.status
1396
+ response_content = http_response.body
1397
+ unless status_code == 204 || status_code == 202 || status_code == 200
1398
+ error_model = JSON.load(response_content)
1399
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1400
+ end
1401
+
1402
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1403
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1404
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1405
+
1406
+ result
1407
+ end
1408
+
1409
+ promise.execute
1410
+ end
1411
+
1412
+ #
1413
+ # Updates a virtual network gateway tags.
1414
+ #
1415
+ # @param resource_group_name [String] The name of the resource group.
1416
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1417
+ # gateway.
1418
+ # @param parameters [TagsObject] Parameters supplied to update virtual network
1419
+ # gateway tags.
1420
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1421
+ # will be added to the HTTP request.
1422
+ #
1423
+ # @return [VirtualNetworkGateway] operation results.
1424
+ #
1425
+ def begin_update_tags(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1426
+ response = begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1427
+ response.body unless response.nil?
1428
+ end
1429
+
1430
+ #
1431
+ # Updates a virtual network gateway tags.
1432
+ #
1433
+ # @param resource_group_name [String] The name of the resource group.
1434
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1435
+ # gateway.
1436
+ # @param parameters [TagsObject] Parameters supplied to update virtual network
1437
+ # gateway tags.
1438
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1439
+ # will be added to the HTTP request.
1440
+ #
1441
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1442
+ #
1443
+ def begin_update_tags_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1444
+ begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1445
+ end
1446
+
1447
+ #
1448
+ # Updates a virtual network gateway tags.
1449
+ #
1450
+ # @param resource_group_name [String] The name of the resource group.
1451
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1452
+ # gateway.
1453
+ # @param parameters [TagsObject] Parameters supplied to update virtual network
1454
+ # gateway tags.
1455
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1456
+ # to the HTTP request.
1457
+ #
1458
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1459
+ #
1460
+ def begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1461
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1462
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1463
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1464
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1465
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1466
+
1467
+
1468
+ request_headers = {}
1469
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1470
+
1471
+ # Set Headers
1472
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1473
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1474
+
1475
+ # Serialize Request
1476
+ request_mapper = Azure::Network::Mgmt::V2019_06_01::Models::TagsObject.mapper()
1477
+ request_content = @client.serialize(request_mapper, parameters)
1478
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1479
+
1480
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'
1481
+
1482
+ request_url = @base_url || @client.base_url
1483
+
1484
+ options = {
1485
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1486
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1487
+ query_params: {'api-version' => @client.api_version},
1488
+ body: request_content,
1489
+ headers: request_headers.merge(custom_headers || {}),
1490
+ base_url: request_url
1491
+ }
1492
+ promise = @client.make_request_async(:patch, path_template, options)
1493
+
1494
+ promise = promise.then do |result|
1495
+ http_response = result.response
1496
+ status_code = http_response.status
1497
+ response_content = http_response.body
1498
+ unless status_code == 200
1499
+ error_model = JSON.load(response_content)
1500
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1501
+ end
1502
+
1503
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1504
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1505
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1506
+ # Deserialize Response
1507
+ if status_code == 200
1508
+ begin
1509
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1510
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
1511
+ result.body = @client.deserialize(result_mapper, parsed_response)
1512
+ rescue Exception => e
1513
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1514
+ end
1515
+ end
1516
+
1517
+ result
1518
+ end
1519
+
1520
+ promise.execute
1521
+ end
1522
+
1523
+ #
1524
+ # Resets the primary of the virtual network gateway in the specified resource
1525
+ # group.
1526
+ #
1527
+ # @param resource_group_name [String] The name of the resource group.
1528
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1529
+ # gateway.
1530
+ # @param gateway_vip [String] Virtual network gateway vip address supplied to
1531
+ # the begin reset of the active-active feature enabled gateway.
1532
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1533
+ # will be added to the HTTP request.
1534
+ #
1535
+ # @return [VirtualNetworkGateway] operation results.
1536
+ #
1537
+ def begin_reset(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil)
1538
+ response = begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value!
1539
+ response.body unless response.nil?
1540
+ end
1541
+
1542
+ #
1543
+ # Resets the primary of the virtual network gateway in the specified resource
1544
+ # group.
1545
+ #
1546
+ # @param resource_group_name [String] The name of the resource group.
1547
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1548
+ # gateway.
1549
+ # @param gateway_vip [String] Virtual network gateway vip address supplied to
1550
+ # the begin reset of the active-active feature enabled gateway.
1551
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1552
+ # will be added to the HTTP request.
1553
+ #
1554
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1555
+ #
1556
+ def begin_reset_with_http_info(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil)
1557
+ begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value!
1558
+ end
1559
+
1560
+ #
1561
+ # Resets the primary of the virtual network gateway in the specified resource
1562
+ # group.
1563
+ #
1564
+ # @param resource_group_name [String] The name of the resource group.
1565
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1566
+ # gateway.
1567
+ # @param gateway_vip [String] Virtual network gateway vip address supplied to
1568
+ # the begin reset of the active-active feature enabled gateway.
1569
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1570
+ # to the HTTP request.
1571
+ #
1572
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1573
+ #
1574
+ def begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil)
1575
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1576
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1577
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1578
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1579
+
1580
+
1581
+ request_headers = {}
1582
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
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 = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'
1588
+
1589
+ request_url = @base_url || @client.base_url
1590
+
1591
+ options = {
1592
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1593
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1594
+ query_params: {'gatewayVip' => gateway_vip,'api-version' => @client.api_version},
1595
+ headers: request_headers.merge(custom_headers || {}),
1596
+ base_url: request_url
1597
+ }
1598
+ promise = @client.make_request_async(:post, path_template, options)
1599
+
1600
+ promise = promise.then do |result|
1601
+ http_response = result.response
1602
+ status_code = http_response.status
1603
+ response_content = http_response.body
1604
+ unless status_code == 202 || status_code == 200
1605
+ error_model = JSON.load(response_content)
1606
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1607
+ end
1608
+
1609
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1610
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1611
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1612
+ # Deserialize Response
1613
+ if status_code == 200
1614
+ begin
1615
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1616
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGateway.mapper()
1617
+ result.body = @client.deserialize(result_mapper, parsed_response)
1618
+ rescue Exception => e
1619
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1620
+ end
1621
+ end
1622
+
1623
+ result
1624
+ end
1625
+
1626
+ promise.execute
1627
+ end
1628
+
1629
+ #
1630
+ # Resets the VPN client shared key of the virtual network gateway in the
1631
+ # specified resource group.
1632
+ #
1633
+ # @param resource_group_name [String] The name of the resource group.
1634
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1635
+ # gateway.
1636
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1637
+ # will be added to the HTTP request.
1638
+ #
1639
+ #
1640
+ def begin_reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1641
+ response = begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1642
+ nil
1643
+ end
1644
+
1645
+ #
1646
+ # Resets the VPN client shared key of the virtual network gateway in the
1647
+ # specified resource group.
1648
+ #
1649
+ # @param resource_group_name [String] The name of the resource group.
1650
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1651
+ # gateway.
1652
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1653
+ # will be added to the HTTP request.
1654
+ #
1655
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1656
+ #
1657
+ def begin_reset_vpn_client_shared_key_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1658
+ begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1659
+ end
1660
+
1661
+ #
1662
+ # Resets the VPN client shared key of the virtual network gateway in the
1663
+ # specified resource group.
1664
+ #
1665
+ # @param resource_group_name [String] The name of the resource group.
1666
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1667
+ # gateway.
1668
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1669
+ # to the HTTP request.
1670
+ #
1671
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1672
+ #
1673
+ def begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1674
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1675
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1676
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1677
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1678
+
1679
+
1680
+ request_headers = {}
1681
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1682
+
1683
+ # Set Headers
1684
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1685
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey'
1687
+
1688
+ request_url = @base_url || @client.base_url
1689
+
1690
+ options = {
1691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1692
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1693
+ query_params: {'api-version' => @client.api_version},
1694
+ headers: request_headers.merge(custom_headers || {}),
1695
+ base_url: request_url
1696
+ }
1697
+ promise = @client.make_request_async(:post, path_template, options)
1698
+
1699
+ promise = promise.then do |result|
1700
+ http_response = result.response
1701
+ status_code = http_response.status
1702
+ response_content = http_response.body
1703
+ unless status_code == 200 || status_code == 202
1704
+ error_model = JSON.load(response_content)
1705
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1706
+ end
1707
+
1708
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1709
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1710
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1711
+
1712
+ result
1713
+ end
1714
+
1715
+ promise.execute
1716
+ end
1717
+
1718
+ #
1719
+ # Generates VPN client package for P2S client of the virtual network gateway in
1720
+ # the specified resource group.
1721
+ #
1722
+ # @param resource_group_name [String] The name of the resource group.
1723
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1724
+ # gateway.
1725
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
1726
+ # virtual network gateway VPN client package operation.
1727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1728
+ # will be added to the HTTP request.
1729
+ #
1730
+ # @return [String] operation results.
1731
+ #
1732
+ def begin_generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1733
+ response = begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1734
+ response.body unless response.nil?
1735
+ end
1736
+
1737
+ #
1738
+ # Generates VPN client package for P2S client of the virtual network gateway in
1739
+ # the specified resource group.
1740
+ #
1741
+ # @param resource_group_name [String] The name of the resource group.
1742
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1743
+ # gateway.
1744
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
1745
+ # virtual network gateway VPN client package operation.
1746
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1747
+ # will be added to the HTTP request.
1748
+ #
1749
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1750
+ #
1751
+ def begin_generatevpnclientpackage_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1752
+ begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1753
+ end
1754
+
1755
+ #
1756
+ # Generates VPN client package for P2S client of the virtual network gateway in
1757
+ # the specified resource group.
1758
+ #
1759
+ # @param resource_group_name [String] The name of the resource group.
1760
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1761
+ # gateway.
1762
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
1763
+ # virtual network gateway VPN client package operation.
1764
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1765
+ # to the HTTP request.
1766
+ #
1767
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1768
+ #
1769
+ def begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1770
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1771
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1772
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1773
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1774
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1775
+
1776
+
1777
+ request_headers = {}
1778
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1779
+
1780
+ # Set Headers
1781
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1782
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1783
+
1784
+ # Serialize Request
1785
+ request_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientParameters.mapper()
1786
+ request_content = @client.serialize(request_mapper, parameters)
1787
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1788
+
1789
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'
1790
+
1791
+ request_url = @base_url || @client.base_url
1792
+
1793
+ options = {
1794
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1795
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1796
+ query_params: {'api-version' => @client.api_version},
1797
+ body: request_content,
1798
+ headers: request_headers.merge(custom_headers || {}),
1799
+ base_url: request_url
1800
+ }
1801
+ promise = @client.make_request_async(:post, path_template, options)
1802
+
1803
+ promise = promise.then do |result|
1804
+ http_response = result.response
1805
+ status_code = http_response.status
1806
+ response_content = http_response.body
1807
+ unless status_code == 200 || status_code == 202
1808
+ error_model = JSON.load(response_content)
1809
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1810
+ end
1811
+
1812
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1813
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1814
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1815
+ # Deserialize Response
1816
+ if status_code == 200
1817
+ begin
1818
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1819
+ result_mapper = {
1820
+ client_side_validation: true,
1821
+ required: false,
1822
+ serialized_name: 'parsed_response',
1823
+ type: {
1824
+ name: 'String'
1825
+ }
1826
+ }
1827
+ result.body = @client.deserialize(result_mapper, parsed_response)
1828
+ rescue Exception => e
1829
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1830
+ end
1831
+ end
1832
+
1833
+ result
1834
+ end
1835
+
1836
+ promise.execute
1837
+ end
1838
+
1839
+ #
1840
+ # Generates VPN profile for P2S client of the virtual network gateway in the
1841
+ # specified resource group. Used for IKEV2 and radius based authentication.
1842
+ #
1843
+ # @param resource_group_name [String] The name of the resource group.
1844
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1845
+ # gateway.
1846
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
1847
+ # virtual network gateway VPN client package operation.
1848
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1849
+ # will be added to the HTTP request.
1850
+ #
1851
+ # @return [String] operation results.
1852
+ #
1853
+ def begin_generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1854
+ response = begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1855
+ response.body unless response.nil?
1856
+ end
1857
+
1858
+ #
1859
+ # Generates VPN profile for P2S client of the virtual network gateway in the
1860
+ # specified resource group. Used for IKEV2 and radius based authentication.
1861
+ #
1862
+ # @param resource_group_name [String] The name of the resource group.
1863
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1864
+ # gateway.
1865
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
1866
+ # virtual network gateway VPN client package operation.
1867
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1868
+ # will be added to the HTTP request.
1869
+ #
1870
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1871
+ #
1872
+ def begin_generate_vpn_profile_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1873
+ begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value!
1874
+ end
1875
+
1876
+ #
1877
+ # Generates VPN profile for P2S client of the virtual network gateway in the
1878
+ # specified resource group. Used for IKEV2 and radius based authentication.
1879
+ #
1880
+ # @param resource_group_name [String] The name of the resource group.
1881
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1882
+ # gateway.
1883
+ # @param parameters [VpnClientParameters] Parameters supplied to the generate
1884
+ # virtual network gateway VPN client package operation.
1885
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1886
+ # to the HTTP request.
1887
+ #
1888
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1889
+ #
1890
+ def begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil)
1891
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1892
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
1893
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1894
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1895
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1896
+
1897
+
1898
+ request_headers = {}
1899
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1900
+
1901
+ # Set Headers
1902
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1903
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1904
+
1905
+ # Serialize Request
1906
+ request_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientParameters.mapper()
1907
+ request_content = @client.serialize(request_mapper, parameters)
1908
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1909
+
1910
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'
1911
+
1912
+ request_url = @base_url || @client.base_url
1913
+
1914
+ options = {
1915
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1916
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
1917
+ query_params: {'api-version' => @client.api_version},
1918
+ body: request_content,
1919
+ headers: request_headers.merge(custom_headers || {}),
1920
+ base_url: request_url
1921
+ }
1922
+ promise = @client.make_request_async(:post, path_template, options)
1923
+
1924
+ promise = promise.then do |result|
1925
+ http_response = result.response
1926
+ status_code = http_response.status
1927
+ response_content = http_response.body
1928
+ unless status_code == 200 || status_code == 202
1929
+ error_model = JSON.load(response_content)
1930
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1931
+ end
1932
+
1933
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1934
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1935
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1936
+ # Deserialize Response
1937
+ if status_code == 200
1938
+ begin
1939
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1940
+ result_mapper = {
1941
+ client_side_validation: true,
1942
+ required: false,
1943
+ serialized_name: 'parsed_response',
1944
+ type: {
1945
+ name: 'String'
1946
+ }
1947
+ }
1948
+ result.body = @client.deserialize(result_mapper, parsed_response)
1949
+ rescue Exception => e
1950
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1951
+ end
1952
+ end
1953
+
1954
+ result
1955
+ end
1956
+
1957
+ promise.execute
1958
+ end
1959
+
1960
+ #
1961
+ # Gets pre-generated VPN profile for P2S client of the virtual network gateway
1962
+ # in the specified resource group. The profile needs to be generated first
1963
+ # using generateVpnProfile.
1964
+ #
1965
+ # @param resource_group_name [String] The name of the resource group.
1966
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1967
+ # gateway.
1968
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1969
+ # will be added to the HTTP request.
1970
+ #
1971
+ # @return [String] operation results.
1972
+ #
1973
+ def begin_get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1974
+ response = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1975
+ response.body unless response.nil?
1976
+ end
1977
+
1978
+ #
1979
+ # Gets pre-generated VPN profile for P2S client of the virtual network gateway
1980
+ # in the specified resource group. The profile needs to be generated first
1981
+ # using generateVpnProfile.
1982
+ #
1983
+ # @param resource_group_name [String] The name of the resource group.
1984
+ # @param virtual_network_gateway_name [String] The name of the virtual network
1985
+ # gateway.
1986
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1987
+ # will be added to the HTTP request.
1988
+ #
1989
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1990
+ #
1991
+ def begin_get_vpn_profile_package_url_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
1992
+ begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
1993
+ end
1994
+
1995
+ #
1996
+ # Gets pre-generated VPN profile for P2S client of the virtual network gateway
1997
+ # in the specified resource group. The profile needs to be generated first
1998
+ # using generateVpnProfile.
1999
+ #
2000
+ # @param resource_group_name [String] The name of the resource group.
2001
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2002
+ # gateway.
2003
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2004
+ # to the HTTP request.
2005
+ #
2006
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2007
+ #
2008
+ def begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2009
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2010
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2011
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2012
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2013
+
2014
+
2015
+ request_headers = {}
2016
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2017
+
2018
+ # Set Headers
2019
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2020
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2021
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'
2022
+
2023
+ request_url = @base_url || @client.base_url
2024
+
2025
+ options = {
2026
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2027
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2028
+ query_params: {'api-version' => @client.api_version},
2029
+ headers: request_headers.merge(custom_headers || {}),
2030
+ base_url: request_url
2031
+ }
2032
+ promise = @client.make_request_async(:post, path_template, options)
2033
+
2034
+ promise = promise.then do |result|
2035
+ http_response = result.response
2036
+ status_code = http_response.status
2037
+ response_content = http_response.body
2038
+ unless status_code == 200 || status_code == 202
2039
+ error_model = JSON.load(response_content)
2040
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2041
+ end
2042
+
2043
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2044
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2045
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2046
+ # Deserialize Response
2047
+ if status_code == 200
2048
+ begin
2049
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2050
+ result_mapper = {
2051
+ client_side_validation: true,
2052
+ required: false,
2053
+ serialized_name: 'parsed_response',
2054
+ type: {
2055
+ name: 'String'
2056
+ }
2057
+ }
2058
+ result.body = @client.deserialize(result_mapper, parsed_response)
2059
+ rescue Exception => e
2060
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2061
+ end
2062
+ end
2063
+
2064
+ result
2065
+ end
2066
+
2067
+ promise.execute
2068
+ end
2069
+
2070
+ #
2071
+ # The GetBgpPeerStatus operation retrieves the status of all BGP peers.
2072
+ #
2073
+ # @param resource_group_name [String] The name of the resource group.
2074
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2075
+ # gateway.
2076
+ # @param peer [String] The IP address of the peer to retrieve the status of.
2077
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2078
+ # will be added to the HTTP request.
2079
+ #
2080
+ # @return [BgpPeerStatusListResult] operation results.
2081
+ #
2082
+ def begin_get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
2083
+ response = begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value!
2084
+ response.body unless response.nil?
2085
+ end
2086
+
2087
+ #
2088
+ # The GetBgpPeerStatus operation retrieves the status of all BGP peers.
2089
+ #
2090
+ # @param resource_group_name [String] The name of the resource group.
2091
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2092
+ # gateway.
2093
+ # @param peer [String] The IP address of the peer to retrieve the status of.
2094
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2095
+ # will be added to the HTTP request.
2096
+ #
2097
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2098
+ #
2099
+ def begin_get_bgp_peer_status_with_http_info(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
2100
+ begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value!
2101
+ end
2102
+
2103
+ #
2104
+ # The GetBgpPeerStatus operation retrieves the status of all BGP peers.
2105
+ #
2106
+ # @param resource_group_name [String] The name of the resource group.
2107
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2108
+ # gateway.
2109
+ # @param peer [String] The IP address of the peer to retrieve the status of.
2110
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2111
+ # to the HTTP request.
2112
+ #
2113
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2114
+ #
2115
+ def begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil)
2116
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2117
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2118
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2119
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2120
+
2121
+
2122
+ request_headers = {}
2123
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2124
+
2125
+ # Set Headers
2126
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2127
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2128
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'
2129
+
2130
+ request_url = @base_url || @client.base_url
2131
+
2132
+ options = {
2133
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2134
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2135
+ query_params: {'peer' => peer,'api-version' => @client.api_version},
2136
+ headers: request_headers.merge(custom_headers || {}),
2137
+ base_url: request_url
2138
+ }
2139
+ promise = @client.make_request_async(:post, path_template, options)
2140
+
2141
+ promise = promise.then do |result|
2142
+ http_response = result.response
2143
+ status_code = http_response.status
2144
+ response_content = http_response.body
2145
+ unless status_code == 200 || status_code == 202
2146
+ error_model = JSON.load(response_content)
2147
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2148
+ end
2149
+
2150
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2151
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2152
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2153
+ # Deserialize Response
2154
+ if status_code == 200
2155
+ begin
2156
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2157
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::BgpPeerStatusListResult.mapper()
2158
+ result.body = @client.deserialize(result_mapper, parsed_response)
2159
+ rescue Exception => e
2160
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2161
+ end
2162
+ end
2163
+
2164
+ result
2165
+ end
2166
+
2167
+ promise.execute
2168
+ end
2169
+
2170
+ #
2171
+ # This operation retrieves a list of routes the virtual network gateway has
2172
+ # learned, including routes learned from BGP peers.
2173
+ #
2174
+ # @param resource_group_name [String] The name of the resource group.
2175
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2176
+ # gateway.
2177
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2178
+ # will be added to the HTTP request.
2179
+ #
2180
+ # @return [GatewayRouteListResult] operation results.
2181
+ #
2182
+ def begin_get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2183
+ response = begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2184
+ response.body unless response.nil?
2185
+ end
2186
+
2187
+ #
2188
+ # This operation retrieves a list of routes the virtual network gateway has
2189
+ # learned, including routes learned from BGP peers.
2190
+ #
2191
+ # @param resource_group_name [String] The name of the resource group.
2192
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2193
+ # gateway.
2194
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2195
+ # will be added to the HTTP request.
2196
+ #
2197
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2198
+ #
2199
+ def begin_get_learned_routes_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2200
+ begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2201
+ end
2202
+
2203
+ #
2204
+ # This operation retrieves a list of routes the virtual network gateway has
2205
+ # learned, including routes learned from BGP peers.
2206
+ #
2207
+ # @param resource_group_name [String] The name of the resource group.
2208
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2209
+ # gateway.
2210
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2211
+ # to the HTTP request.
2212
+ #
2213
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2214
+ #
2215
+ def begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2216
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2217
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2218
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2219
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2220
+
2221
+
2222
+ request_headers = {}
2223
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2224
+
2225
+ # Set Headers
2226
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2227
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2228
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'
2229
+
2230
+ request_url = @base_url || @client.base_url
2231
+
2232
+ options = {
2233
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2234
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2235
+ query_params: {'api-version' => @client.api_version},
2236
+ headers: request_headers.merge(custom_headers || {}),
2237
+ base_url: request_url
2238
+ }
2239
+ promise = @client.make_request_async(:post, path_template, options)
2240
+
2241
+ promise = promise.then do |result|
2242
+ http_response = result.response
2243
+ status_code = http_response.status
2244
+ response_content = http_response.body
2245
+ unless status_code == 200 || status_code == 202
2246
+ error_model = JSON.load(response_content)
2247
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2248
+ end
2249
+
2250
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2251
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2252
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2253
+ # Deserialize Response
2254
+ if status_code == 200
2255
+ begin
2256
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2257
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::GatewayRouteListResult.mapper()
2258
+ result.body = @client.deserialize(result_mapper, parsed_response)
2259
+ rescue Exception => e
2260
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2261
+ end
2262
+ end
2263
+
2264
+ result
2265
+ end
2266
+
2267
+ promise.execute
2268
+ end
2269
+
2270
+ #
2271
+ # This operation retrieves a list of routes the virtual network gateway is
2272
+ # advertising to the specified peer.
2273
+ #
2274
+ # @param resource_group_name [String] The name of the resource group.
2275
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2276
+ # gateway.
2277
+ # @param peer [String] The IP address of the peer.
2278
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2279
+ # will be added to the HTTP request.
2280
+ #
2281
+ # @return [GatewayRouteListResult] operation results.
2282
+ #
2283
+ def begin_get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil)
2284
+ response = begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers).value!
2285
+ response.body unless response.nil?
2286
+ end
2287
+
2288
+ #
2289
+ # This operation retrieves a list of routes the virtual network gateway is
2290
+ # advertising to the specified peer.
2291
+ #
2292
+ # @param resource_group_name [String] The name of the resource group.
2293
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2294
+ # gateway.
2295
+ # @param peer [String] The IP address of the peer.
2296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2297
+ # will be added to the HTTP request.
2298
+ #
2299
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2300
+ #
2301
+ def begin_get_advertised_routes_with_http_info(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil)
2302
+ begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers).value!
2303
+ end
2304
+
2305
+ #
2306
+ # This operation retrieves a list of routes the virtual network gateway is
2307
+ # advertising to the specified peer.
2308
+ #
2309
+ # @param resource_group_name [String] The name of the resource group.
2310
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2311
+ # gateway.
2312
+ # @param peer [String] The IP address of the peer.
2313
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2314
+ # to the HTTP request.
2315
+ #
2316
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2317
+ #
2318
+ def begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil)
2319
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2320
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2321
+ fail ArgumentError, 'peer is nil' if peer.nil?
2322
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2323
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2324
+
2325
+
2326
+ request_headers = {}
2327
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2328
+
2329
+ # Set Headers
2330
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2331
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2332
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'
2333
+
2334
+ request_url = @base_url || @client.base_url
2335
+
2336
+ options = {
2337
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2338
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2339
+ query_params: {'peer' => peer,'api-version' => @client.api_version},
2340
+ headers: request_headers.merge(custom_headers || {}),
2341
+ base_url: request_url
2342
+ }
2343
+ promise = @client.make_request_async(:post, path_template, options)
2344
+
2345
+ promise = promise.then do |result|
2346
+ http_response = result.response
2347
+ status_code = http_response.status
2348
+ response_content = http_response.body
2349
+ unless status_code == 200 || status_code == 202
2350
+ error_model = JSON.load(response_content)
2351
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2352
+ end
2353
+
2354
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2355
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2356
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2357
+ # Deserialize Response
2358
+ if status_code == 200
2359
+ begin
2360
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2361
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::GatewayRouteListResult.mapper()
2362
+ result.body = @client.deserialize(result_mapper, parsed_response)
2363
+ rescue Exception => e
2364
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2365
+ end
2366
+ end
2367
+
2368
+ result
2369
+ end
2370
+
2371
+ promise.execute
2372
+ end
2373
+
2374
+ #
2375
+ # The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy
2376
+ # for P2S client of virtual network gateway in the specified resource group
2377
+ # through Network resource provider.
2378
+ #
2379
+ # @param resource_group_name [String] The name of the resource group.
2380
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2381
+ # gateway.
2382
+ # @param vpnclient_ipsec_params [VpnClientIPsecParameters] Parameters supplied
2383
+ # to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S
2384
+ # client operation through Network resource provider.
2385
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2386
+ # will be added to the HTTP request.
2387
+ #
2388
+ # @return [VpnClientIPsecParameters] operation results.
2389
+ #
2390
+ def begin_set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
2391
+ response = begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value!
2392
+ response.body unless response.nil?
2393
+ end
2394
+
2395
+ #
2396
+ # The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy
2397
+ # for P2S client of virtual network gateway in the specified resource group
2398
+ # through Network resource provider.
2399
+ #
2400
+ # @param resource_group_name [String] The name of the resource group.
2401
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2402
+ # gateway.
2403
+ # @param vpnclient_ipsec_params [VpnClientIPsecParameters] Parameters supplied
2404
+ # to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S
2405
+ # client operation through Network resource provider.
2406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2407
+ # will be added to the HTTP request.
2408
+ #
2409
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2410
+ #
2411
+ def begin_set_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
2412
+ begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value!
2413
+ end
2414
+
2415
+ #
2416
+ # The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy
2417
+ # for P2S client of virtual network gateway in the specified resource group
2418
+ # through Network resource provider.
2419
+ #
2420
+ # @param resource_group_name [String] The name of the resource group.
2421
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2422
+ # gateway.
2423
+ # @param vpnclient_ipsec_params [VpnClientIPsecParameters] Parameters supplied
2424
+ # to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S
2425
+ # client operation through Network resource provider.
2426
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2427
+ # to the HTTP request.
2428
+ #
2429
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2430
+ #
2431
+ def begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil)
2432
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2433
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2434
+ fail ArgumentError, 'vpnclient_ipsec_params is nil' if vpnclient_ipsec_params.nil?
2435
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2436
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2437
+
2438
+
2439
+ request_headers = {}
2440
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2441
+
2442
+ # Set Headers
2443
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2444
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2445
+
2446
+ # Serialize Request
2447
+ request_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientIPsecParameters.mapper()
2448
+ request_content = @client.serialize(request_mapper, vpnclient_ipsec_params)
2449
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2450
+
2451
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'
2452
+
2453
+ request_url = @base_url || @client.base_url
2454
+
2455
+ options = {
2456
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2457
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2458
+ query_params: {'api-version' => @client.api_version},
2459
+ body: request_content,
2460
+ headers: request_headers.merge(custom_headers || {}),
2461
+ base_url: request_url
2462
+ }
2463
+ promise = @client.make_request_async(:post, path_template, options)
2464
+
2465
+ promise = promise.then do |result|
2466
+ http_response = result.response
2467
+ status_code = http_response.status
2468
+ response_content = http_response.body
2469
+ unless status_code == 202 || status_code == 200
2470
+ error_model = JSON.load(response_content)
2471
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2472
+ end
2473
+
2474
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2475
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2476
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2477
+ # Deserialize Response
2478
+ if status_code == 200
2479
+ begin
2480
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2481
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientIPsecParameters.mapper()
2482
+ result.body = @client.deserialize(result_mapper, parsed_response)
2483
+ rescue Exception => e
2484
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2485
+ end
2486
+ end
2487
+
2488
+ result
2489
+ end
2490
+
2491
+ promise.execute
2492
+ end
2493
+
2494
+ #
2495
+ # The Get VpnclientIpsecParameters operation retrieves information about the
2496
+ # vpnclient ipsec policy for P2S client of virtual network gateway in the
2497
+ # specified resource group through Network resource provider.
2498
+ #
2499
+ # @param resource_group_name [String] The name of the resource group.
2500
+ # @param virtual_network_gateway_name [String] The virtual network gateway
2501
+ # name.
2502
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2503
+ # will be added to the HTTP request.
2504
+ #
2505
+ # @return [VpnClientIPsecParameters] operation results.
2506
+ #
2507
+ def begin_get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2508
+ response = begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2509
+ response.body unless response.nil?
2510
+ end
2511
+
2512
+ #
2513
+ # The Get VpnclientIpsecParameters operation retrieves information about the
2514
+ # vpnclient ipsec policy for P2S client of virtual network gateway in the
2515
+ # specified resource group through Network resource provider.
2516
+ #
2517
+ # @param resource_group_name [String] The name of the resource group.
2518
+ # @param virtual_network_gateway_name [String] The virtual network gateway
2519
+ # name.
2520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2521
+ # will be added to the HTTP request.
2522
+ #
2523
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2524
+ #
2525
+ def begin_get_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2526
+ begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2527
+ end
2528
+
2529
+ #
2530
+ # The Get VpnclientIpsecParameters operation retrieves information about the
2531
+ # vpnclient ipsec policy for P2S client of virtual network gateway in the
2532
+ # specified resource group through Network resource provider.
2533
+ #
2534
+ # @param resource_group_name [String] The name of the resource group.
2535
+ # @param virtual_network_gateway_name [String] The virtual network gateway
2536
+ # name.
2537
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2538
+ # to the HTTP request.
2539
+ #
2540
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2541
+ #
2542
+ def begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2543
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2544
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2545
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2546
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2547
+
2548
+
2549
+ request_headers = {}
2550
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2551
+
2552
+ # Set Headers
2553
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2554
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2555
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'
2556
+
2557
+ request_url = @base_url || @client.base_url
2558
+
2559
+ options = {
2560
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2561
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2562
+ query_params: {'api-version' => @client.api_version},
2563
+ headers: request_headers.merge(custom_headers || {}),
2564
+ base_url: request_url
2565
+ }
2566
+ promise = @client.make_request_async(:post, path_template, options)
2567
+
2568
+ promise = promise.then do |result|
2569
+ http_response = result.response
2570
+ status_code = http_response.status
2571
+ response_content = http_response.body
2572
+ unless status_code == 200
2573
+ error_model = JSON.load(response_content)
2574
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2575
+ end
2576
+
2577
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2578
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2579
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2580
+ # Deserialize Response
2581
+ if status_code == 200
2582
+ begin
2583
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2584
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientIPsecParameters.mapper()
2585
+ result.body = @client.deserialize(result_mapper, parsed_response)
2586
+ rescue Exception => e
2587
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2588
+ end
2589
+ end
2590
+
2591
+ result
2592
+ end
2593
+
2594
+ promise.execute
2595
+ end
2596
+
2597
+ #
2598
+ # Get VPN client connection health detail per P2S client connection of the
2599
+ # virtual network gateway in the specified resource group.
2600
+ #
2601
+ # @param resource_group_name [String] The name of the resource group.
2602
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2603
+ # gateway.
2604
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2605
+ # will be added to the HTTP request.
2606
+ #
2607
+ # @return [VpnClientConnectionHealthDetailListResult] operation results.
2608
+ #
2609
+ def begin_get_vpnclient_connection_health(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2610
+ response = begin_get_vpnclient_connection_health_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2611
+ response.body unless response.nil?
2612
+ end
2613
+
2614
+ #
2615
+ # Get VPN client connection health detail per P2S client connection of the
2616
+ # virtual network gateway in the specified resource group.
2617
+ #
2618
+ # @param resource_group_name [String] The name of the resource group.
2619
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2620
+ # gateway.
2621
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2622
+ # will be added to the HTTP request.
2623
+ #
2624
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2625
+ #
2626
+ def begin_get_vpnclient_connection_health_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2627
+ begin_get_vpnclient_connection_health_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2628
+ end
2629
+
2630
+ #
2631
+ # Get VPN client connection health detail per P2S client connection of the
2632
+ # virtual network gateway in the specified resource group.
2633
+ #
2634
+ # @param resource_group_name [String] The name of the resource group.
2635
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2636
+ # gateway.
2637
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2638
+ # to the HTTP request.
2639
+ #
2640
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2641
+ #
2642
+ def begin_get_vpnclient_connection_health_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2643
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2644
+ fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil?
2645
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2646
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2647
+
2648
+
2649
+ request_headers = {}
2650
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2651
+
2652
+ # Set Headers
2653
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2654
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2655
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth'
2656
+
2657
+ request_url = @base_url || @client.base_url
2658
+
2659
+ options = {
2660
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2661
+ path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id},
2662
+ query_params: {'api-version' => @client.api_version},
2663
+ headers: request_headers.merge(custom_headers || {}),
2664
+ base_url: request_url
2665
+ }
2666
+ promise = @client.make_request_async(:post, path_template, options)
2667
+
2668
+ promise = promise.then do |result|
2669
+ http_response = result.response
2670
+ status_code = http_response.status
2671
+ response_content = http_response.body
2672
+ unless status_code == 200 || status_code == 202
2673
+ error_model = JSON.load(response_content)
2674
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2675
+ end
2676
+
2677
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2678
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2679
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2680
+ # Deserialize Response
2681
+ if status_code == 200
2682
+ begin
2683
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2684
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VpnClientConnectionHealthDetailListResult.mapper()
2685
+ result.body = @client.deserialize(result_mapper, parsed_response)
2686
+ rescue Exception => e
2687
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2688
+ end
2689
+ end
2690
+
2691
+ result
2692
+ end
2693
+
2694
+ promise.execute
2695
+ end
2696
+
2697
+ #
2698
+ # Gets all virtual network gateways by resource group.
2699
+ #
2700
+ # @param next_page_link [String] The NextLink from the previous successful call
2701
+ # to List operation.
2702
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2703
+ # will be added to the HTTP request.
2704
+ #
2705
+ # @return [VirtualNetworkGatewayListResult] operation results.
2706
+ #
2707
+ def list_next(next_page_link, custom_headers:nil)
2708
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2709
+ response.body unless response.nil?
2710
+ end
2711
+
2712
+ #
2713
+ # Gets all virtual network gateways by resource group.
2714
+ #
2715
+ # @param next_page_link [String] The NextLink from the previous successful call
2716
+ # to List operation.
2717
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2718
+ # will be added to the HTTP request.
2719
+ #
2720
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2721
+ #
2722
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2723
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2724
+ end
2725
+
2726
+ #
2727
+ # Gets all virtual network gateways by resource group.
2728
+ #
2729
+ # @param next_page_link [String] The NextLink from the previous successful call
2730
+ # to List operation.
2731
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2732
+ # to the HTTP request.
2733
+ #
2734
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2735
+ #
2736
+ def list_next_async(next_page_link, custom_headers:nil)
2737
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2738
+
2739
+
2740
+ request_headers = {}
2741
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2742
+
2743
+ # Set Headers
2744
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2745
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2746
+ path_template = '{nextLink}'
2747
+
2748
+ request_url = @base_url || @client.base_url
2749
+
2750
+ options = {
2751
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2752
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2753
+ headers: request_headers.merge(custom_headers || {}),
2754
+ base_url: request_url
2755
+ }
2756
+ promise = @client.make_request_async(:get, path_template, options)
2757
+
2758
+ promise = promise.then do |result|
2759
+ http_response = result.response
2760
+ status_code = http_response.status
2761
+ response_content = http_response.body
2762
+ unless status_code == 200
2763
+ error_model = JSON.load(response_content)
2764
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2765
+ end
2766
+
2767
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2768
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2769
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2770
+ # Deserialize Response
2771
+ if status_code == 200
2772
+ begin
2773
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2774
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGatewayListResult.mapper()
2775
+ result.body = @client.deserialize(result_mapper, parsed_response)
2776
+ rescue Exception => e
2777
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2778
+ end
2779
+ end
2780
+
2781
+ result
2782
+ end
2783
+
2784
+ promise.execute
2785
+ end
2786
+
2787
+ #
2788
+ # Gets all the connections in a virtual network gateway.
2789
+ #
2790
+ # @param next_page_link [String] The NextLink from the previous successful call
2791
+ # to List operation.
2792
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2793
+ # will be added to the HTTP request.
2794
+ #
2795
+ # @return [VirtualNetworkGatewayListConnectionsResult] operation results.
2796
+ #
2797
+ def list_connections_next(next_page_link, custom_headers:nil)
2798
+ response = list_connections_next_async(next_page_link, custom_headers:custom_headers).value!
2799
+ response.body unless response.nil?
2800
+ end
2801
+
2802
+ #
2803
+ # Gets all the connections in a virtual network gateway.
2804
+ #
2805
+ # @param next_page_link [String] The NextLink from the previous successful call
2806
+ # to List operation.
2807
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2808
+ # will be added to the HTTP request.
2809
+ #
2810
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2811
+ #
2812
+ def list_connections_next_with_http_info(next_page_link, custom_headers:nil)
2813
+ list_connections_next_async(next_page_link, custom_headers:custom_headers).value!
2814
+ end
2815
+
2816
+ #
2817
+ # Gets all the connections in a virtual network gateway.
2818
+ #
2819
+ # @param next_page_link [String] The NextLink from the previous successful call
2820
+ # to List operation.
2821
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2822
+ # to the HTTP request.
2823
+ #
2824
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2825
+ #
2826
+ def list_connections_next_async(next_page_link, custom_headers:nil)
2827
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2828
+
2829
+
2830
+ request_headers = {}
2831
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2832
+
2833
+ # Set Headers
2834
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2835
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2836
+ path_template = '{nextLink}'
2837
+
2838
+ request_url = @base_url || @client.base_url
2839
+
2840
+ options = {
2841
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2842
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2843
+ headers: request_headers.merge(custom_headers || {}),
2844
+ base_url: request_url
2845
+ }
2846
+ promise = @client.make_request_async(:get, path_template, options)
2847
+
2848
+ promise = promise.then do |result|
2849
+ http_response = result.response
2850
+ status_code = http_response.status
2851
+ response_content = http_response.body
2852
+ unless status_code == 200
2853
+ error_model = JSON.load(response_content)
2854
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2855
+ end
2856
+
2857
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2858
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2859
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2860
+ # Deserialize Response
2861
+ if status_code == 200
2862
+ begin
2863
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2864
+ result_mapper = Azure::Network::Mgmt::V2019_06_01::Models::VirtualNetworkGatewayListConnectionsResult.mapper()
2865
+ result.body = @client.deserialize(result_mapper, parsed_response)
2866
+ rescue Exception => e
2867
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2868
+ end
2869
+ end
2870
+
2871
+ result
2872
+ end
2873
+
2874
+ promise.execute
2875
+ end
2876
+
2877
+ #
2878
+ # Gets all virtual network gateways by resource group.
2879
+ #
2880
+ # @param resource_group_name [String] The name of the resource group.
2881
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2882
+ # will be added to the HTTP request.
2883
+ #
2884
+ # @return [VirtualNetworkGatewayListResult] which provide lazy access to pages
2885
+ # of the response.
2886
+ #
2887
+ def list_as_lazy(resource_group_name, custom_headers:nil)
2888
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
2889
+ unless response.nil?
2890
+ page = response.body
2891
+ page.next_method = Proc.new do |next_page_link|
2892
+ list_next_async(next_page_link, custom_headers:custom_headers)
2893
+ end
2894
+ page
2895
+ end
2896
+ end
2897
+
2898
+ #
2899
+ # Gets all the connections in a virtual network gateway.
2900
+ #
2901
+ # @param resource_group_name [String] The name of the resource group.
2902
+ # @param virtual_network_gateway_name [String] The name of the virtual network
2903
+ # gateway.
2904
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2905
+ # will be added to the HTTP request.
2906
+ #
2907
+ # @return [VirtualNetworkGatewayListConnectionsResult] which provide lazy
2908
+ # access to pages of the response.
2909
+ #
2910
+ def list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers:nil)
2911
+ response = list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value!
2912
+ unless response.nil?
2913
+ page = response.body
2914
+ page.next_method = Proc.new do |next_page_link|
2915
+ list_connections_next_async(next_page_link, custom_headers:custom_headers)
2916
+ end
2917
+ page
2918
+ end
2919
+ end
2920
+
2921
+ end
2922
+ end