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