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