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