azure_mgmt_network 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +1 -26
  3. data/azure_mgmt_network.gemspec +2 -2
  4. data/lib/azure_mgmt_network.rb +33 -31
  5. data/lib/azure_mgmt_network/application_gateways.rb +345 -55
  6. data/lib/azure_mgmt_network/express_route_circuit_authorizations.rb +207 -31
  7. data/lib/azure_mgmt_network/express_route_circuit_peerings.rb +205 -31
  8. data/lib/azure_mgmt_network/express_route_circuits.rb +633 -168
  9. data/lib/azure_mgmt_network/express_route_service_providers.rb +73 -11
  10. data/lib/azure_mgmt_network/load_balancers.rb +267 -41
  11. data/lib/azure_mgmt_network/local_network_gateways.rb +205 -31
  12. data/lib/azure_mgmt_network/models/address_space.rb +1 -1
  13. data/lib/azure_mgmt_network/models/application_gateway.rb +1 -1
  14. data/lib/azure_mgmt_network/models/application_gateway_backend_address.rb +1 -1
  15. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +1 -1
  16. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool_properties_format.rb +5 -5
  17. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +1 -1
  18. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings_properties_format.rb +1 -1
  19. data/lib/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +1 -1
  20. data/lib/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +1 -1
  21. data/lib/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration_properties_format.rb +1 -1
  22. data/lib/azure_mgmt_network/models/application_gateway_frontend_port.rb +1 -1
  23. data/lib/azure_mgmt_network/models/application_gateway_frontend_port_properties_format.rb +1 -1
  24. data/lib/azure_mgmt_network/models/application_gateway_http_listener.rb +1 -1
  25. data/lib/azure_mgmt_network/models/application_gateway_http_listener_properties_format.rb +1 -1
  26. data/lib/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +1 -1
  27. data/lib/azure_mgmt_network/models/application_gateway_ipconfiguration_properties_format.rb +1 -1
  28. data/lib/azure_mgmt_network/models/application_gateway_list_result.rb +1 -1
  29. data/lib/azure_mgmt_network/models/application_gateway_operational_state.rb +1 -1
  30. data/lib/azure_mgmt_network/models/application_gateway_path_rule.rb +1 -1
  31. data/lib/azure_mgmt_network/models/application_gateway_path_rule_properties_format.rb +1 -1
  32. data/lib/azure_mgmt_network/models/application_gateway_probe.rb +1 -1
  33. data/lib/azure_mgmt_network/models/application_gateway_probe_properties_format.rb +1 -1
  34. data/lib/azure_mgmt_network/models/application_gateway_properties_format.rb +1 -1
  35. data/lib/azure_mgmt_network/models/application_gateway_protocol.rb +1 -1
  36. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +1 -1
  37. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_properties_format.rb +1 -1
  38. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +1 -1
  39. data/lib/azure_mgmt_network/models/application_gateway_sku.rb +1 -1
  40. data/lib/azure_mgmt_network/models/application_gateway_sku_name.rb +1 -1
  41. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +1 -1
  42. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate_properties_format.rb +1 -1
  43. data/lib/azure_mgmt_network/models/application_gateway_tier.rb +1 -1
  44. data/lib/azure_mgmt_network/models/application_gateway_url_path_map.rb +1 -1
  45. data/lib/azure_mgmt_network/models/application_gateway_url_path_map_properties_format.rb +1 -1
  46. data/lib/azure_mgmt_network/models/authorization_list_result.rb +1 -1
  47. data/lib/azure_mgmt_network/models/authorization_properties_format.rb +1 -1
  48. data/lib/azure_mgmt_network/models/authorization_use_status.rb +1 -1
  49. data/lib/azure_mgmt_network/models/azure_async_operation_result.rb +1 -1
  50. data/lib/azure_mgmt_network/models/backend_address_pool.rb +1 -1
  51. data/lib/azure_mgmt_network/models/backend_address_pool_properties_format.rb +1 -1
  52. data/lib/azure_mgmt_network/models/bgp_settings.rb +1 -1
  53. data/lib/azure_mgmt_network/models/connection_reset_shared_key.rb +1 -1
  54. data/lib/azure_mgmt_network/models/connection_shared_key.rb +1 -1
  55. data/lib/azure_mgmt_network/models/connection_shared_key_result.rb +1 -1
  56. data/lib/azure_mgmt_network/models/dhcp_options.rb +1 -1
  57. data/lib/azure_mgmt_network/models/dns_name_availability_result.rb +1 -1
  58. data/lib/azure_mgmt_network/models/error.rb +1 -1
  59. data/lib/azure_mgmt_network/models/error_details.rb +1 -1
  60. data/lib/azure_mgmt_network/models/express_route_circuit.rb +1 -1
  61. data/lib/azure_mgmt_network/models/express_route_circuit_arp_table.rb +20 -1
  62. data/lib/azure_mgmt_network/models/express_route_circuit_authorization.rb +1 -1
  63. data/lib/azure_mgmt_network/models/express_route_circuit_list_result.rb +1 -1
  64. data/lib/azure_mgmt_network/models/express_route_circuit_peering.rb +1 -1
  65. data/lib/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +1 -1
  66. data/lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb +1 -1
  67. data/lib/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +1 -1
  68. data/lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb +1 -1
  69. data/lib/azure_mgmt_network/models/express_route_circuit_peering_state.rb +1 -1
  70. data/lib/azure_mgmt_network/models/express_route_circuit_peering_type.rb +1 -1
  71. data/lib/azure_mgmt_network/models/express_route_circuit_properties_format.rb +10 -1
  72. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb +36 -32
  73. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +97 -0
  74. data/lib/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +1 -1
  75. data/lib/azure_mgmt_network/models/express_route_circuit_sku.rb +1 -1
  76. data/lib/azure_mgmt_network/models/express_route_circuit_sku_family.rb +1 -1
  77. data/lib/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +1 -1
  78. data/lib/azure_mgmt_network/models/express_route_circuit_stats.rb +31 -11
  79. data/lib/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +1 -1
  80. data/lib/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +1 -1
  81. data/lib/azure_mgmt_network/models/{express_route_circuits_stats_list_result.rb → express_route_circuits_routes_table_summary_list_result.rb} +11 -8
  82. data/lib/azure_mgmt_network/models/express_route_service_provider.rb +1 -1
  83. data/lib/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +1 -1
  84. data/lib/azure_mgmt_network/models/express_route_service_provider_list_result.rb +1 -1
  85. data/lib/azure_mgmt_network/models/express_route_service_provider_properties_format.rb +1 -1
  86. data/lib/azure_mgmt_network/models/frontend_ipconfiguration.rb +1 -1
  87. data/lib/azure_mgmt_network/models/frontend_ipconfiguration_properties_format.rb +1 -1
  88. data/lib/azure_mgmt_network/models/inbound_nat_pool.rb +1 -1
  89. data/lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb +1 -1
  90. data/lib/azure_mgmt_network/models/inbound_nat_rule.rb +1 -1
  91. data/lib/azure_mgmt_network/models/inbound_nat_rule_properties_format.rb +1 -1
  92. data/lib/azure_mgmt_network/models/ipallocation_method.rb +1 -1
  93. data/lib/azure_mgmt_network/models/ipconfiguration.rb +1 -1
  94. data/lib/azure_mgmt_network/models/ipconfiguration_properties_format.rb +1 -1
  95. data/lib/azure_mgmt_network/models/ipversion.rb +16 -0
  96. data/lib/azure_mgmt_network/models/load_balancer.rb +1 -1
  97. data/lib/azure_mgmt_network/models/load_balancer_list_result.rb +1 -1
  98. data/lib/azure_mgmt_network/models/load_balancer_properties_format.rb +1 -1
  99. data/lib/azure_mgmt_network/models/load_balancing_rule.rb +1 -1
  100. data/lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb +1 -1
  101. data/lib/azure_mgmt_network/models/load_distribution.rb +1 -1
  102. data/lib/azure_mgmt_network/models/local_network_gateway.rb +1 -1
  103. data/lib/azure_mgmt_network/models/local_network_gateway_list_result.rb +1 -1
  104. data/lib/azure_mgmt_network/models/local_network_gateway_properties_format.rb +1 -1
  105. data/lib/azure_mgmt_network/models/network_interface.rb +1 -1
  106. data/lib/azure_mgmt_network/models/network_interface_dns_settings.rb +11 -4
  107. data/lib/azure_mgmt_network/models/network_interface_ipconfiguration.rb +1 -1
  108. data/lib/azure_mgmt_network/models/network_interface_ipconfiguration_properties_format.rb +59 -14
  109. data/lib/azure_mgmt_network/models/network_interface_list_result.rb +1 -1
  110. data/lib/azure_mgmt_network/models/network_interface_properties_format.rb +1 -1
  111. data/lib/azure_mgmt_network/models/network_operation_status.rb +1 -1
  112. data/lib/azure_mgmt_network/models/network_security_group.rb +1 -1
  113. data/lib/azure_mgmt_network/models/network_security_group_list_result.rb +1 -1
  114. data/lib/azure_mgmt_network/models/network_security_group_properties_format.rb +1 -1
  115. data/lib/azure_mgmt_network/models/outbound_nat_rule.rb +1 -1
  116. data/lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb +1 -1
  117. data/lib/azure_mgmt_network/models/probe.rb +1 -1
  118. data/lib/azure_mgmt_network/models/probe_properties_format.rb +1 -1
  119. data/lib/azure_mgmt_network/models/probe_protocol.rb +1 -1
  120. data/lib/azure_mgmt_network/models/processor_architecture.rb +1 -1
  121. data/lib/azure_mgmt_network/models/public_ipaddress.rb +1 -1
  122. data/lib/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +1 -1
  123. data/lib/azure_mgmt_network/models/public_ipaddress_list_result.rb +1 -1
  124. data/lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb +15 -1
  125. data/lib/azure_mgmt_network/models/route.rb +1 -1
  126. data/lib/azure_mgmt_network/models/route_list_result.rb +1 -1
  127. data/lib/azure_mgmt_network/models/route_next_hop_type.rb +1 -1
  128. data/lib/azure_mgmt_network/models/route_properties_format.rb +1 -1
  129. data/lib/azure_mgmt_network/models/route_table.rb +1 -1
  130. data/lib/azure_mgmt_network/models/route_table_list_result.rb +1 -1
  131. data/lib/azure_mgmt_network/models/route_table_properties_format.rb +1 -1
  132. data/lib/azure_mgmt_network/models/security_rule.rb +1 -1
  133. data/lib/azure_mgmt_network/models/security_rule_access.rb +1 -1
  134. data/lib/azure_mgmt_network/models/security_rule_direction.rb +1 -1
  135. data/lib/azure_mgmt_network/models/security_rule_list_result.rb +1 -1
  136. data/lib/azure_mgmt_network/models/security_rule_properties_format.rb +1 -1
  137. data/lib/azure_mgmt_network/models/security_rule_protocol.rb +1 -1
  138. data/lib/azure_mgmt_network/models/service_provider_provisioning_state.rb +1 -1
  139. data/lib/azure_mgmt_network/models/subnet.rb +1 -1
  140. data/lib/azure_mgmt_network/models/subnet_list_result.rb +1 -1
  141. data/lib/azure_mgmt_network/models/subnet_properties_format.rb +1 -1
  142. data/lib/azure_mgmt_network/models/transport_protocol.rb +1 -1
  143. data/lib/azure_mgmt_network/models/usage.rb +1 -1
  144. data/lib/azure_mgmt_network/models/usage_name.rb +1 -1
  145. data/lib/azure_mgmt_network/models/usages_list_result.rb +1 -1
  146. data/lib/azure_mgmt_network/models/virtual_network.rb +1 -1
  147. data/lib/azure_mgmt_network/models/virtual_network_gateway.rb +1 -1
  148. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection.rb +1 -1
  149. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +1 -1
  150. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_properties_format.rb +1 -1
  151. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +1 -1
  152. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +1 -1
  153. data/lib/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +1 -1
  154. data/lib/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration_properties_format.rb +1 -1
  155. data/lib/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +1 -1
  156. data/lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb +1 -1
  157. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku.rb +1 -1
  158. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +1 -1
  159. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +1 -1
  160. data/lib/azure_mgmt_network/models/virtual_network_gateway_type.rb +1 -1
  161. data/lib/azure_mgmt_network/models/virtual_network_list_result.rb +1 -1
  162. data/lib/azure_mgmt_network/models/virtual_network_properties_format.rb +1 -1
  163. data/lib/azure_mgmt_network/models/vpn_client_configuration.rb +1 -1
  164. data/lib/azure_mgmt_network/models/vpn_client_parameters.rb +1 -1
  165. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +1 -1
  166. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate_properties_format.rb +1 -1
  167. data/lib/azure_mgmt_network/models/vpn_client_root_certificate.rb +1 -1
  168. data/lib/azure_mgmt_network/models/vpn_client_root_certificate_properties_format.rb +1 -1
  169. data/lib/azure_mgmt_network/models/vpn_type.rb +1 -1
  170. data/lib/azure_mgmt_network/module_definition.rb +1 -1
  171. data/lib/azure_mgmt_network/network_interfaces.rb +471 -66
  172. data/lib/azure_mgmt_network/network_management_client.rb +40 -7
  173. data/lib/azure_mgmt_network/network_security_groups.rb +277 -41
  174. data/lib/azure_mgmt_network/public_ipaddresses.rb +269 -41
  175. data/lib/azure_mgmt_network/route_tables.rb +261 -41
  176. data/lib/azure_mgmt_network/routes.rb +201 -31
  177. data/lib/azure_mgmt_network/security_rules.rb +213 -31
  178. data/lib/azure_mgmt_network/subnets.rb +199 -31
  179. data/lib/azure_mgmt_network/usages.rb +71 -11
  180. data/lib/azure_mgmt_network/version.rb +2 -2
  181. data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +357 -52
  182. data/lib/azure_mgmt_network/virtual_network_gateways.rb +303 -45
  183. data/lib/azure_mgmt_network/virtual_networks.rb +261 -41
  184. metadata +34 -25
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -38,7 +38,7 @@ module Azure::ARM::Network
38
38
  #
39
39
  def delete(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
40
40
  # Send request
41
- promise = begin_delete(resource_group_name, network_security_group_name, security_rule_name, custom_headers)
41
+ promise = begin_delete_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers)
42
42
 
43
43
  promise = promise.then do |response|
44
44
  # Defining deserialization method.
@@ -46,7 +46,7 @@ module Azure::ARM::Network
46
46
  end
47
47
 
48
48
  # Waiting for response.
49
- @client.get_post_or_delete_operation_result(response, deserialize_method)
49
+ @client.get_long_running_operation_result(response, deserialize_method)
50
50
  end
51
51
 
52
52
  promise
@@ -60,13 +60,46 @@ module Azure::ARM::Network
60
60
  # @param network_security_group_name [String] The name of the network security
61
61
  # group.
62
62
  # @param security_rule_name [String] The name of the security rule.
63
- # @param [Hash{String => String}] The hash of custom headers need to be
64
- # applied to HTTP request.
63
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
64
+ # will be added to the HTTP request.
65
65
  #
66
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
67
- # response.
68
66
  #
69
67
  def begin_delete(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
68
+ response = begin_delete_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers).value!
69
+ nil
70
+ end
71
+
72
+ #
73
+ # The delete network security rule operation deletes the specified network
74
+ # security rule.
75
+ #
76
+ # @param resource_group_name [String] The name of the resource group.
77
+ # @param network_security_group_name [String] The name of the network security
78
+ # group.
79
+ # @param security_rule_name [String] The name of the security rule.
80
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
81
+ # will be added to the HTTP request.
82
+ #
83
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
84
+ #
85
+ def begin_delete_with_http_info(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
86
+ begin_delete_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers).value!
87
+ end
88
+
89
+ #
90
+ # The delete network security rule operation deletes the specified network
91
+ # security rule.
92
+ #
93
+ # @param resource_group_name [String] The name of the resource group.
94
+ # @param network_security_group_name [String] The name of the network security
95
+ # group.
96
+ # @param security_rule_name [String] The name of the security rule.
97
+ # @param [Hash{String => String}] A hash of custom headers that will be added
98
+ # to the HTTP request.
99
+ #
100
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
101
+ #
102
+ def begin_delete_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
70
103
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
71
104
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
72
105
  fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil?
@@ -84,7 +117,10 @@ module Azure::ARM::Network
84
117
  query_params: {'api-version' => @client.api_version},
85
118
  headers: request_headers.merge(custom_headers || {})
86
119
  }
87
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
120
+
121
+ request_url = @base_url || @client.base_url
122
+
123
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
88
124
  promise = request.run_promise do |req|
89
125
  @client.credentials.sign_request(req) unless @client.credentials.nil?
90
126
  end
@@ -115,13 +151,47 @@ module Azure::ARM::Network
115
151
  # @param network_security_group_name [String] The name of the network security
116
152
  # group.
117
153
  # @param security_rule_name [String] The name of the security rule.
118
- # @param [Hash{String => String}] The hash of custom headers need to be
119
- # applied to HTTP request.
154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
155
+ # will be added to the HTTP request.
120
156
  #
121
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
122
- # response.
157
+ # @return [SecurityRule] operation results.
123
158
  #
124
159
  def get(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
160
+ response = get_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers).value!
161
+ response.body unless response.nil?
162
+ end
163
+
164
+ #
165
+ # The Get NetworkSecurityRule operation retreives information about the
166
+ # specified network security rule.
167
+ #
168
+ # @param resource_group_name [String] The name of the resource group.
169
+ # @param network_security_group_name [String] The name of the network security
170
+ # group.
171
+ # @param security_rule_name [String] The name of the security rule.
172
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
173
+ # will be added to the HTTP request.
174
+ #
175
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
176
+ #
177
+ def get_with_http_info(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
178
+ get_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers).value!
179
+ end
180
+
181
+ #
182
+ # The Get NetworkSecurityRule operation retreives information about the
183
+ # specified network security rule.
184
+ #
185
+ # @param resource_group_name [String] The name of the resource group.
186
+ # @param network_security_group_name [String] The name of the network security
187
+ # group.
188
+ # @param security_rule_name [String] The name of the security rule.
189
+ # @param [Hash{String => String}] A hash of custom headers that will be added
190
+ # to the HTTP request.
191
+ #
192
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
193
+ #
194
+ def get_async(resource_group_name, network_security_group_name, security_rule_name, custom_headers = nil)
125
195
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
126
196
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
127
197
  fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil?
@@ -139,7 +209,10 @@ module Azure::ARM::Network
139
209
  query_params: {'api-version' => @client.api_version},
140
210
  headers: request_headers.merge(custom_headers || {})
141
211
  }
142
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
212
+
213
+ request_url = @base_url || @client.base_url
214
+
215
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
143
216
  promise = request.run_promise do |req|
144
217
  @client.credentials.sign_request(req) unless @client.credentials.nil?
145
218
  end
@@ -196,7 +269,7 @@ module Azure::ARM::Network
196
269
  #
197
270
  def create_or_update(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers = nil)
198
271
  # Send request
199
- promise = begin_create_or_update(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers)
272
+ promise = begin_create_or_update_async(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers)
200
273
 
201
274
  promise = promise.then do |response|
202
275
  # Defining deserialization method.
@@ -207,7 +280,7 @@ module Azure::ARM::Network
207
280
  end
208
281
 
209
282
  # Waiting for response.
210
- @client.get_put_operation_result(response, deserialize_method)
283
+ @client.get_long_running_operation_result(response, deserialize_method)
211
284
  end
212
285
 
213
286
  promise
@@ -223,13 +296,51 @@ module Azure::ARM::Network
223
296
  # @param security_rule_name [String] The name of the security rule.
224
297
  # @param security_rule_parameters [SecurityRule] Parameters supplied to the
225
298
  # create/update network security rule operation
226
- # @param [Hash{String => String}] The hash of custom headers need to be
227
- # applied to HTTP request.
299
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
300
+ # will be added to the HTTP request.
228
301
  #
229
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
230
- # response.
302
+ # @return [SecurityRule] operation results.
231
303
  #
232
304
  def begin_create_or_update(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers = nil)
305
+ response = begin_create_or_update_async(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers).value!
306
+ response.body unless response.nil?
307
+ end
308
+
309
+ #
310
+ # The Put network security rule operation creates/updates a security rule in
311
+ # the specified network security group
312
+ #
313
+ # @param resource_group_name [String] The name of the resource group.
314
+ # @param network_security_group_name [String] The name of the network security
315
+ # group.
316
+ # @param security_rule_name [String] The name of the security rule.
317
+ # @param security_rule_parameters [SecurityRule] Parameters supplied to the
318
+ # create/update network security rule operation
319
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
+ # will be added to the HTTP request.
321
+ #
322
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
323
+ #
324
+ def begin_create_or_update_with_http_info(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers = nil)
325
+ begin_create_or_update_async(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers).value!
326
+ end
327
+
328
+ #
329
+ # The Put network security rule operation creates/updates a security rule in
330
+ # the specified network security group
331
+ #
332
+ # @param resource_group_name [String] The name of the resource group.
333
+ # @param network_security_group_name [String] The name of the network security
334
+ # group.
335
+ # @param security_rule_name [String] The name of the security rule.
336
+ # @param security_rule_parameters [SecurityRule] Parameters supplied to the
337
+ # create/update network security rule operation
338
+ # @param [Hash{String => String}] A hash of custom headers that will be added
339
+ # to the HTTP request.
340
+ #
341
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
342
+ #
343
+ def begin_create_or_update_async(resource_group_name, network_security_group_name, security_rule_name, security_rule_parameters, custom_headers = nil)
233
344
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
234
345
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
235
346
  fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil?
@@ -248,7 +359,7 @@ module Azure::ARM::Network
248
359
  unless security_rule_parameters.nil?
249
360
  security_rule_parameters = SecurityRule.serialize_object(security_rule_parameters)
250
361
  end
251
- request_content = JSON.generate(security_rule_parameters, quirks_mode: true)
362
+ request_content = security_rule_parameters != nil ? JSON.generate(security_rule_parameters, quirks_mode: true) : nil
252
363
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'
253
364
  options = {
254
365
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -257,7 +368,10 @@ module Azure::ARM::Network
257
368
  body: request_content,
258
369
  headers: request_headers.merge(custom_headers || {})
259
370
  }
260
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
371
+
372
+ request_url = @base_url || @client.base_url
373
+
374
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
261
375
  promise = request.run_promise do |req|
262
376
  @client.credentials.sign_request(req) unless @client.credentials.nil?
263
377
  end
@@ -311,13 +425,45 @@ module Azure::ARM::Network
311
425
  # @param resource_group_name [String] The name of the resource group.
312
426
  # @param network_security_group_name [String] The name of the network security
313
427
  # group.
314
- # @param [Hash{String => String}] The hash of custom headers need to be
315
- # applied to HTTP request.
428
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
429
+ # will be added to the HTTP request.
316
430
  #
317
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
318
- # response.
431
+ # @return [SecurityRuleListResult] operation results.
319
432
  #
320
433
  def list(resource_group_name, network_security_group_name, custom_headers = nil)
434
+ response = list_async(resource_group_name, network_security_group_name, custom_headers).value!
435
+ response.body unless response.nil?
436
+ end
437
+
438
+ #
439
+ # The List network security rule opertion retrieves all the security rules in
440
+ # a network security group.
441
+ #
442
+ # @param resource_group_name [String] The name of the resource group.
443
+ # @param network_security_group_name [String] The name of the network security
444
+ # group.
445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
446
+ # will be added to the HTTP request.
447
+ #
448
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
449
+ #
450
+ def list_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil)
451
+ list_async(resource_group_name, network_security_group_name, custom_headers).value!
452
+ end
453
+
454
+ #
455
+ # The List network security rule opertion retrieves all the security rules in
456
+ # a network security group.
457
+ #
458
+ # @param resource_group_name [String] The name of the resource group.
459
+ # @param network_security_group_name [String] The name of the network security
460
+ # group.
461
+ # @param [Hash{String => String}] A hash of custom headers that will be added
462
+ # to the HTTP request.
463
+ #
464
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
465
+ #
466
+ def list_async(resource_group_name, network_security_group_name, custom_headers = nil)
321
467
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
322
468
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
323
469
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -334,7 +480,10 @@ module Azure::ARM::Network
334
480
  query_params: {'api-version' => @client.api_version},
335
481
  headers: request_headers.merge(custom_headers || {})
336
482
  }
337
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
483
+
484
+ request_url = @base_url || @client.base_url
485
+
486
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
338
487
  promise = request.run_promise do |req|
339
488
  @client.credentials.sign_request(req) unless @client.credentials.nil?
340
489
  end
@@ -375,13 +524,43 @@ module Azure::ARM::Network
375
524
  #
376
525
  # @param next_page_link [String] The NextLink from the previous successful
377
526
  # call to List operation.
378
- # @param [Hash{String => String}] The hash of custom headers need to be
379
- # applied to HTTP request.
527
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
528
+ # will be added to the HTTP request.
380
529
  #
381
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
382
- # response.
530
+ # @return [SecurityRuleListResult] operation results.
383
531
  #
384
532
  def list_next(next_page_link, custom_headers = nil)
533
+ response = list_next_async(next_page_link, custom_headers).value!
534
+ response.body unless response.nil?
535
+ end
536
+
537
+ #
538
+ # The List network security rule opertion retrieves all the security rules in
539
+ # a network security group.
540
+ #
541
+ # @param next_page_link [String] The NextLink from the previous successful
542
+ # call to List operation.
543
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
544
+ # will be added to the HTTP request.
545
+ #
546
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
547
+ #
548
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
549
+ list_next_async(next_page_link, custom_headers).value!
550
+ end
551
+
552
+ #
553
+ # The List network security rule opertion retrieves all the security rules in
554
+ # a network security group.
555
+ #
556
+ # @param next_page_link [String] The NextLink from the previous successful
557
+ # call to List operation.
558
+ # @param [Hash{String => String}] A hash of custom headers that will be added
559
+ # to the HTTP request.
560
+ #
561
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
562
+ #
563
+ def list_next_async(next_page_link, custom_headers = nil)
385
564
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
386
565
  request_headers = {}
387
566
 
@@ -394,7 +573,10 @@ module Azure::ARM::Network
394
573
  skip_encoding_path_params: {'nextLink' => next_page_link},
395
574
  headers: request_headers.merge(custom_headers || {})
396
575
  }
397
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
576
+
577
+ request_url = @base_url || @client.base_url
578
+
579
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
398
580
  promise = request.run_promise do |req|
399
581
  @client.credentials.sign_request(req) unless @client.credentials.nil?
400
582
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -36,7 +36,7 @@ module Azure::ARM::Network
36
36
  #
37
37
  def delete(resource_group_name, virtual_network_name, subnet_name, custom_headers = nil)
38
38
  # Send request
39
- promise = begin_delete(resource_group_name, virtual_network_name, subnet_name, custom_headers)
39
+ promise = begin_delete_async(resource_group_name, virtual_network_name, subnet_name, custom_headers)
40
40
 
41
41
  promise = promise.then do |response|
42
42
  # Defining deserialization method.
@@ -44,7 +44,7 @@ module Azure::ARM::Network
44
44
  end
45
45
 
46
46
  # Waiting for response.
47
- @client.get_post_or_delete_operation_result(response, deserialize_method)
47
+ @client.get_long_running_operation_result(response, deserialize_method)
48
48
  end
49
49
 
50
50
  promise
@@ -56,13 +56,42 @@ module Azure::ARM::Network
56
56
  # @param resource_group_name [String] The name of the resource group.
57
57
  # @param virtual_network_name [String] The name of the virtual network.
58
58
  # @param subnet_name [String] The name of the subnet.
59
- # @param [Hash{String => String}] The hash of custom headers need to be
60
- # applied to HTTP request.
59
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
60
+ # will be added to the HTTP request.
61
61
  #
62
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
63
- # response.
64
62
  #
65
63
  def begin_delete(resource_group_name, virtual_network_name, subnet_name, custom_headers = nil)
64
+ response = begin_delete_async(resource_group_name, virtual_network_name, subnet_name, custom_headers).value!
65
+ nil
66
+ end
67
+
68
+ #
69
+ # The delete subnet operation deletes the specified subnet.
70
+ #
71
+ # @param resource_group_name [String] The name of the resource group.
72
+ # @param virtual_network_name [String] The name of the virtual network.
73
+ # @param subnet_name [String] The name of the subnet.
74
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
75
+ # will be added to the HTTP request.
76
+ #
77
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
78
+ #
79
+ def begin_delete_with_http_info(resource_group_name, virtual_network_name, subnet_name, custom_headers = nil)
80
+ begin_delete_async(resource_group_name, virtual_network_name, subnet_name, custom_headers).value!
81
+ end
82
+
83
+ #
84
+ # The delete subnet operation deletes the specified subnet.
85
+ #
86
+ # @param resource_group_name [String] The name of the resource group.
87
+ # @param virtual_network_name [String] The name of the virtual network.
88
+ # @param subnet_name [String] The name of the subnet.
89
+ # @param [Hash{String => String}] A hash of custom headers that will be added
90
+ # to the HTTP request.
91
+ #
92
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
93
+ #
94
+ def begin_delete_async(resource_group_name, virtual_network_name, subnet_name, custom_headers = nil)
66
95
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
67
96
  fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
68
97
  fail ArgumentError, 'subnet_name is nil' if subnet_name.nil?
@@ -80,7 +109,10 @@ module Azure::ARM::Network
80
109
  query_params: {'api-version' => @client.api_version},
81
110
  headers: request_headers.merge(custom_headers || {})
82
111
  }
83
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
112
+
113
+ request_url = @base_url || @client.base_url
114
+
115
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
84
116
  promise = request.run_promise do |req|
85
117
  @client.credentials.sign_request(req) unless @client.credentials.nil?
86
118
  end
@@ -110,13 +142,45 @@ module Azure::ARM::Network
110
142
  # @param virtual_network_name [String] The name of the virtual network.
111
143
  # @param subnet_name [String] The name of the subnet.
112
144
  # @param expand [String] expand references resources.
113
- # @param [Hash{String => String}] The hash of custom headers need to be
114
- # applied to HTTP request.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
115
147
  #
116
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
117
- # response.
148
+ # @return [Subnet] operation results.
118
149
  #
119
150
  def get(resource_group_name, virtual_network_name, subnet_name, expand = nil, custom_headers = nil)
151
+ response = get_async(resource_group_name, virtual_network_name, subnet_name, expand, custom_headers).value!
152
+ response.body unless response.nil?
153
+ end
154
+
155
+ #
156
+ # The Get subnet operation retreives information about the specified subnet.
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group.
159
+ # @param virtual_network_name [String] The name of the virtual network.
160
+ # @param subnet_name [String] The name of the subnet.
161
+ # @param expand [String] expand references resources.
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
166
+ #
167
+ def get_with_http_info(resource_group_name, virtual_network_name, subnet_name, expand = nil, custom_headers = nil)
168
+ get_async(resource_group_name, virtual_network_name, subnet_name, expand, custom_headers).value!
169
+ end
170
+
171
+ #
172
+ # The Get subnet operation retreives information about the specified subnet.
173
+ #
174
+ # @param resource_group_name [String] The name of the resource group.
175
+ # @param virtual_network_name [String] The name of the virtual network.
176
+ # @param subnet_name [String] The name of the subnet.
177
+ # @param expand [String] expand references resources.
178
+ # @param [Hash{String => String}] A hash of custom headers that will be added
179
+ # to the HTTP request.
180
+ #
181
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
182
+ #
183
+ def get_async(resource_group_name, virtual_network_name, subnet_name, expand = nil, custom_headers = nil)
120
184
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
121
185
  fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
122
186
  fail ArgumentError, 'subnet_name is nil' if subnet_name.nil?
@@ -134,7 +198,10 @@ module Azure::ARM::Network
134
198
  query_params: {'api-version' => @client.api_version,'$expand' => expand},
135
199
  headers: request_headers.merge(custom_headers || {})
136
200
  }
137
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
201
+
202
+ request_url = @base_url || @client.base_url
203
+
204
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
138
205
  promise = request.run_promise do |req|
139
206
  @client.credentials.sign_request(req) unless @client.credentials.nil?
140
207
  end
@@ -190,7 +257,7 @@ module Azure::ARM::Network
190
257
  #
191
258
  def create_or_update(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers = nil)
192
259
  # Send request
193
- promise = begin_create_or_update(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers)
260
+ promise = begin_create_or_update_async(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers)
194
261
 
195
262
  promise = promise.then do |response|
196
263
  # Defining deserialization method.
@@ -201,7 +268,7 @@ module Azure::ARM::Network
201
268
  end
202
269
 
203
270
  # Waiting for response.
204
- @client.get_put_operation_result(response, deserialize_method)
271
+ @client.get_long_running_operation_result(response, deserialize_method)
205
272
  end
206
273
 
207
274
  promise
@@ -216,13 +283,49 @@ module Azure::ARM::Network
216
283
  # @param subnet_name [String] The name of the subnet.
217
284
  # @param subnet_parameters [Subnet] Parameters supplied to the create/update
218
285
  # Subnet operation
219
- # @param [Hash{String => String}] The hash of custom headers need to be
220
- # applied to HTTP request.
286
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
287
+ # will be added to the HTTP request.
221
288
  #
222
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
223
- # response.
289
+ # @return [Subnet] operation results.
224
290
  #
225
291
  def begin_create_or_update(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers = nil)
292
+ response = begin_create_or_update_async(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers).value!
293
+ response.body unless response.nil?
294
+ end
295
+
296
+ #
297
+ # The Put Subnet operation creates/updates a subnet in thespecified virtual
298
+ # network
299
+ #
300
+ # @param resource_group_name [String] The name of the resource group.
301
+ # @param virtual_network_name [String] The name of the virtual network.
302
+ # @param subnet_name [String] The name of the subnet.
303
+ # @param subnet_parameters [Subnet] Parameters supplied to the create/update
304
+ # Subnet operation
305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
+ # will be added to the HTTP request.
307
+ #
308
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
309
+ #
310
+ def begin_create_or_update_with_http_info(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers = nil)
311
+ begin_create_or_update_async(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers).value!
312
+ end
313
+
314
+ #
315
+ # The Put Subnet operation creates/updates a subnet in thespecified virtual
316
+ # network
317
+ #
318
+ # @param resource_group_name [String] The name of the resource group.
319
+ # @param virtual_network_name [String] The name of the virtual network.
320
+ # @param subnet_name [String] The name of the subnet.
321
+ # @param subnet_parameters [Subnet] Parameters supplied to the create/update
322
+ # Subnet operation
323
+ # @param [Hash{String => String}] A hash of custom headers that will be added
324
+ # to the HTTP request.
325
+ #
326
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
327
+ #
328
+ def begin_create_or_update_async(resource_group_name, virtual_network_name, subnet_name, subnet_parameters, custom_headers = nil)
226
329
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
227
330
  fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
228
331
  fail ArgumentError, 'subnet_name is nil' if subnet_name.nil?
@@ -241,7 +344,7 @@ module Azure::ARM::Network
241
344
  unless subnet_parameters.nil?
242
345
  subnet_parameters = Subnet.serialize_object(subnet_parameters)
243
346
  end
244
- request_content = JSON.generate(subnet_parameters, quirks_mode: true)
347
+ request_content = subnet_parameters != nil ? JSON.generate(subnet_parameters, quirks_mode: true) : nil
245
348
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks/{virtualNetworkName}/subnets/{subnetName}'
246
349
  options = {
247
350
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -250,7 +353,10 @@ module Azure::ARM::Network
250
353
  body: request_content,
251
354
  headers: request_headers.merge(custom_headers || {})
252
355
  }
253
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
356
+
357
+ request_url = @base_url || @client.base_url
358
+
359
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
254
360
  promise = request.run_promise do |req|
255
361
  @client.credentials.sign_request(req) unless @client.credentials.nil?
256
362
  end
@@ -302,13 +408,41 @@ module Azure::ARM::Network
302
408
  #
303
409
  # @param resource_group_name [String] The name of the resource group.
304
410
  # @param virtual_network_name [String] The name of the virtual network.
305
- # @param [Hash{String => String}] The hash of custom headers need to be
306
- # applied to HTTP request.
411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
412
+ # will be added to the HTTP request.
307
413
  #
308
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
309
- # response.
414
+ # @return [SubnetListResult] operation results.
310
415
  #
311
416
  def list(resource_group_name, virtual_network_name, custom_headers = nil)
417
+ response = list_async(resource_group_name, virtual_network_name, custom_headers).value!
418
+ response.body unless response.nil?
419
+ end
420
+
421
+ #
422
+ # The List subnets opertion retrieves all the subnets in a virtual network.
423
+ #
424
+ # @param resource_group_name [String] The name of the resource group.
425
+ # @param virtual_network_name [String] The name of the virtual network.
426
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
427
+ # will be added to the HTTP request.
428
+ #
429
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
430
+ #
431
+ def list_with_http_info(resource_group_name, virtual_network_name, custom_headers = nil)
432
+ list_async(resource_group_name, virtual_network_name, custom_headers).value!
433
+ end
434
+
435
+ #
436
+ # The List subnets opertion retrieves all the subnets in a virtual network.
437
+ #
438
+ # @param resource_group_name [String] The name of the resource group.
439
+ # @param virtual_network_name [String] The name of the virtual network.
440
+ # @param [Hash{String => String}] A hash of custom headers that will be added
441
+ # to the HTTP request.
442
+ #
443
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
444
+ #
445
+ def list_async(resource_group_name, virtual_network_name, custom_headers = nil)
312
446
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
313
447
  fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
314
448
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -325,7 +459,10 @@ module Azure::ARM::Network
325
459
  query_params: {'api-version' => @client.api_version},
326
460
  headers: request_headers.merge(custom_headers || {})
327
461
  }
328
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
462
+
463
+ request_url = @base_url || @client.base_url
464
+
465
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
329
466
  promise = request.run_promise do |req|
330
467
  @client.credentials.sign_request(req) unless @client.credentials.nil?
331
468
  end
@@ -365,13 +502,41 @@ module Azure::ARM::Network
365
502
  #
366
503
  # @param next_page_link [String] The NextLink from the previous successful
367
504
  # call to List operation.
368
- # @param [Hash{String => String}] The hash of custom headers need to be
369
- # applied to HTTP request.
505
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
506
+ # will be added to the HTTP request.
370
507
  #
371
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
372
- # response.
508
+ # @return [SubnetListResult] operation results.
373
509
  #
374
510
  def list_next(next_page_link, custom_headers = nil)
511
+ response = list_next_async(next_page_link, custom_headers).value!
512
+ response.body unless response.nil?
513
+ end
514
+
515
+ #
516
+ # The List subnets opertion retrieves all the subnets in a virtual network.
517
+ #
518
+ # @param next_page_link [String] The NextLink from the previous successful
519
+ # call to List operation.
520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
521
+ # will be added to the HTTP request.
522
+ #
523
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
524
+ #
525
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
526
+ list_next_async(next_page_link, custom_headers).value!
527
+ end
528
+
529
+ #
530
+ # The List subnets opertion retrieves all the subnets in a virtual network.
531
+ #
532
+ # @param next_page_link [String] The NextLink from the previous successful
533
+ # call to List operation.
534
+ # @param [Hash{String => String}] A hash of custom headers that will be added
535
+ # to the HTTP request.
536
+ #
537
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
538
+ #
539
+ def list_next_async(next_page_link, custom_headers = nil)
375
540
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
376
541
  request_headers = {}
377
542
 
@@ -384,7 +549,10 @@ module Azure::ARM::Network
384
549
  skip_encoding_path_params: {'nextLink' => next_page_link},
385
550
  headers: request_headers.merge(custom_headers || {})
386
551
  }
387
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
552
+
553
+ request_url = @base_url || @client.base_url
554
+
555
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
388
556
  promise = request.run_promise do |req|
389
557
  @client.credentials.sign_request(req) unless @client.credentials.nil?
390
558
  end