azure_mgmt_network 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_network.rb +59 -52
  3. data/lib/generated/azure_mgmt_network/application_gateways.rb +426 -308
  4. data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +181 -199
  5. data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +175 -193
  6. data/lib/generated/azure_mgmt_network/express_route_circuits.rb +458 -497
  7. data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +36 -43
  8. data/lib/generated/azure_mgmt_network/load_balancers.rb +225 -242
  9. data/lib/generated/azure_mgmt_network/local_network_gateways.rb +168 -191
  10. data/lib/generated/azure_mgmt_network/models/address_space.rb +4 -4
  11. data/lib/generated/azure_mgmt_network/models/application_gateway.rb +42 -28
  12. data/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb +6 -6
  13. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +4 -4
  14. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +6 -6
  15. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb +52 -0
  16. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb +66 -0
  17. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb +65 -0
  18. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb +67 -0
  19. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb +18 -0
  20. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +16 -13
  21. data/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +1 -1
  22. data/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb +16 -0
  23. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +13 -12
  24. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +6 -6
  25. data/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +16 -14
  26. data/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +7 -6
  27. data/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb +4 -4
  28. data/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb +1 -1
  29. data/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +9 -9
  30. data/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb +19 -12
  31. data/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb +1 -1
  32. data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +14 -11
  33. data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +1 -1
  34. data/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb +11 -8
  35. data/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb +3 -1
  36. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +12 -9
  37. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb +4 -3
  38. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb +1 -1
  39. data/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb +2 -1
  40. data/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +10 -9
  41. data/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb +57 -0
  42. data/lib/generated/azure_mgmt_network/models/authorization_list_result.rb +6 -6
  43. data/lib/generated/azure_mgmt_network/models/authorization_use_status.rb +1 -1
  44. data/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb +4 -3
  45. data/lib/generated/azure_mgmt_network/models/backend_address_pool.rb +11 -11
  46. data/lib/generated/azure_mgmt_network/models/bgp_settings.rb +7 -6
  47. data/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +8 -3
  48. data/lib/generated/azure_mgmt_network/models/connection_shared_key.rb +4 -4
  49. data/lib/generated/azure_mgmt_network/models/dhcp_options.rb +4 -4
  50. data/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb +3 -3
  51. data/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +5 -6
  52. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb +4 -4
  53. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +5 -5
  54. data/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb +20 -17
  55. data/lib/generated/azure_mgmt_network/models/effective_route.rb +16 -13
  56. data/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +4 -4
  57. data/lib/generated/azure_mgmt_network/models/effective_route_source.rb +1 -1
  58. data/lib/generated/azure_mgmt_network/models/effective_route_state.rb +1 -1
  59. data/lib/generated/azure_mgmt_network/models/error.rb +2 -1
  60. data/lib/generated/azure_mgmt_network/models/error_details.rb +2 -1
  61. data/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +20 -21
  62. data/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb +6 -6
  63. data/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +10 -9
  64. data/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb +5 -5
  65. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +26 -24
  66. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +1 -1
  67. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb +10 -10
  68. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +6 -6
  69. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb +1 -1
  70. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb +1 -1
  71. data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb +4 -4
  72. data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +5 -5
  73. data/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +5 -5
  74. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb +9 -7
  75. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb +1 -1
  76. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +1 -1
  77. data/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb +2 -2
  78. data/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +5 -4
  79. data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +5 -5
  80. data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +5 -5
  81. data/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb +6 -6
  82. data/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +4 -4
  83. data/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb +5 -5
  84. data/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb +18 -19
  85. data/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb +19 -27
  86. data/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +25 -33
  87. data/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb +4 -4
  88. data/lib/generated/azure_mgmt_network/models/ipallocation_method.rb +1 -1
  89. data/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +12 -13
  90. data/lib/generated/azure_mgmt_network/models/ipversion.rb +1 -1
  91. data/lib/generated/azure_mgmt_network/models/load_balancer.rb +31 -16
  92. data/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +5 -5
  93. data/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +29 -38
  94. data/lib/generated/azure_mgmt_network/models/load_distribution.rb +1 -1
  95. data/lib/generated/azure_mgmt_network/models/local_network_gateway.rb +11 -10
  96. data/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +5 -5
  97. data/lib/generated/azure_mgmt_network/models/network_interface.rb +31 -20
  98. data/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb +18 -8
  99. data/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +19 -16
  100. data/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +5 -5
  101. data/lib/generated/azure_mgmt_network/models/network_operation_status.rb +1 -1
  102. data/lib/generated/azure_mgmt_network/models/network_security_group.rb +15 -15
  103. data/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb +5 -5
  104. data/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb +12 -14
  105. data/lib/generated/azure_mgmt_network/models/probe.rb +27 -28
  106. data/lib/generated/azure_mgmt_network/models/probe_protocol.rb +1 -1
  107. data/lib/generated/azure_mgmt_network/models/processor_architecture.rb +1 -1
  108. data/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +15 -15
  109. data/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +15 -14
  110. data/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb +5 -5
  111. data/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb +6 -6
  112. data/lib/generated/azure_mgmt_network/models/route.rb +13 -13
  113. data/lib/generated/azure_mgmt_network/models/route_list_result.rb +4 -4
  114. data/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb +1 -1
  115. data/lib/generated/azure_mgmt_network/models/route_table.rb +8 -7
  116. data/lib/generated/azure_mgmt_network/models/route_table_list_result.rb +5 -5
  117. data/lib/generated/azure_mgmt_network/models/security_rule.rb +33 -36
  118. data/lib/generated/azure_mgmt_network/models/security_rule_access.rb +1 -1
  119. data/lib/generated/azure_mgmt_network/models/security_rule_direction.rb +1 -1
  120. data/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb +6 -6
  121. data/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb +1 -1
  122. data/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb +1 -1
  123. data/lib/generated/azure_mgmt_network/models/subnet.rb +14 -15
  124. data/lib/generated/azure_mgmt_network/models/subnet_list_result.rb +4 -4
  125. data/lib/generated/azure_mgmt_network/models/transport_protocol.rb +1 -1
  126. data/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb +92 -0
  127. data/lib/generated/azure_mgmt_network/models/usage.rb +7 -7
  128. data/lib/generated/azure_mgmt_network/models/usage_name.rb +4 -5
  129. data/lib/generated/azure_mgmt_network/models/usages_list_result.rb +3 -3
  130. data/lib/generated/azure_mgmt_network/models/virtual_network.rb +15 -16
  131. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +26 -23
  132. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +45 -18
  133. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +6 -5
  134. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +1 -1
  135. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +1 -1
  136. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +15 -14
  137. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +5 -5
  138. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb +12 -10
  139. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +1 -1
  140. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +1 -1
  141. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb +1 -1
  142. data/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb +5 -5
  143. data/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb +21 -23
  144. data/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb +6 -6
  145. data/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb +1 -1
  146. data/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +5 -5
  147. data/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb +5 -4
  148. data/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +10 -9
  149. data/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb +10 -8
  150. data/lib/generated/azure_mgmt_network/models/vpn_type.rb +1 -1
  151. data/lib/generated/azure_mgmt_network/module_definition.rb +1 -1
  152. data/lib/generated/azure_mgmt_network/network_interfaces.rb +443 -478
  153. data/lib/generated/azure_mgmt_network/network_management_client.rb +20 -7
  154. data/lib/generated/azure_mgmt_network/network_security_groups.rb +224 -249
  155. data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +220 -241
  156. data/lib/generated/azure_mgmt_network/route_tables.rb +219 -226
  157. data/lib/generated/azure_mgmt_network/routes.rb +171 -181
  158. data/lib/generated/azure_mgmt_network/security_rules.rb +175 -193
  159. data/lib/generated/azure_mgmt_network/subnets.rb +177 -181
  160. data/lib/generated/azure_mgmt_network/usages.rb +34 -34
  161. data/lib/generated/azure_mgmt_network/version.rb +2 -2
  162. data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +335 -358
  163. data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +246 -289
  164. data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +177 -191
  165. data/lib/generated/azure_mgmt_network/virtual_networks.rb +242 -249
  166. metadata +12 -5
  167. data/lib/generated/azure_mgmt_network/models/connection_shared_key_result.rb +0 -44
@@ -1,14 +1,14 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Network
7
7
  #
8
8
  # The Microsoft Azure Network management API provides a RESTful set of web
9
- # services that interact with Microsoft Azure Networks service to manage
10
- # your network resources. The API has entities that capture the
11
- # relationship between an end user and the Microsoft Azure Networks service.
9
+ # services that interact with Microsoft Azure Networks service to manage your
10
+ # network resources. The API has entities that capture the relationship
11
+ # between an end user and the Microsoft Azure Networks service.
12
12
  #
13
13
  class ExpressRouteServiceProviders
14
14
  include Azure::ARM::Network::Models
@@ -26,29 +26,7 @@ module Azure::ARM::Network
26
26
  attr_reader :client
27
27
 
28
28
  #
29
- # The List ExpressRouteServiceProvider operation retrieves all the available
30
- # ExpressRouteServiceProviders.
31
- #
32
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
- # will be added to the HTTP request.
34
- #
35
- # @return [ExpressRouteServiceProviderListResult] which provide lazy access to
36
- # pages of the response.
37
- #
38
- def list_as_lazy(custom_headers = nil)
39
- response = list_async(custom_headers).value!
40
- unless response.nil?
41
- page = response.body
42
- page.next_method = Proc.new do |next_page_link|
43
- list_next_async(next_page_link, custom_headers)
44
- end
45
- page
46
- end
47
- end
48
-
49
- #
50
- # The List ExpressRouteServiceProvider operation retrieves all the available
51
- # ExpressRouteServiceProviders.
29
+ # Gets all the available express route service providers.
52
30
  #
53
31
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
32
  # will be added to the HTTP request.
@@ -61,8 +39,7 @@ module Azure::ARM::Network
61
39
  end
62
40
 
63
41
  #
64
- # The List ExpressRouteServiceProvider operation retrieves all the available
65
- # ExpressRouteServiceProviders.
42
+ # Gets all the available express route service providers.
66
43
  #
67
44
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
68
45
  # will be added to the HTTP request.
@@ -74,8 +51,7 @@ module Azure::ARM::Network
74
51
  end
75
52
 
76
53
  #
77
- # The List ExpressRouteServiceProvider operation retrieves all the available
78
- # ExpressRouteServiceProviders.
54
+ # Gets all the available express route service providers.
79
55
  #
80
56
  # @param [Hash{String => String}] A hash of custom headers that will be added
81
57
  # to the HTTP request.
@@ -133,11 +109,10 @@ module Azure::ARM::Network
133
109
  end
134
110
 
135
111
  #
136
- # The List ExpressRouteServiceProvider operation retrieves all the available
137
- # ExpressRouteServiceProviders.
112
+ # Gets all the available express route service providers.
138
113
  #
139
- # @param next_page_link [String] The NextLink from the previous successful
140
- # call to List operation.
114
+ # @param next_page_link [String] The NextLink from the previous successful call
115
+ # to List operation.
141
116
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
117
  # will be added to the HTTP request.
143
118
  #
@@ -149,11 +124,10 @@ module Azure::ARM::Network
149
124
  end
150
125
 
151
126
  #
152
- # The List ExpressRouteServiceProvider operation retrieves all the available
153
- # ExpressRouteServiceProviders.
127
+ # Gets all the available express route service providers.
154
128
  #
155
- # @param next_page_link [String] The NextLink from the previous successful
156
- # call to List operation.
129
+ # @param next_page_link [String] The NextLink from the previous successful call
130
+ # to List operation.
157
131
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
132
  # will be added to the HTTP request.
159
133
  #
@@ -164,11 +138,10 @@ module Azure::ARM::Network
164
138
  end
165
139
 
166
140
  #
167
- # The List ExpressRouteServiceProvider operation retrieves all the available
168
- # ExpressRouteServiceProviders.
141
+ # Gets all the available express route service providers.
169
142
  #
170
- # @param next_page_link [String] The NextLink from the previous successful
171
- # call to List operation.
143
+ # @param next_page_link [String] The NextLink from the previous successful call
144
+ # to List operation.
172
145
  # @param [Hash{String => String}] A hash of custom headers that will be added
173
146
  # to the HTTP request.
174
147
  #
@@ -222,5 +195,25 @@ module Azure::ARM::Network
222
195
  promise.execute
223
196
  end
224
197
 
198
+ #
199
+ # Gets all the available express route service providers.
200
+ #
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [ExpressRouteServiceProviderListResult] which provide lazy access to
205
+ # pages of the response.
206
+ #
207
+ def list_as_lazy(custom_headers = nil)
208
+ response = list_async(custom_headers).value!
209
+ unless response.nil?
210
+ page = response.body
211
+ page.next_method = Proc.new do |next_page_link|
212
+ list_next_async(next_page_link, custom_headers)
213
+ end
214
+ page
215
+ end
216
+ end
217
+
225
218
  end
226
219
  end
@@ -1,14 +1,14 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Network
7
7
  #
8
8
  # The Microsoft Azure Network management API provides a RESTful set of web
9
- # services that interact with Microsoft Azure Networks service to manage
10
- # your network resources. The API has entities that capture the
11
- # relationship between an end user and the Microsoft Azure Networks service.
9
+ # services that interact with Microsoft Azure Networks service to manage your
10
+ # network resources. The API has entities that capture the relationship
11
+ # between an end user and the Microsoft Azure Networks service.
12
12
  #
13
13
  class LoadBalancers
14
14
  include Azure::ARM::Network::Models
@@ -26,10 +26,10 @@ module Azure::ARM::Network
26
26
  attr_reader :client
27
27
 
28
28
  #
29
- # The delete LoadBalancer operation deletes the specified load balancer.
29
+ # Deletes the specified load balancer.
30
30
  #
31
31
  # @param resource_group_name [String] The name of the resource group.
32
- # @param load_balancer_name [String] The name of the loadBalancer.
32
+ # @param load_balancer_name [String] The name of the load balancer.
33
33
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
34
  # will be added to the HTTP request.
35
35
  #
@@ -40,7 +40,7 @@ module Azure::ARM::Network
40
40
 
41
41
  #
42
42
  # @param resource_group_name [String] The name of the resource group.
43
- # @param load_balancer_name [String] The name of the loadBalancer.
43
+ # @param load_balancer_name [String] The name of the load balancer.
44
44
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
45
  # will be added to the HTTP request.
46
46
  #
@@ -64,92 +64,11 @@ module Azure::ARM::Network
64
64
  end
65
65
 
66
66
  #
67
- # The delete LoadBalancer operation deletes the specified load balancer.
67
+ # Gets the specified load balancer.
68
68
  #
69
69
  # @param resource_group_name [String] The name of the resource group.
70
- # @param load_balancer_name [String] The name of the loadBalancer.
71
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
72
- # will be added to the HTTP request.
73
- #
74
- #
75
- def begin_delete(resource_group_name, load_balancer_name, custom_headers = nil)
76
- response = begin_delete_async(resource_group_name, load_balancer_name, custom_headers).value!
77
- nil
78
- end
79
-
80
- #
81
- # The delete LoadBalancer operation deletes the specified load balancer.
82
- #
83
- # @param resource_group_name [String] The name of the resource group.
84
- # @param load_balancer_name [String] The name of the loadBalancer.
85
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
86
- # will be added to the HTTP request.
87
- #
88
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
89
- #
90
- def begin_delete_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil)
91
- begin_delete_async(resource_group_name, load_balancer_name, custom_headers).value!
92
- end
93
-
94
- #
95
- # The delete LoadBalancer operation deletes the specified load balancer.
96
- #
97
- # @param resource_group_name [String] The name of the resource group.
98
- # @param load_balancer_name [String] The name of the loadBalancer.
99
- # @param [Hash{String => String}] A hash of custom headers that will be added
100
- # to the HTTP request.
101
- #
102
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
103
- #
104
- def begin_delete_async(resource_group_name, load_balancer_name, custom_headers = nil)
105
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
106
- fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
107
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
108
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
109
-
110
-
111
- request_headers = {}
112
-
113
- # Set Headers
114
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
115
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
116
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'
117
-
118
- request_url = @base_url || @client.base_url
119
-
120
- options = {
121
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
122
- path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id},
123
- query_params: {'api-version' => @client.api_version},
124
- headers: request_headers.merge(custom_headers || {}),
125
- base_url: request_url
126
- }
127
- promise = @client.make_request_async(:delete, path_template, options)
128
-
129
- promise = promise.then do |result|
130
- http_response = result.response
131
- status_code = http_response.status
132
- response_content = http_response.body
133
- unless status_code == 204 || status_code == 202 || status_code == 200
134
- error_model = JSON.load(response_content)
135
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
136
- end
137
-
138
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
139
-
140
- result
141
- end
142
-
143
- promise.execute
144
- end
145
-
146
- #
147
- # The Get LoadBalancer operation retrieves information about the specified
148
- # LoadBalancer.
149
- #
150
- # @param resource_group_name [String] The name of the resource group.
151
- # @param load_balancer_name [String] The name of the loadBalancer.
152
- # @param expand [String] expand references resources.
70
+ # @param load_balancer_name [String] The name of the load balancer.
71
+ # @param expand [String] Expands referenced resources.
153
72
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
73
  # will be added to the HTTP request.
155
74
  #
@@ -161,12 +80,11 @@ module Azure::ARM::Network
161
80
  end
162
81
 
163
82
  #
164
- # The Get LoadBalancer operation retrieves information about the specified
165
- # LoadBalancer.
83
+ # Gets the specified load balancer.
166
84
  #
167
85
  # @param resource_group_name [String] The name of the resource group.
168
- # @param load_balancer_name [String] The name of the loadBalancer.
169
- # @param expand [String] expand references resources.
86
+ # @param load_balancer_name [String] The name of the load balancer.
87
+ # @param expand [String] Expands referenced resources.
170
88
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
171
89
  # will be added to the HTTP request.
172
90
  #
@@ -177,12 +95,11 @@ module Azure::ARM::Network
177
95
  end
178
96
 
179
97
  #
180
- # The Get LoadBalancer operation retrieves information about the specified
181
- # LoadBalancer.
98
+ # Gets the specified load balancer.
182
99
  #
183
100
  # @param resource_group_name [String] The name of the resource group.
184
- # @param load_balancer_name [String] The name of the loadBalancer.
185
- # @param expand [String] expand references resources.
101
+ # @param load_balancer_name [String] The name of the load balancer.
102
+ # @param expand [String] Expands referenced resources.
186
103
  # @param [Hash{String => String}] A hash of custom headers that will be added
187
104
  # to the HTTP request.
188
105
  #
@@ -241,12 +158,12 @@ module Azure::ARM::Network
241
158
  end
242
159
 
243
160
  #
244
- # The Put LoadBalancer operation creates/updates a LoadBalancer
161
+ # Creates or updates a load balancer.
245
162
  #
246
163
  # @param resource_group_name [String] The name of the resource group.
247
- # @param load_balancer_name [String] The name of the loadBalancer.
248
- # @param parameters [LoadBalancer] Parameters supplied to the create/delete
249
- # LoadBalancer operation
164
+ # @param load_balancer_name [String] The name of the load balancer.
165
+ # @param parameters [LoadBalancer] Parameters supplied to the create or update
166
+ # load balancer operation.
250
167
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
168
  # will be added to the HTTP request.
252
169
  #
@@ -259,9 +176,9 @@ module Azure::ARM::Network
259
176
 
260
177
  #
261
178
  # @param resource_group_name [String] The name of the resource group.
262
- # @param load_balancer_name [String] The name of the loadBalancer.
263
- # @param parameters [LoadBalancer] Parameters supplied to the create/delete
264
- # LoadBalancer operation
179
+ # @param load_balancer_name [String] The name of the load balancer.
180
+ # @param parameters [LoadBalancer] Parameters supplied to the create or update
181
+ # load balancer operation.
265
182
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
266
183
  # will be added to the HTTP request.
267
184
  #
@@ -287,54 +204,39 @@ module Azure::ARM::Network
287
204
  end
288
205
 
289
206
  #
290
- # The Put LoadBalancer operation creates/updates a LoadBalancer
207
+ # Gets all the load balancers in a subscription.
291
208
  #
292
- # @param resource_group_name [String] The name of the resource group.
293
- # @param load_balancer_name [String] The name of the loadBalancer.
294
- # @param parameters [LoadBalancer] Parameters supplied to the create/delete
295
- # LoadBalancer operation
296
209
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
210
  # will be added to the HTTP request.
298
211
  #
299
- # @return [LoadBalancer] operation results.
212
+ # @return [Array<LoadBalancer>] operation results.
300
213
  #
301
- def begin_create_or_update(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
302
- response = begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers).value!
303
- response.body unless response.nil?
214
+ def list_all(custom_headers = nil)
215
+ first_page = list_all_as_lazy(custom_headers)
216
+ first_page.get_all_items
304
217
  end
305
218
 
306
219
  #
307
- # The Put LoadBalancer operation creates/updates a LoadBalancer
220
+ # Gets all the load balancers in a subscription.
308
221
  #
309
- # @param resource_group_name [String] The name of the resource group.
310
- # @param load_balancer_name [String] The name of the loadBalancer.
311
- # @param parameters [LoadBalancer] Parameters supplied to the create/delete
312
- # LoadBalancer operation
313
222
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
314
223
  # will be added to the HTTP request.
315
224
  #
316
225
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
317
226
  #
318
- def begin_create_or_update_with_http_info(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
319
- begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers).value!
227
+ def list_all_with_http_info(custom_headers = nil)
228
+ list_all_async(custom_headers).value!
320
229
  end
321
230
 
322
231
  #
323
- # The Put LoadBalancer operation creates/updates a LoadBalancer
232
+ # Gets all the load balancers in a subscription.
324
233
  #
325
- # @param resource_group_name [String] The name of the resource group.
326
- # @param load_balancer_name [String] The name of the loadBalancer.
327
- # @param parameters [LoadBalancer] Parameters supplied to the create/delete
328
- # LoadBalancer operation
329
234
  # @param [Hash{String => String}] A hash of custom headers that will be added
330
235
  # to the HTTP request.
331
236
  #
332
237
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
333
238
  #
334
- def begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
335
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
336
- fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
337
- fail ArgumentError, 'parameters is nil' if parameters.nil?
239
+ def list_all_async(custom_headers = nil)
338
240
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
339
241
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
340
242
 
@@ -344,53 +246,34 @@ module Azure::ARM::Network
344
246
  # Set Headers
345
247
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
346
248
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
347
-
348
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
349
-
350
- # Serialize Request
351
- request_mapper = LoadBalancer.mapper()
352
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
353
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
354
-
355
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'
249
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'
356
250
 
357
251
  request_url = @base_url || @client.base_url
358
252
 
359
253
  options = {
360
254
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
361
- path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id},
255
+ path_params: {'subscriptionId' => @client.subscription_id},
362
256
  query_params: {'api-version' => @client.api_version},
363
- body: request_content,
364
257
  headers: request_headers.merge(custom_headers || {}),
365
258
  base_url: request_url
366
259
  }
367
- promise = @client.make_request_async(:put, path_template, options)
260
+ promise = @client.make_request_async(:get, path_template, options)
368
261
 
369
262
  promise = promise.then do |result|
370
263
  http_response = result.response
371
264
  status_code = http_response.status
372
265
  response_content = http_response.body
373
- unless status_code == 201 || status_code == 200
266
+ unless status_code == 200
374
267
  error_model = JSON.load(response_content)
375
268
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
376
269
  end
377
270
 
378
271
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
379
272
  # Deserialize Response
380
- if status_code == 201
381
- begin
382
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
383
- result_mapper = LoadBalancer.mapper()
384
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
385
- rescue Exception => e
386
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
387
- end
388
- end
389
- # Deserialize Response
390
273
  if status_code == 200
391
274
  begin
392
275
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
393
- result_mapper = LoadBalancer.mapper()
276
+ result_mapper = LoadBalancerListResult.mapper()
394
277
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
395
278
  rescue Exception => e
396
279
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -404,63 +287,43 @@ module Azure::ARM::Network
404
287
  end
405
288
 
406
289
  #
407
- # The List loadBalancer operation retrieves all the load balancers in a
408
- # subscription.
409
- #
410
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
411
- # will be added to the HTTP request.
412
- #
413
- # @return [LoadBalancerListResult] which provide lazy access to pages of the
414
- # response.
415
- #
416
- def list_all_as_lazy(custom_headers = nil)
417
- response = list_all_async(custom_headers).value!
418
- unless response.nil?
419
- page = response.body
420
- page.next_method = Proc.new do |next_page_link|
421
- list_all_next_async(next_page_link, custom_headers)
422
- end
423
- page
424
- end
425
- end
426
-
427
- #
428
- # The List loadBalancer operation retrieves all the load balancers in a
429
- # subscription.
290
+ # Gets all the load balancers in a resource group.
430
291
  #
292
+ # @param resource_group_name [String] The name of the resource group.
431
293
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
432
294
  # will be added to the HTTP request.
433
295
  #
434
296
  # @return [Array<LoadBalancer>] operation results.
435
297
  #
436
- def list_all(custom_headers = nil)
437
- first_page = list_all_as_lazy(custom_headers)
298
+ def list(resource_group_name, custom_headers = nil)
299
+ first_page = list_as_lazy(resource_group_name, custom_headers)
438
300
  first_page.get_all_items
439
301
  end
440
302
 
441
303
  #
442
- # The List loadBalancer operation retrieves all the load balancers in a
443
- # subscription.
304
+ # Gets all the load balancers in a resource group.
444
305
  #
306
+ # @param resource_group_name [String] The name of the resource group.
445
307
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
446
308
  # will be added to the HTTP request.
447
309
  #
448
310
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
449
311
  #
450
- def list_all_with_http_info(custom_headers = nil)
451
- list_all_async(custom_headers).value!
312
+ def list_with_http_info(resource_group_name, custom_headers = nil)
313
+ list_async(resource_group_name, custom_headers).value!
452
314
  end
453
315
 
454
316
  #
455
- # The List loadBalancer operation retrieves all the load balancers in a
456
- # subscription.
317
+ # Gets all the load balancers in a resource group.
457
318
  #
319
+ # @param resource_group_name [String] The name of the resource group.
458
320
  # @param [Hash{String => String}] A hash of custom headers that will be added
459
321
  # to the HTTP request.
460
322
  #
461
323
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
462
324
  #
463
- def list_all_async(custom_headers = nil)
325
+ def list_async(resource_group_name, custom_headers = nil)
326
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
464
327
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
465
328
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
466
329
 
@@ -470,13 +333,13 @@ module Azure::ARM::Network
470
333
  # Set Headers
471
334
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
472
335
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
473
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'
336
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'
474
337
 
475
338
  request_url = @base_url || @client.base_url
476
339
 
477
340
  options = {
478
341
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
479
- path_params: {'subscriptionId' => @client.subscription_id},
342
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
480
343
  query_params: {'api-version' => @client.api_version},
481
344
  headers: request_headers.merge(custom_headers || {}),
482
345
  base_url: request_url
@@ -511,68 +374,134 @@ module Azure::ARM::Network
511
374
  end
512
375
 
513
376
  #
514
- # The List loadBalancer operation retrieves all the load balancers in a
515
- # resource group.
377
+ # Deletes the specified load balancer.
516
378
  #
517
379
  # @param resource_group_name [String] The name of the resource group.
380
+ # @param load_balancer_name [String] The name of the load balancer.
518
381
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
519
382
  # will be added to the HTTP request.
520
383
  #
521
- # @return [LoadBalancerListResult] which provide lazy access to pages of the
522
- # response.
523
384
  #
524
- def list_as_lazy(resource_group_name, custom_headers = nil)
525
- response = list_async(resource_group_name, custom_headers).value!
526
- unless response.nil?
527
- page = response.body
528
- page.next_method = Proc.new do |next_page_link|
529
- list_next_async(next_page_link, custom_headers)
385
+ def begin_delete(resource_group_name, load_balancer_name, custom_headers = nil)
386
+ response = begin_delete_async(resource_group_name, load_balancer_name, custom_headers).value!
387
+ nil
388
+ end
389
+
390
+ #
391
+ # Deletes the specified load balancer.
392
+ #
393
+ # @param resource_group_name [String] The name of the resource group.
394
+ # @param load_balancer_name [String] The name of the load balancer.
395
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
396
+ # will be added to the HTTP request.
397
+ #
398
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
399
+ #
400
+ def begin_delete_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil)
401
+ begin_delete_async(resource_group_name, load_balancer_name, custom_headers).value!
402
+ end
403
+
404
+ #
405
+ # Deletes the specified load balancer.
406
+ #
407
+ # @param resource_group_name [String] The name of the resource group.
408
+ # @param load_balancer_name [String] The name of the load balancer.
409
+ # @param [Hash{String => String}] A hash of custom headers that will be added
410
+ # to the HTTP request.
411
+ #
412
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
413
+ #
414
+ def begin_delete_async(resource_group_name, load_balancer_name, custom_headers = nil)
415
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
416
+ fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
417
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
418
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
419
+
420
+
421
+ request_headers = {}
422
+
423
+ # Set Headers
424
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
425
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
426
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'
427
+
428
+ request_url = @base_url || @client.base_url
429
+
430
+ options = {
431
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
432
+ path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id},
433
+ query_params: {'api-version' => @client.api_version},
434
+ headers: request_headers.merge(custom_headers || {}),
435
+ base_url: request_url
436
+ }
437
+ promise = @client.make_request_async(:delete, path_template, options)
438
+
439
+ promise = promise.then do |result|
440
+ http_response = result.response
441
+ status_code = http_response.status
442
+ response_content = http_response.body
443
+ unless status_code == 204 || status_code == 202 || status_code == 200
444
+ error_model = JSON.load(response_content)
445
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
530
446
  end
531
- page
447
+
448
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
449
+
450
+ result
532
451
  end
452
+
453
+ promise.execute
533
454
  end
534
455
 
535
456
  #
536
- # The List loadBalancer operation retrieves all the load balancers in a
537
- # resource group.
457
+ # Creates or updates a load balancer.
538
458
  #
539
459
  # @param resource_group_name [String] The name of the resource group.
460
+ # @param load_balancer_name [String] The name of the load balancer.
461
+ # @param parameters [LoadBalancer] Parameters supplied to the create or update
462
+ # load balancer operation.
540
463
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
541
464
  # will be added to the HTTP request.
542
465
  #
543
- # @return [Array<LoadBalancer>] operation results.
466
+ # @return [LoadBalancer] operation results.
544
467
  #
545
- def list(resource_group_name, custom_headers = nil)
546
- first_page = list_as_lazy(resource_group_name, custom_headers)
547
- first_page.get_all_items
468
+ def begin_create_or_update(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
469
+ response = begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers).value!
470
+ response.body unless response.nil?
548
471
  end
549
472
 
550
473
  #
551
- # The List loadBalancer operation retrieves all the load balancers in a
552
- # resource group.
474
+ # Creates or updates a load balancer.
553
475
  #
554
476
  # @param resource_group_name [String] The name of the resource group.
477
+ # @param load_balancer_name [String] The name of the load balancer.
478
+ # @param parameters [LoadBalancer] Parameters supplied to the create or update
479
+ # load balancer operation.
555
480
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
556
481
  # will be added to the HTTP request.
557
482
  #
558
483
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
559
484
  #
560
- def list_with_http_info(resource_group_name, custom_headers = nil)
561
- list_async(resource_group_name, custom_headers).value!
485
+ def begin_create_or_update_with_http_info(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
486
+ begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers).value!
562
487
  end
563
488
 
564
489
  #
565
- # The List loadBalancer operation retrieves all the load balancers in a
566
- # resource group.
490
+ # Creates or updates a load balancer.
567
491
  #
568
492
  # @param resource_group_name [String] The name of the resource group.
493
+ # @param load_balancer_name [String] The name of the load balancer.
494
+ # @param parameters [LoadBalancer] Parameters supplied to the create or update
495
+ # load balancer operation.
569
496
  # @param [Hash{String => String}] A hash of custom headers that will be added
570
497
  # to the HTTP request.
571
498
  #
572
499
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
573
500
  #
574
- def list_async(resource_group_name, custom_headers = nil)
501
+ def begin_create_or_update_async(resource_group_name, load_balancer_name, parameters, custom_headers = nil)
575
502
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
503
+ fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil?
504
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
576
505
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
577
506
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
578
507
 
@@ -582,34 +511,53 @@ module Azure::ARM::Network
582
511
  # Set Headers
583
512
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
584
513
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
585
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'
514
+
515
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
516
+
517
+ # Serialize Request
518
+ request_mapper = LoadBalancer.mapper()
519
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
520
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
521
+
522
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'
586
523
 
587
524
  request_url = @base_url || @client.base_url
588
525
 
589
526
  options = {
590
527
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
591
- path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
528
+ path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id},
592
529
  query_params: {'api-version' => @client.api_version},
530
+ body: request_content,
593
531
  headers: request_headers.merge(custom_headers || {}),
594
532
  base_url: request_url
595
533
  }
596
- promise = @client.make_request_async(:get, path_template, options)
534
+ promise = @client.make_request_async(:put, path_template, options)
597
535
 
598
536
  promise = promise.then do |result|
599
537
  http_response = result.response
600
538
  status_code = http_response.status
601
539
  response_content = http_response.body
602
- unless status_code == 200
540
+ unless status_code == 201 || status_code == 200
603
541
  error_model = JSON.load(response_content)
604
542
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
605
543
  end
606
544
 
607
545
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
608
546
  # Deserialize Response
547
+ if status_code == 201
548
+ begin
549
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
550
+ result_mapper = LoadBalancer.mapper()
551
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
552
+ rescue Exception => e
553
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
554
+ end
555
+ end
556
+ # Deserialize Response
609
557
  if status_code == 200
610
558
  begin
611
559
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
612
- result_mapper = LoadBalancerListResult.mapper()
560
+ result_mapper = LoadBalancer.mapper()
613
561
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
614
562
  rescue Exception => e
615
563
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -623,11 +571,10 @@ module Azure::ARM::Network
623
571
  end
624
572
 
625
573
  #
626
- # The List loadBalancer operation retrieves all the load balancers in a
627
- # subscription.
574
+ # Gets all the load balancers in a subscription.
628
575
  #
629
- # @param next_page_link [String] The NextLink from the previous successful
630
- # call to List operation.
576
+ # @param next_page_link [String] The NextLink from the previous successful call
577
+ # to List operation.
631
578
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
632
579
  # will be added to the HTTP request.
633
580
  #
@@ -639,11 +586,10 @@ module Azure::ARM::Network
639
586
  end
640
587
 
641
588
  #
642
- # The List loadBalancer operation retrieves all the load balancers in a
643
- # subscription.
589
+ # Gets all the load balancers in a subscription.
644
590
  #
645
- # @param next_page_link [String] The NextLink from the previous successful
646
- # call to List operation.
591
+ # @param next_page_link [String] The NextLink from the previous successful call
592
+ # to List operation.
647
593
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
648
594
  # will be added to the HTTP request.
649
595
  #
@@ -654,11 +600,10 @@ module Azure::ARM::Network
654
600
  end
655
601
 
656
602
  #
657
- # The List loadBalancer operation retrieves all the load balancers in a
658
- # subscription.
603
+ # Gets all the load balancers in a subscription.
659
604
  #
660
- # @param next_page_link [String] The NextLink from the previous successful
661
- # call to List operation.
605
+ # @param next_page_link [String] The NextLink from the previous successful call
606
+ # to List operation.
662
607
  # @param [Hash{String => String}] A hash of custom headers that will be added
663
608
  # to the HTTP request.
664
609
  #
@@ -713,11 +658,10 @@ module Azure::ARM::Network
713
658
  end
714
659
 
715
660
  #
716
- # The List loadBalancer operation retrieves all the load balancers in a
717
- # resource group.
661
+ # Gets all the load balancers in a resource group.
718
662
  #
719
- # @param next_page_link [String] The NextLink from the previous successful
720
- # call to List operation.
663
+ # @param next_page_link [String] The NextLink from the previous successful call
664
+ # to List operation.
721
665
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
722
666
  # will be added to the HTTP request.
723
667
  #
@@ -729,11 +673,10 @@ module Azure::ARM::Network
729
673
  end
730
674
 
731
675
  #
732
- # The List loadBalancer operation retrieves all the load balancers in a
733
- # resource group.
676
+ # Gets all the load balancers in a resource group.
734
677
  #
735
- # @param next_page_link [String] The NextLink from the previous successful
736
- # call to List operation.
678
+ # @param next_page_link [String] The NextLink from the previous successful call
679
+ # to List operation.
737
680
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
738
681
  # will be added to the HTTP request.
739
682
  #
@@ -744,11 +687,10 @@ module Azure::ARM::Network
744
687
  end
745
688
 
746
689
  #
747
- # The List loadBalancer operation retrieves all the load balancers in a
748
- # resource group.
690
+ # Gets all the load balancers in a resource group.
749
691
  #
750
- # @param next_page_link [String] The NextLink from the previous successful
751
- # call to List operation.
692
+ # @param next_page_link [String] The NextLink from the previous successful call
693
+ # to List operation.
752
694
  # @param [Hash{String => String}] A hash of custom headers that will be added
753
695
  # to the HTTP request.
754
696
  #
@@ -802,5 +744,46 @@ module Azure::ARM::Network
802
744
  promise.execute
803
745
  end
804
746
 
747
+ #
748
+ # Gets all the load balancers in a subscription.
749
+ #
750
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
751
+ # will be added to the HTTP request.
752
+ #
753
+ # @return [LoadBalancerListResult] which provide lazy access to pages of the
754
+ # response.
755
+ #
756
+ def list_all_as_lazy(custom_headers = nil)
757
+ response = list_all_async(custom_headers).value!
758
+ unless response.nil?
759
+ page = response.body
760
+ page.next_method = Proc.new do |next_page_link|
761
+ list_all_next_async(next_page_link, custom_headers)
762
+ end
763
+ page
764
+ end
765
+ end
766
+
767
+ #
768
+ # Gets all the load balancers in a resource group.
769
+ #
770
+ # @param resource_group_name [String] The name of the resource group.
771
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
772
+ # will be added to the HTTP request.
773
+ #
774
+ # @return [LoadBalancerListResult] which provide lazy access to pages of the
775
+ # response.
776
+ #
777
+ def list_as_lazy(resource_group_name, custom_headers = nil)
778
+ response = list_async(resource_group_name, custom_headers).value!
779
+ unless response.nil?
780
+ page = response.body
781
+ page.next_method = Proc.new do |next_page_link|
782
+ list_next_async(next_page_link, custom_headers)
783
+ end
784
+ page
785
+ end
786
+ end
787
+
805
788
  end
806
789
  end