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 Routes
14
14
  include Azure::ARM::Network::Models
@@ -26,7 +26,7 @@ module Azure::ARM::Network
26
26
  attr_reader :client
27
27
 
28
28
  #
29
- # The delete route operation deletes the specified route from a route table.
29
+ # Deletes the specified route from a route table.
30
30
  #
31
31
  # @param resource_group_name [String] The name of the resource group.
32
32
  # @param route_table_name [String] The name of the route table.
@@ -66,7 +66,7 @@ module Azure::ARM::Network
66
66
  end
67
67
 
68
68
  #
69
- # The delete route operation deletes the specified route from a route table.
69
+ # Gets the specified route from a route table.
70
70
  #
71
71
  # @param resource_group_name [String] The name of the resource group.
72
72
  # @param route_table_name [String] The name of the route table.
@@ -74,14 +74,15 @@ module Azure::ARM::Network
74
74
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
75
75
  # will be added to the HTTP request.
76
76
  #
77
+ # @return [Route] operation results.
77
78
  #
78
- def begin_delete(resource_group_name, route_table_name, route_name, custom_headers = nil)
79
- response = begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers).value!
80
- nil
79
+ def get(resource_group_name, route_table_name, route_name, custom_headers = nil)
80
+ response = get_async(resource_group_name, route_table_name, route_name, custom_headers).value!
81
+ response.body unless response.nil?
81
82
  end
82
83
 
83
84
  #
84
- # The delete route operation deletes the specified route from a route table.
85
+ # Gets the specified route from a route table.
85
86
  #
86
87
  # @param resource_group_name [String] The name of the resource group.
87
88
  # @param route_table_name [String] The name of the route table.
@@ -91,12 +92,12 @@ module Azure::ARM::Network
91
92
  #
92
93
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
93
94
  #
94
- def begin_delete_with_http_info(resource_group_name, route_table_name, route_name, custom_headers = nil)
95
- begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers).value!
95
+ def get_with_http_info(resource_group_name, route_table_name, route_name, custom_headers = nil)
96
+ get_async(resource_group_name, route_table_name, route_name, custom_headers).value!
96
97
  end
97
98
 
98
99
  #
99
- # The delete route operation deletes the specified route from a route table.
100
+ # Gets the specified route from a route table.
100
101
  #
101
102
  # @param resource_group_name [String] The name of the resource group.
102
103
  # @param route_table_name [String] The name of the route table.
@@ -106,7 +107,7 @@ module Azure::ARM::Network
106
107
  #
107
108
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
108
109
  #
109
- def begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers = nil)
110
+ def get_async(resource_group_name, route_table_name, route_name, custom_headers = nil)
110
111
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
111
112
  fail ArgumentError, 'route_table_name is nil' if route_table_name.nil?
112
113
  fail ArgumentError, 'route_name is nil' if route_name.nil?
@@ -130,18 +131,28 @@ module Azure::ARM::Network
130
131
  headers: request_headers.merge(custom_headers || {}),
131
132
  base_url: request_url
132
133
  }
133
- promise = @client.make_request_async(:delete, path_template, options)
134
+ promise = @client.make_request_async(:get, path_template, options)
134
135
 
135
136
  promise = promise.then do |result|
136
137
  http_response = result.response
137
138
  status_code = http_response.status
138
139
  response_content = http_response.body
139
- unless status_code == 202 || status_code == 200 || status_code == 204
140
+ unless status_code == 200
140
141
  error_model = JSON.load(response_content)
141
142
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
142
143
  end
143
144
 
144
145
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
146
+ # Deserialize Response
147
+ if status_code == 200
148
+ begin
149
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
150
+ result_mapper = Route.mapper()
151
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
152
+ rescue Exception => e
153
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
154
+ end
155
+ end
145
156
 
146
157
  result
147
158
  end
@@ -150,54 +161,95 @@ module Azure::ARM::Network
150
161
  end
151
162
 
152
163
  #
153
- # The Get route operation retrieves information about the specified route from
154
- # the route table.
164
+ # Creates or updates a route in the specified route table.
155
165
  #
156
166
  # @param resource_group_name [String] The name of the resource group.
157
167
  # @param route_table_name [String] The name of the route table.
158
168
  # @param route_name [String] The name of the route.
169
+ # @param route_parameters [Route] Parameters supplied to the create or update
170
+ # route operation.
159
171
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
172
  # will be added to the HTTP request.
161
173
  #
162
174
  # @return [Route] operation results.
163
175
  #
164
- def get(resource_group_name, route_table_name, route_name, custom_headers = nil)
165
- response = get_async(resource_group_name, route_table_name, route_name, custom_headers).value!
176
+ def create_or_update(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
177
+ response = create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers).value!
166
178
  response.body unless response.nil?
167
179
  end
168
180
 
169
- #
170
- # The Get route operation retrieves information about the specified route from
171
- # the route table.
172
181
  #
173
182
  # @param resource_group_name [String] The name of the resource group.
174
183
  # @param route_table_name [String] The name of the route table.
175
184
  # @param route_name [String] The name of the route.
185
+ # @param route_parameters [Route] Parameters supplied to the create or update
186
+ # route operation.
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 create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
194
+ # Send request
195
+ promise = begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers)
196
+
197
+ promise = promise.then do |response|
198
+ # Defining deserialization method.
199
+ deserialize_method = lambda do |parsed_response|
200
+ result_mapper = Route.mapper()
201
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
202
+ end
203
+
204
+ # Waiting for response.
205
+ @client.get_long_running_operation_result(response, deserialize_method)
206
+ end
207
+
208
+ promise
209
+ end
210
+
211
+ #
212
+ # Gets all routes in a route table.
213
+ #
214
+ # @param resource_group_name [String] The name of the resource group.
215
+ # @param route_table_name [String] The name of the route table.
216
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
217
+ # will be added to the HTTP request.
218
+ #
219
+ # @return [Array<Route>] operation results.
220
+ #
221
+ def list(resource_group_name, route_table_name, custom_headers = nil)
222
+ first_page = list_as_lazy(resource_group_name, route_table_name, custom_headers)
223
+ first_page.get_all_items
224
+ end
225
+
226
+ #
227
+ # Gets all routes in a route table.
228
+ #
229
+ # @param resource_group_name [String] The name of the resource group.
230
+ # @param route_table_name [String] The name of the route table.
176
231
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
177
232
  # will be added to the HTTP request.
178
233
  #
179
234
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
180
235
  #
181
- def get_with_http_info(resource_group_name, route_table_name, route_name, custom_headers = nil)
182
- get_async(resource_group_name, route_table_name, route_name, custom_headers).value!
236
+ def list_with_http_info(resource_group_name, route_table_name, custom_headers = nil)
237
+ list_async(resource_group_name, route_table_name, custom_headers).value!
183
238
  end
184
239
 
185
240
  #
186
- # The Get route operation retrieves information about the specified route from
187
- # the route table.
241
+ # Gets all routes in a route table.
188
242
  #
189
243
  # @param resource_group_name [String] The name of the resource group.
190
244
  # @param route_table_name [String] The name of the route table.
191
- # @param route_name [String] The name of the route.
192
245
  # @param [Hash{String => String}] A hash of custom headers that will be added
193
246
  # to the HTTP request.
194
247
  #
195
248
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
196
249
  #
197
- def get_async(resource_group_name, route_table_name, route_name, custom_headers = nil)
250
+ def list_async(resource_group_name, route_table_name, custom_headers = nil)
198
251
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
199
252
  fail ArgumentError, 'route_table_name is nil' if route_table_name.nil?
200
- fail ArgumentError, 'route_name is nil' if route_name.nil?
201
253
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
202
254
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
203
255
 
@@ -207,13 +259,13 @@ module Azure::ARM::Network
207
259
  # Set Headers
208
260
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
209
261
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
210
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'
262
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'
211
263
 
212
264
  request_url = @base_url || @client.base_url
213
265
 
214
266
  options = {
215
267
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
216
- path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
268
+ path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'subscriptionId' => @client.subscription_id},
217
269
  query_params: {'api-version' => @client.api_version},
218
270
  headers: request_headers.merge(custom_headers || {}),
219
271
  base_url: request_url
@@ -234,7 +286,7 @@ module Azure::ARM::Network
234
286
  if status_code == 200
235
287
  begin
236
288
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
237
- result_mapper = Route.mapper()
289
+ result_mapper = RouteListResult.mapper()
238
290
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
239
291
  rescue Exception => e
240
292
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -248,106 +300,50 @@ module Azure::ARM::Network
248
300
  end
249
301
 
250
302
  #
251
- # The Put route operation creates/updates a route in the specified route table
252
- #
253
- # @param resource_group_name [String] The name of the resource group.
254
- # @param route_table_name [String] The name of the route table.
255
- # @param route_name [String] The name of the route.
256
- # @param route_parameters [Route] Parameters supplied to the create/update
257
- # route operation
258
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
259
- # will be added to the HTTP request.
260
- #
261
- # @return [Route] operation results.
262
- #
263
- def create_or_update(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
264
- response = create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers).value!
265
- response.body unless response.nil?
266
- end
267
-
268
- #
269
- # @param resource_group_name [String] The name of the resource group.
270
- # @param route_table_name [String] The name of the route table.
271
- # @param route_name [String] The name of the route.
272
- # @param route_parameters [Route] Parameters supplied to the create/update
273
- # route operation
274
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
275
- # will be added to the HTTP request.
276
- #
277
- # @return [Concurrent::Promise] promise which provides async access to http
278
- # response.
279
- #
280
- def create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
281
- # Send request
282
- promise = begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers)
283
-
284
- promise = promise.then do |response|
285
- # Defining deserialization method.
286
- deserialize_method = lambda do |parsed_response|
287
- result_mapper = Route.mapper()
288
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
289
- end
290
-
291
- # Waiting for response.
292
- @client.get_long_running_operation_result(response, deserialize_method)
293
- end
294
-
295
- promise
296
- end
297
-
298
- #
299
- # The Put route operation creates/updates a route in the specified route table
303
+ # Deletes the specified route from a route table.
300
304
  #
301
305
  # @param resource_group_name [String] The name of the resource group.
302
306
  # @param route_table_name [String] The name of the route table.
303
307
  # @param route_name [String] The name of the route.
304
- # @param route_parameters [Route] Parameters supplied to the create/update
305
- # route operation
306
308
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
307
309
  # will be added to the HTTP request.
308
310
  #
309
- # @return [Route] operation results.
310
311
  #
311
- def begin_create_or_update(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
312
- response = begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers).value!
313
- response.body unless response.nil?
312
+ def begin_delete(resource_group_name, route_table_name, route_name, custom_headers = nil)
313
+ response = begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers).value!
314
+ nil
314
315
  end
315
316
 
316
317
  #
317
- # The Put route operation creates/updates a route in the specified route table
318
+ # Deletes the specified route from a route table.
318
319
  #
319
320
  # @param resource_group_name [String] The name of the resource group.
320
321
  # @param route_table_name [String] The name of the route table.
321
322
  # @param route_name [String] The name of the route.
322
- # @param route_parameters [Route] Parameters supplied to the create/update
323
- # route operation
324
323
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
325
324
  # will be added to the HTTP request.
326
325
  #
327
326
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
328
327
  #
329
- def begin_create_or_update_with_http_info(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
330
- begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers).value!
328
+ def begin_delete_with_http_info(resource_group_name, route_table_name, route_name, custom_headers = nil)
329
+ begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers).value!
331
330
  end
332
331
 
333
332
  #
334
- # The Put route operation creates/updates a route in the specified route table
333
+ # Deletes the specified route from a route table.
335
334
  #
336
335
  # @param resource_group_name [String] The name of the resource group.
337
336
  # @param route_table_name [String] The name of the route table.
338
337
  # @param route_name [String] The name of the route.
339
- # @param route_parameters [Route] Parameters supplied to the create/update
340
- # route operation
341
338
  # @param [Hash{String => String}] A hash of custom headers that will be added
342
339
  # to the HTTP request.
343
340
  #
344
341
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
345
342
  #
346
- def begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
343
+ def begin_delete_async(resource_group_name, route_table_name, route_name, custom_headers = nil)
347
344
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
348
345
  fail ArgumentError, 'route_table_name is nil' if route_table_name.nil?
349
346
  fail ArgumentError, 'route_name is nil' if route_name.nil?
350
- fail ArgumentError, 'route_parameters is nil' if route_parameters.nil?
351
347
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
352
348
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
353
349
 
@@ -357,14 +353,6 @@ module Azure::ARM::Network
357
353
  # Set Headers
358
354
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
359
355
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
360
-
361
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
362
-
363
- # Serialize Request
364
- request_mapper = Route.mapper()
365
- request_content = @client.serialize(request_mapper, route_parameters, 'route_parameters')
366
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
367
-
368
356
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'
369
357
 
370
358
  request_url = @base_url || @client.base_url
@@ -373,42 +361,21 @@ module Azure::ARM::Network
373
361
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
374
362
  path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
375
363
  query_params: {'api-version' => @client.api_version},
376
- body: request_content,
377
364
  headers: request_headers.merge(custom_headers || {}),
378
365
  base_url: request_url
379
366
  }
380
- promise = @client.make_request_async(:put, path_template, options)
367
+ promise = @client.make_request_async(:delete, path_template, options)
381
368
 
382
369
  promise = promise.then do |result|
383
370
  http_response = result.response
384
371
  status_code = http_response.status
385
372
  response_content = http_response.body
386
- unless status_code == 200 || status_code == 201
373
+ unless status_code == 202 || status_code == 200 || status_code == 204
387
374
  error_model = JSON.load(response_content)
388
375
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
389
376
  end
390
377
 
391
378
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
392
- # Deserialize Response
393
- if status_code == 200
394
- begin
395
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
396
- result_mapper = Route.mapper()
397
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
398
- rescue Exception => e
399
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
400
- end
401
- end
402
- # Deserialize Response
403
- if status_code == 201
404
- begin
405
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
406
- result_mapper = Route.mapper()
407
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
408
- rescue Exception => e
409
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
410
- end
411
- end
412
379
 
413
380
  result
414
381
  end
@@ -417,72 +384,58 @@ module Azure::ARM::Network
417
384
  end
418
385
 
419
386
  #
420
- # The List network security rule operation retrieves all the routes in a route
421
- # table.
422
- #
423
- # @param resource_group_name [String] The name of the resource group.
424
- # @param route_table_name [String] The name of the route table.
425
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
426
- # will be added to the HTTP request.
427
- #
428
- # @return [RouteListResult] which provide lazy access to pages of the response.
429
- #
430
- def list_as_lazy(resource_group_name, route_table_name, custom_headers = nil)
431
- response = list_async(resource_group_name, route_table_name, custom_headers).value!
432
- unless response.nil?
433
- page = response.body
434
- page.next_method = Proc.new do |next_page_link|
435
- list_next_async(next_page_link, custom_headers)
436
- end
437
- page
438
- end
439
- end
440
-
441
- #
442
- # The List network security rule operation retrieves all the routes in a route
443
- # table.
387
+ # Creates or updates a route in the specified route table.
444
388
  #
445
389
  # @param resource_group_name [String] The name of the resource group.
446
390
  # @param route_table_name [String] The name of the route table.
391
+ # @param route_name [String] The name of the route.
392
+ # @param route_parameters [Route] Parameters supplied to the create or update
393
+ # route operation.
447
394
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
395
  # will be added to the HTTP request.
449
396
  #
450
- # @return [Array<Route>] operation results.
397
+ # @return [Route] operation results.
451
398
  #
452
- def list(resource_group_name, route_table_name, custom_headers = nil)
453
- first_page = list_as_lazy(resource_group_name, route_table_name, custom_headers)
454
- first_page.get_all_items
399
+ def begin_create_or_update(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
400
+ response = begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers).value!
401
+ response.body unless response.nil?
455
402
  end
456
403
 
457
404
  #
458
- # The List network security rule operation retrieves all the routes in a route
459
- # table.
405
+ # Creates or updates a route in the specified route table.
460
406
  #
461
407
  # @param resource_group_name [String] The name of the resource group.
462
408
  # @param route_table_name [String] The name of the route table.
409
+ # @param route_name [String] The name of the route.
410
+ # @param route_parameters [Route] Parameters supplied to the create or update
411
+ # route operation.
463
412
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
413
  # will be added to the HTTP request.
465
414
  #
466
415
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
467
416
  #
468
- def list_with_http_info(resource_group_name, route_table_name, custom_headers = nil)
469
- list_async(resource_group_name, route_table_name, custom_headers).value!
417
+ def begin_create_or_update_with_http_info(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
418
+ begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers).value!
470
419
  end
471
420
 
472
421
  #
473
- # The List network security rule operation retrieves all the routes in a route
474
- # table.
422
+ # Creates or updates a route in the specified route table.
475
423
  #
476
424
  # @param resource_group_name [String] The name of the resource group.
477
425
  # @param route_table_name [String] The name of the route table.
426
+ # @param route_name [String] The name of the route.
427
+ # @param route_parameters [Route] Parameters supplied to the create or update
428
+ # route operation.
478
429
  # @param [Hash{String => String}] A hash of custom headers that will be added
479
430
  # to the HTTP request.
480
431
  #
481
432
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
482
433
  #
483
- def list_async(resource_group_name, route_table_name, custom_headers = nil)
434
+ def begin_create_or_update_async(resource_group_name, route_table_name, route_name, route_parameters, custom_headers = nil)
484
435
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
485
436
  fail ArgumentError, 'route_table_name is nil' if route_table_name.nil?
437
+ fail ArgumentError, 'route_name is nil' if route_name.nil?
438
+ fail ArgumentError, 'route_parameters is nil' if route_parameters.nil?
486
439
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
487
440
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
488
441
 
@@ -492,24 +445,33 @@ module Azure::ARM::Network
492
445
  # Set Headers
493
446
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
494
447
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
495
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'
448
+
449
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
450
+
451
+ # Serialize Request
452
+ request_mapper = Route.mapper()
453
+ request_content = @client.serialize(request_mapper, route_parameters, 'route_parameters')
454
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
455
+
456
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'
496
457
 
497
458
  request_url = @base_url || @client.base_url
498
459
 
499
460
  options = {
500
461
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
501
- path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'subscriptionId' => @client.subscription_id},
462
+ path_params: {'resourceGroupName' => resource_group_name,'routeTableName' => route_table_name,'routeName' => route_name,'subscriptionId' => @client.subscription_id},
502
463
  query_params: {'api-version' => @client.api_version},
464
+ body: request_content,
503
465
  headers: request_headers.merge(custom_headers || {}),
504
466
  base_url: request_url
505
467
  }
506
- promise = @client.make_request_async(:get, path_template, options)
468
+ promise = @client.make_request_async(:put, path_template, options)
507
469
 
508
470
  promise = promise.then do |result|
509
471
  http_response = result.response
510
472
  status_code = http_response.status
511
473
  response_content = http_response.body
512
- unless status_code == 200
474
+ unless status_code == 200 || status_code == 201
513
475
  error_model = JSON.load(response_content)
514
476
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
515
477
  end
@@ -519,7 +481,17 @@ module Azure::ARM::Network
519
481
  if status_code == 200
520
482
  begin
521
483
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
522
- result_mapper = RouteListResult.mapper()
484
+ result_mapper = Route.mapper()
485
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
486
+ rescue Exception => e
487
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
488
+ end
489
+ end
490
+ # Deserialize Response
491
+ if status_code == 201
492
+ begin
493
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
494
+ result_mapper = Route.mapper()
523
495
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
524
496
  rescue Exception => e
525
497
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -533,11 +505,10 @@ module Azure::ARM::Network
533
505
  end
534
506
 
535
507
  #
536
- # The List network security rule operation retrieves all the routes in a route
537
- # table.
508
+ # Gets all routes in a route table.
538
509
  #
539
- # @param next_page_link [String] The NextLink from the previous successful
540
- # call to List operation.
510
+ # @param next_page_link [String] The NextLink from the previous successful call
511
+ # to List operation.
541
512
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
542
513
  # will be added to the HTTP request.
543
514
  #
@@ -549,11 +520,10 @@ module Azure::ARM::Network
549
520
  end
550
521
 
551
522
  #
552
- # The List network security rule operation retrieves all the routes in a route
553
- # table.
523
+ # Gets all routes in a route table.
554
524
  #
555
- # @param next_page_link [String] The NextLink from the previous successful
556
- # call to List operation.
525
+ # @param next_page_link [String] The NextLink from the previous successful call
526
+ # to List operation.
557
527
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
558
528
  # will be added to the HTTP request.
559
529
  #
@@ -564,11 +534,10 @@ module Azure::ARM::Network
564
534
  end
565
535
 
566
536
  #
567
- # The List network security rule operation retrieves all the routes in a route
568
- # table.
537
+ # Gets all routes in a route table.
569
538
  #
570
- # @param next_page_link [String] The NextLink from the previous successful
571
- # call to List operation.
539
+ # @param next_page_link [String] The NextLink from the previous successful call
540
+ # to List operation.
572
541
  # @param [Hash{String => String}] A hash of custom headers that will be added
573
542
  # to the HTTP request.
574
543
  #
@@ -622,5 +591,26 @@ module Azure::ARM::Network
622
591
  promise.execute
623
592
  end
624
593
 
594
+ #
595
+ # Gets all routes in a route table.
596
+ #
597
+ # @param resource_group_name [String] The name of the resource group.
598
+ # @param route_table_name [String] The name of the route table.
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ # @return [RouteListResult] which provide lazy access to pages of the response.
603
+ #
604
+ def list_as_lazy(resource_group_name, route_table_name, custom_headers = nil)
605
+ response = list_async(resource_group_name, route_table_name, custom_headers).value!
606
+ unless response.nil?
607
+ page = response.body
608
+ page.next_method = Proc.new do |next_page_link|
609
+ list_next_async(next_page_link, custom_headers)
610
+ end
611
+ page
612
+ end
613
+ end
614
+
625
615
  end
626
616
  end