azure_mgmt_network 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +1 -26
  3. data/azure_mgmt_network.gemspec +2 -2
  4. data/lib/azure_mgmt_network.rb +33 -31
  5. data/lib/azure_mgmt_network/application_gateways.rb +345 -55
  6. data/lib/azure_mgmt_network/express_route_circuit_authorizations.rb +207 -31
  7. data/lib/azure_mgmt_network/express_route_circuit_peerings.rb +205 -31
  8. data/lib/azure_mgmt_network/express_route_circuits.rb +633 -168
  9. data/lib/azure_mgmt_network/express_route_service_providers.rb +73 -11
  10. data/lib/azure_mgmt_network/load_balancers.rb +267 -41
  11. data/lib/azure_mgmt_network/local_network_gateways.rb +205 -31
  12. data/lib/azure_mgmt_network/models/address_space.rb +1 -1
  13. data/lib/azure_mgmt_network/models/application_gateway.rb +1 -1
  14. data/lib/azure_mgmt_network/models/application_gateway_backend_address.rb +1 -1
  15. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +1 -1
  16. data/lib/azure_mgmt_network/models/application_gateway_backend_address_pool_properties_format.rb +5 -5
  17. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +1 -1
  18. data/lib/azure_mgmt_network/models/application_gateway_backend_http_settings_properties_format.rb +1 -1
  19. data/lib/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +1 -1
  20. data/lib/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +1 -1
  21. data/lib/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration_properties_format.rb +1 -1
  22. data/lib/azure_mgmt_network/models/application_gateway_frontend_port.rb +1 -1
  23. data/lib/azure_mgmt_network/models/application_gateway_frontend_port_properties_format.rb +1 -1
  24. data/lib/azure_mgmt_network/models/application_gateway_http_listener.rb +1 -1
  25. data/lib/azure_mgmt_network/models/application_gateway_http_listener_properties_format.rb +1 -1
  26. data/lib/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +1 -1
  27. data/lib/azure_mgmt_network/models/application_gateway_ipconfiguration_properties_format.rb +1 -1
  28. data/lib/azure_mgmt_network/models/application_gateway_list_result.rb +1 -1
  29. data/lib/azure_mgmt_network/models/application_gateway_operational_state.rb +1 -1
  30. data/lib/azure_mgmt_network/models/application_gateway_path_rule.rb +1 -1
  31. data/lib/azure_mgmt_network/models/application_gateway_path_rule_properties_format.rb +1 -1
  32. data/lib/azure_mgmt_network/models/application_gateway_probe.rb +1 -1
  33. data/lib/azure_mgmt_network/models/application_gateway_probe_properties_format.rb +1 -1
  34. data/lib/azure_mgmt_network/models/application_gateway_properties_format.rb +1 -1
  35. data/lib/azure_mgmt_network/models/application_gateway_protocol.rb +1 -1
  36. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +1 -1
  37. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_properties_format.rb +1 -1
  38. data/lib/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +1 -1
  39. data/lib/azure_mgmt_network/models/application_gateway_sku.rb +1 -1
  40. data/lib/azure_mgmt_network/models/application_gateway_sku_name.rb +1 -1
  41. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +1 -1
  42. data/lib/azure_mgmt_network/models/application_gateway_ssl_certificate_properties_format.rb +1 -1
  43. data/lib/azure_mgmt_network/models/application_gateway_tier.rb +1 -1
  44. data/lib/azure_mgmt_network/models/application_gateway_url_path_map.rb +1 -1
  45. data/lib/azure_mgmt_network/models/application_gateway_url_path_map_properties_format.rb +1 -1
  46. data/lib/azure_mgmt_network/models/authorization_list_result.rb +1 -1
  47. data/lib/azure_mgmt_network/models/authorization_properties_format.rb +1 -1
  48. data/lib/azure_mgmt_network/models/authorization_use_status.rb +1 -1
  49. data/lib/azure_mgmt_network/models/azure_async_operation_result.rb +1 -1
  50. data/lib/azure_mgmt_network/models/backend_address_pool.rb +1 -1
  51. data/lib/azure_mgmt_network/models/backend_address_pool_properties_format.rb +1 -1
  52. data/lib/azure_mgmt_network/models/bgp_settings.rb +1 -1
  53. data/lib/azure_mgmt_network/models/connection_reset_shared_key.rb +1 -1
  54. data/lib/azure_mgmt_network/models/connection_shared_key.rb +1 -1
  55. data/lib/azure_mgmt_network/models/connection_shared_key_result.rb +1 -1
  56. data/lib/azure_mgmt_network/models/dhcp_options.rb +1 -1
  57. data/lib/azure_mgmt_network/models/dns_name_availability_result.rb +1 -1
  58. data/lib/azure_mgmt_network/models/error.rb +1 -1
  59. data/lib/azure_mgmt_network/models/error_details.rb +1 -1
  60. data/lib/azure_mgmt_network/models/express_route_circuit.rb +1 -1
  61. data/lib/azure_mgmt_network/models/express_route_circuit_arp_table.rb +20 -1
  62. data/lib/azure_mgmt_network/models/express_route_circuit_authorization.rb +1 -1
  63. data/lib/azure_mgmt_network/models/express_route_circuit_list_result.rb +1 -1
  64. data/lib/azure_mgmt_network/models/express_route_circuit_peering.rb +1 -1
  65. data/lib/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +1 -1
  66. data/lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb +1 -1
  67. data/lib/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +1 -1
  68. data/lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb +1 -1
  69. data/lib/azure_mgmt_network/models/express_route_circuit_peering_state.rb +1 -1
  70. data/lib/azure_mgmt_network/models/express_route_circuit_peering_type.rb +1 -1
  71. data/lib/azure_mgmt_network/models/express_route_circuit_properties_format.rb +10 -1
  72. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb +36 -32
  73. data/lib/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +97 -0
  74. data/lib/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +1 -1
  75. data/lib/azure_mgmt_network/models/express_route_circuit_sku.rb +1 -1
  76. data/lib/azure_mgmt_network/models/express_route_circuit_sku_family.rb +1 -1
  77. data/lib/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +1 -1
  78. data/lib/azure_mgmt_network/models/express_route_circuit_stats.rb +31 -11
  79. data/lib/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +1 -1
  80. data/lib/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +1 -1
  81. data/lib/azure_mgmt_network/models/{express_route_circuits_stats_list_result.rb → express_route_circuits_routes_table_summary_list_result.rb} +11 -8
  82. data/lib/azure_mgmt_network/models/express_route_service_provider.rb +1 -1
  83. data/lib/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +1 -1
  84. data/lib/azure_mgmt_network/models/express_route_service_provider_list_result.rb +1 -1
  85. data/lib/azure_mgmt_network/models/express_route_service_provider_properties_format.rb +1 -1
  86. data/lib/azure_mgmt_network/models/frontend_ipconfiguration.rb +1 -1
  87. data/lib/azure_mgmt_network/models/frontend_ipconfiguration_properties_format.rb +1 -1
  88. data/lib/azure_mgmt_network/models/inbound_nat_pool.rb +1 -1
  89. data/lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb +1 -1
  90. data/lib/azure_mgmt_network/models/inbound_nat_rule.rb +1 -1
  91. data/lib/azure_mgmt_network/models/inbound_nat_rule_properties_format.rb +1 -1
  92. data/lib/azure_mgmt_network/models/ipallocation_method.rb +1 -1
  93. data/lib/azure_mgmt_network/models/ipconfiguration.rb +1 -1
  94. data/lib/azure_mgmt_network/models/ipconfiguration_properties_format.rb +1 -1
  95. data/lib/azure_mgmt_network/models/ipversion.rb +16 -0
  96. data/lib/azure_mgmt_network/models/load_balancer.rb +1 -1
  97. data/lib/azure_mgmt_network/models/load_balancer_list_result.rb +1 -1
  98. data/lib/azure_mgmt_network/models/load_balancer_properties_format.rb +1 -1
  99. data/lib/azure_mgmt_network/models/load_balancing_rule.rb +1 -1
  100. data/lib/azure_mgmt_network/models/load_balancing_rule_properties_format.rb +1 -1
  101. data/lib/azure_mgmt_network/models/load_distribution.rb +1 -1
  102. data/lib/azure_mgmt_network/models/local_network_gateway.rb +1 -1
  103. data/lib/azure_mgmt_network/models/local_network_gateway_list_result.rb +1 -1
  104. data/lib/azure_mgmt_network/models/local_network_gateway_properties_format.rb +1 -1
  105. data/lib/azure_mgmt_network/models/network_interface.rb +1 -1
  106. data/lib/azure_mgmt_network/models/network_interface_dns_settings.rb +11 -4
  107. data/lib/azure_mgmt_network/models/network_interface_ipconfiguration.rb +1 -1
  108. data/lib/azure_mgmt_network/models/network_interface_ipconfiguration_properties_format.rb +59 -14
  109. data/lib/azure_mgmt_network/models/network_interface_list_result.rb +1 -1
  110. data/lib/azure_mgmt_network/models/network_interface_properties_format.rb +1 -1
  111. data/lib/azure_mgmt_network/models/network_operation_status.rb +1 -1
  112. data/lib/azure_mgmt_network/models/network_security_group.rb +1 -1
  113. data/lib/azure_mgmt_network/models/network_security_group_list_result.rb +1 -1
  114. data/lib/azure_mgmt_network/models/network_security_group_properties_format.rb +1 -1
  115. data/lib/azure_mgmt_network/models/outbound_nat_rule.rb +1 -1
  116. data/lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb +1 -1
  117. data/lib/azure_mgmt_network/models/probe.rb +1 -1
  118. data/lib/azure_mgmt_network/models/probe_properties_format.rb +1 -1
  119. data/lib/azure_mgmt_network/models/probe_protocol.rb +1 -1
  120. data/lib/azure_mgmt_network/models/processor_architecture.rb +1 -1
  121. data/lib/azure_mgmt_network/models/public_ipaddress.rb +1 -1
  122. data/lib/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +1 -1
  123. data/lib/azure_mgmt_network/models/public_ipaddress_list_result.rb +1 -1
  124. data/lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb +15 -1
  125. data/lib/azure_mgmt_network/models/route.rb +1 -1
  126. data/lib/azure_mgmt_network/models/route_list_result.rb +1 -1
  127. data/lib/azure_mgmt_network/models/route_next_hop_type.rb +1 -1
  128. data/lib/azure_mgmt_network/models/route_properties_format.rb +1 -1
  129. data/lib/azure_mgmt_network/models/route_table.rb +1 -1
  130. data/lib/azure_mgmt_network/models/route_table_list_result.rb +1 -1
  131. data/lib/azure_mgmt_network/models/route_table_properties_format.rb +1 -1
  132. data/lib/azure_mgmt_network/models/security_rule.rb +1 -1
  133. data/lib/azure_mgmt_network/models/security_rule_access.rb +1 -1
  134. data/lib/azure_mgmt_network/models/security_rule_direction.rb +1 -1
  135. data/lib/azure_mgmt_network/models/security_rule_list_result.rb +1 -1
  136. data/lib/azure_mgmt_network/models/security_rule_properties_format.rb +1 -1
  137. data/lib/azure_mgmt_network/models/security_rule_protocol.rb +1 -1
  138. data/lib/azure_mgmt_network/models/service_provider_provisioning_state.rb +1 -1
  139. data/lib/azure_mgmt_network/models/subnet.rb +1 -1
  140. data/lib/azure_mgmt_network/models/subnet_list_result.rb +1 -1
  141. data/lib/azure_mgmt_network/models/subnet_properties_format.rb +1 -1
  142. data/lib/azure_mgmt_network/models/transport_protocol.rb +1 -1
  143. data/lib/azure_mgmt_network/models/usage.rb +1 -1
  144. data/lib/azure_mgmt_network/models/usage_name.rb +1 -1
  145. data/lib/azure_mgmt_network/models/usages_list_result.rb +1 -1
  146. data/lib/azure_mgmt_network/models/virtual_network.rb +1 -1
  147. data/lib/azure_mgmt_network/models/virtual_network_gateway.rb +1 -1
  148. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection.rb +1 -1
  149. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +1 -1
  150. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_properties_format.rb +1 -1
  151. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +1 -1
  152. data/lib/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +1 -1
  153. data/lib/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +1 -1
  154. data/lib/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration_properties_format.rb +1 -1
  155. data/lib/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +1 -1
  156. data/lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb +1 -1
  157. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku.rb +1 -1
  158. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +1 -1
  159. data/lib/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +1 -1
  160. data/lib/azure_mgmt_network/models/virtual_network_gateway_type.rb +1 -1
  161. data/lib/azure_mgmt_network/models/virtual_network_list_result.rb +1 -1
  162. data/lib/azure_mgmt_network/models/virtual_network_properties_format.rb +1 -1
  163. data/lib/azure_mgmt_network/models/vpn_client_configuration.rb +1 -1
  164. data/lib/azure_mgmt_network/models/vpn_client_parameters.rb +1 -1
  165. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +1 -1
  166. data/lib/azure_mgmt_network/models/vpn_client_revoked_certificate_properties_format.rb +1 -1
  167. data/lib/azure_mgmt_network/models/vpn_client_root_certificate.rb +1 -1
  168. data/lib/azure_mgmt_network/models/vpn_client_root_certificate_properties_format.rb +1 -1
  169. data/lib/azure_mgmt_network/models/vpn_type.rb +1 -1
  170. data/lib/azure_mgmt_network/module_definition.rb +1 -1
  171. data/lib/azure_mgmt_network/network_interfaces.rb +471 -66
  172. data/lib/azure_mgmt_network/network_management_client.rb +40 -7
  173. data/lib/azure_mgmt_network/network_security_groups.rb +277 -41
  174. data/lib/azure_mgmt_network/public_ipaddresses.rb +269 -41
  175. data/lib/azure_mgmt_network/route_tables.rb +261 -41
  176. data/lib/azure_mgmt_network/routes.rb +201 -31
  177. data/lib/azure_mgmt_network/security_rules.rb +213 -31
  178. data/lib/azure_mgmt_network/subnets.rb +199 -31
  179. data/lib/azure_mgmt_network/usages.rb +71 -11
  180. data/lib/azure_mgmt_network/version.rb +2 -2
  181. data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +357 -52
  182. data/lib/azure_mgmt_network/virtual_network_gateways.rb +303 -45
  183. data/lib/azure_mgmt_network/virtual_networks.rb +261 -41
  184. metadata +34 -25
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -126,7 +126,7 @@ module Azure::ARM::Network
126
126
  @virtual_network_gateway_connections = VirtualNetworkGatewayConnections.new(self)
127
127
  @virtual_network_gateways = VirtualNetworkGateways.new(self)
128
128
  @virtual_networks = VirtualNetworks.new(self)
129
- @api_version = '2015-06-15'
129
+ @api_version = '2016-03-30'
130
130
  @accept_language = 'en-US'
131
131
  @long_running_operation_retry_timeout = 30
132
132
  @generate_client_request_id = true
@@ -138,13 +138,43 @@ module Azure::ARM::Network
138
138
  # @param location [String] The location of the domain name
139
139
  # @param domain_name_label [String] The domain name to be verified. It must
140
140
  # conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
141
- # @param [Hash{String => String}] The hash of custom headers need to be
142
- # applied to HTTP request.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
143
  #
144
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
145
- # response.
144
+ # @return [DnsNameAvailabilityResult] operation results.
146
145
  #
147
146
  def check_dns_name_availability(location, domain_name_label = nil, custom_headers = nil)
147
+ response = check_dns_name_availability_async(location, domain_name_label, custom_headers).value!
148
+ response.body unless response.nil?
149
+ end
150
+
151
+ #
152
+ # Checks whether a domain name in the cloudapp.net zone is available for use.
153
+ #
154
+ # @param location [String] The location of the domain name
155
+ # @param domain_name_label [String] The domain name to be verified. It must
156
+ # conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
158
+ # will be added to the HTTP request.
159
+ #
160
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
161
+ #
162
+ def check_dns_name_availability_with_http_info(location, domain_name_label = nil, custom_headers = nil)
163
+ check_dns_name_availability_async(location, domain_name_label, custom_headers).value!
164
+ end
165
+
166
+ #
167
+ # Checks whether a domain name in the cloudapp.net zone is available for use.
168
+ #
169
+ # @param location [String] The location of the domain name
170
+ # @param domain_name_label [String] The domain name to be verified. It must
171
+ # conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
172
+ # @param [Hash{String => String}] A hash of custom headers that will be added
173
+ # to the HTTP request.
174
+ #
175
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
176
+ #
177
+ def check_dns_name_availability_async(location, domain_name_label = nil, custom_headers = nil)
148
178
  fail ArgumentError, 'location is nil' if location.nil?
149
179
  fail ArgumentError, 'api_version is nil' if api_version.nil?
150
180
  fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
@@ -160,7 +190,10 @@ module Azure::ARM::Network
160
190
  query_params: {'domainNameLabel' => domain_name_label,'api-version' => api_version},
161
191
  headers: request_headers.merge(custom_headers || {})
162
192
  }
163
- request = MsRest::HttpOperationRequest.new(@base_url || self.base_url, path_template, :get, options)
193
+
194
+ request_url = @base_url || self.base_url
195
+
196
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
164
197
  promise = request.run_promise do |req|
165
198
  self.credentials.sign_request(req) unless self.credentials.nil?
166
199
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -37,7 +37,7 @@ module Azure::ARM::Network
37
37
  #
38
38
  def delete(resource_group_name, network_security_group_name, custom_headers = nil)
39
39
  # Send request
40
- promise = begin_delete(resource_group_name, network_security_group_name, custom_headers)
40
+ promise = begin_delete_async(resource_group_name, network_security_group_name, custom_headers)
41
41
 
42
42
  promise = promise.then do |response|
43
43
  # Defining deserialization method.
@@ -45,7 +45,7 @@ module Azure::ARM::Network
45
45
  end
46
46
 
47
47
  # Waiting for response.
48
- @client.get_post_or_delete_operation_result(response, deserialize_method)
48
+ @client.get_long_running_operation_result(response, deserialize_method)
49
49
  end
50
50
 
51
51
  promise
@@ -58,13 +58,44 @@ module Azure::ARM::Network
58
58
  # @param resource_group_name [String] The name of the resource group.
59
59
  # @param network_security_group_name [String] The name of the network security
60
60
  # group.
61
- # @param [Hash{String => String}] The hash of custom headers need to be
62
- # applied to HTTP request.
61
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
62
+ # will be added to the HTTP request.
63
63
  #
64
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
65
- # response.
66
64
  #
67
65
  def begin_delete(resource_group_name, network_security_group_name, custom_headers = nil)
66
+ response = begin_delete_async(resource_group_name, network_security_group_name, custom_headers).value!
67
+ nil
68
+ end
69
+
70
+ #
71
+ # The Delete NetworkSecurityGroup operation deletes the specifed network
72
+ # security group
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group.
75
+ # @param network_security_group_name [String] The name of the network security
76
+ # group.
77
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
78
+ # will be added to the HTTP request.
79
+ #
80
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
81
+ #
82
+ def begin_delete_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil)
83
+ begin_delete_async(resource_group_name, network_security_group_name, custom_headers).value!
84
+ end
85
+
86
+ #
87
+ # The Delete NetworkSecurityGroup operation deletes the specifed network
88
+ # security group
89
+ #
90
+ # @param resource_group_name [String] The name of the resource group.
91
+ # @param network_security_group_name [String] The name of the network security
92
+ # group.
93
+ # @param [Hash{String => String}] A hash of custom headers that will be added
94
+ # to the HTTP request.
95
+ #
96
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
97
+ #
98
+ def begin_delete_async(resource_group_name, network_security_group_name, custom_headers = nil)
68
99
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
100
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
70
101
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -81,7 +112,10 @@ module Azure::ARM::Network
81
112
  query_params: {'api-version' => @client.api_version},
82
113
  headers: request_headers.merge(custom_headers || {})
83
114
  }
84
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
115
+
116
+ request_url = @base_url || @client.base_url
117
+
118
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
85
119
  promise = request.run_promise do |req|
86
120
  @client.credentials.sign_request(req) unless @client.credentials.nil?
87
121
  end
@@ -112,13 +146,47 @@ module Azure::ARM::Network
112
146
  # @param network_security_group_name [String] The name of the network security
113
147
  # group.
114
148
  # @param expand [String] expand references resources.
115
- # @param [Hash{String => String}] The hash of custom headers need to be
116
- # applied to HTTP request.
149
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
150
+ # will be added to the HTTP request.
117
151
  #
118
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
119
- # response.
152
+ # @return [NetworkSecurityGroup] operation results.
120
153
  #
121
154
  def get(resource_group_name, network_security_group_name, expand = nil, custom_headers = nil)
155
+ response = get_async(resource_group_name, network_security_group_name, expand, custom_headers).value!
156
+ response.body unless response.nil?
157
+ end
158
+
159
+ #
160
+ # The Get NetworkSecurityGroups operation retrieves information about the
161
+ # specified network security group.
162
+ #
163
+ # @param resource_group_name [String] The name of the resource group.
164
+ # @param network_security_group_name [String] The name of the network security
165
+ # group.
166
+ # @param expand [String] expand references resources.
167
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
168
+ # will be added to the HTTP request.
169
+ #
170
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
171
+ #
172
+ def get_with_http_info(resource_group_name, network_security_group_name, expand = nil, custom_headers = nil)
173
+ get_async(resource_group_name, network_security_group_name, expand, custom_headers).value!
174
+ end
175
+
176
+ #
177
+ # The Get NetworkSecurityGroups operation retrieves information about the
178
+ # specified network security group.
179
+ #
180
+ # @param resource_group_name [String] The name of the resource group.
181
+ # @param network_security_group_name [String] The name of the network security
182
+ # group.
183
+ # @param expand [String] expand references resources.
184
+ # @param [Hash{String => String}] A hash of custom headers that will be added
185
+ # to the HTTP request.
186
+ #
187
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
188
+ #
189
+ def get_async(resource_group_name, network_security_group_name, expand = nil, custom_headers = nil)
122
190
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
123
191
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
124
192
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -135,7 +203,10 @@ module Azure::ARM::Network
135
203
  query_params: {'api-version' => @client.api_version,'$expand' => expand},
136
204
  headers: request_headers.merge(custom_headers || {})
137
205
  }
138
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
206
+
207
+ request_url = @base_url || @client.base_url
208
+
209
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
139
210
  promise = request.run_promise do |req|
140
211
  @client.credentials.sign_request(req) unless @client.credentials.nil?
141
212
  end
@@ -191,7 +262,7 @@ module Azure::ARM::Network
191
262
  #
192
263
  def create_or_update(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
193
264
  # Send request
194
- promise = begin_create_or_update(resource_group_name, network_security_group_name, parameters, custom_headers)
265
+ promise = begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers)
195
266
 
196
267
  promise = promise.then do |response|
197
268
  # Defining deserialization method.
@@ -202,7 +273,7 @@ module Azure::ARM::Network
202
273
  end
203
274
 
204
275
  # Waiting for response.
205
- @client.get_put_operation_result(response, deserialize_method)
276
+ @client.get_long_running_operation_result(response, deserialize_method)
206
277
  end
207
278
 
208
279
  promise
@@ -217,13 +288,49 @@ module Azure::ARM::Network
217
288
  # group.
218
289
  # @param parameters [NetworkSecurityGroup] Parameters supplied to the
219
290
  # create/update Network Security Group operation
220
- # @param [Hash{String => String}] The hash of custom headers need to be
221
- # applied to HTTP request.
291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
292
+ # will be added to the HTTP request.
222
293
  #
223
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
224
- # response.
294
+ # @return [NetworkSecurityGroup] operation results.
225
295
  #
226
296
  def begin_create_or_update(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
297
+ response = begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers).value!
298
+ response.body unless response.nil?
299
+ end
300
+
301
+ #
302
+ # The Put NetworkSecurityGroup operation creates/updates a network security
303
+ # groupin the specified resource group.
304
+ #
305
+ # @param resource_group_name [String] The name of the resource group.
306
+ # @param network_security_group_name [String] The name of the network security
307
+ # group.
308
+ # @param parameters [NetworkSecurityGroup] Parameters supplied to the
309
+ # create/update Network Security Group operation
310
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
311
+ # will be added to the HTTP request.
312
+ #
313
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
314
+ #
315
+ def begin_create_or_update_with_http_info(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
316
+ begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers).value!
317
+ end
318
+
319
+ #
320
+ # The Put NetworkSecurityGroup operation creates/updates a network security
321
+ # groupin the specified resource group.
322
+ #
323
+ # @param resource_group_name [String] The name of the resource group.
324
+ # @param network_security_group_name [String] The name of the network security
325
+ # group.
326
+ # @param parameters [NetworkSecurityGroup] Parameters supplied to the
327
+ # create/update Network Security Group operation
328
+ # @param [Hash{String => String}] A hash of custom headers that will be added
329
+ # to the HTTP request.
330
+ #
331
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
332
+ #
333
+ def begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
227
334
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
228
335
  fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
229
336
  fail ArgumentError, 'parameters is nil' if parameters.nil?
@@ -241,7 +348,7 @@ module Azure::ARM::Network
241
348
  unless parameters.nil?
242
349
  parameters = NetworkSecurityGroup.serialize_object(parameters)
243
350
  end
244
- request_content = JSON.generate(parameters, quirks_mode: true)
351
+ request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
245
352
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
246
353
  options = {
247
354
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -250,7 +357,10 @@ module Azure::ARM::Network
250
357
  body: request_content,
251
358
  headers: request_headers.merge(custom_headers || {})
252
359
  }
253
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
360
+
361
+ request_url = @base_url || @client.base_url
362
+
363
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
254
364
  promise = request.run_promise do |req|
255
365
  @client.credentials.sign_request(req) unless @client.credentials.nil?
256
366
  end
@@ -301,13 +411,39 @@ module Azure::ARM::Network
301
411
  # The list NetworkSecurityGroups returns all network security groups in a
302
412
  # subscription
303
413
  #
304
- # @param [Hash{String => String}] The hash of custom headers need to be
305
- # applied to HTTP request.
414
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
415
+ # will be added to the HTTP request.
306
416
  #
307
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
308
- # response.
417
+ # @return [NetworkSecurityGroupListResult] operation results.
309
418
  #
310
419
  def list_all(custom_headers = nil)
420
+ response = list_all_async(custom_headers).value!
421
+ response.body unless response.nil?
422
+ end
423
+
424
+ #
425
+ # The list NetworkSecurityGroups returns all network security groups in a
426
+ # subscription
427
+ #
428
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
429
+ # will be added to the HTTP request.
430
+ #
431
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
432
+ #
433
+ def list_all_with_http_info(custom_headers = nil)
434
+ list_all_async(custom_headers).value!
435
+ end
436
+
437
+ #
438
+ # The list NetworkSecurityGroups returns all network security groups in a
439
+ # subscription
440
+ #
441
+ # @param [Hash{String => String}] A hash of custom headers that will be added
442
+ # to the HTTP request.
443
+ #
444
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
445
+ #
446
+ def list_all_async(custom_headers = nil)
311
447
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
312
448
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
313
449
  request_headers = {}
@@ -322,7 +458,10 @@ module Azure::ARM::Network
322
458
  query_params: {'api-version' => @client.api_version},
323
459
  headers: request_headers.merge(custom_headers || {})
324
460
  }
325
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
461
+
462
+ request_url = @base_url || @client.base_url
463
+
464
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
326
465
  promise = request.run_promise do |req|
327
466
  @client.credentials.sign_request(req) unless @client.credentials.nil?
328
467
  end
@@ -362,13 +501,41 @@ module Azure::ARM::Network
362
501
  # resource group
363
502
  #
364
503
  # @param resource_group_name [String] The name of the resource group.
365
- # @param [Hash{String => String}] The hash of custom headers need to be
366
- # applied to HTTP request.
504
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
505
+ # will be added to the HTTP request.
367
506
  #
368
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
369
- # response.
507
+ # @return [NetworkSecurityGroupListResult] operation results.
370
508
  #
371
509
  def list(resource_group_name, custom_headers = nil)
510
+ response = list_async(resource_group_name, custom_headers).value!
511
+ response.body unless response.nil?
512
+ end
513
+
514
+ #
515
+ # The list NetworkSecurityGroups returns all network security groups in a
516
+ # resource group
517
+ #
518
+ # @param resource_group_name [String] The name of the resource group.
519
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
520
+ # will be added to the HTTP request.
521
+ #
522
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
523
+ #
524
+ def list_with_http_info(resource_group_name, custom_headers = nil)
525
+ list_async(resource_group_name, custom_headers).value!
526
+ end
527
+
528
+ #
529
+ # The list NetworkSecurityGroups returns all network security groups in a
530
+ # resource group
531
+ #
532
+ # @param resource_group_name [String] The name of the resource group.
533
+ # @param [Hash{String => String}] A hash of custom headers that will be added
534
+ # to the HTTP request.
535
+ #
536
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
537
+ #
538
+ def list_async(resource_group_name, custom_headers = nil)
372
539
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
373
540
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
374
541
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -384,7 +551,10 @@ module Azure::ARM::Network
384
551
  query_params: {'api-version' => @client.api_version},
385
552
  headers: request_headers.merge(custom_headers || {})
386
553
  }
387
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
554
+
555
+ request_url = @base_url || @client.base_url
556
+
557
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
388
558
  promise = request.run_promise do |req|
389
559
  @client.credentials.sign_request(req) unless @client.credentials.nil?
390
560
  end
@@ -425,13 +595,43 @@ module Azure::ARM::Network
425
595
  #
426
596
  # @param next_page_link [String] The NextLink from the previous successful
427
597
  # call to List operation.
428
- # @param [Hash{String => String}] The hash of custom headers need to be
429
- # applied to HTTP request.
598
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
599
+ # will be added to the HTTP request.
430
600
  #
431
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
432
- # response.
601
+ # @return [NetworkSecurityGroupListResult] operation results.
433
602
  #
434
603
  def list_all_next(next_page_link, custom_headers = nil)
604
+ response = list_all_next_async(next_page_link, custom_headers).value!
605
+ response.body unless response.nil?
606
+ end
607
+
608
+ #
609
+ # The list NetworkSecurityGroups returns all network security groups in a
610
+ # subscription
611
+ #
612
+ # @param next_page_link [String] The NextLink from the previous successful
613
+ # call to List operation.
614
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
615
+ # will be added to the HTTP request.
616
+ #
617
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
618
+ #
619
+ def list_all_next_with_http_info(next_page_link, custom_headers = nil)
620
+ list_all_next_async(next_page_link, custom_headers).value!
621
+ end
622
+
623
+ #
624
+ # The list NetworkSecurityGroups returns all network security groups in a
625
+ # subscription
626
+ #
627
+ # @param next_page_link [String] The NextLink from the previous successful
628
+ # call to List operation.
629
+ # @param [Hash{String => String}] A hash of custom headers that will be added
630
+ # to the HTTP request.
631
+ #
632
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
633
+ #
634
+ def list_all_next_async(next_page_link, custom_headers = nil)
435
635
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
436
636
  request_headers = {}
437
637
 
@@ -444,7 +644,10 @@ module Azure::ARM::Network
444
644
  skip_encoding_path_params: {'nextLink' => next_page_link},
445
645
  headers: request_headers.merge(custom_headers || {})
446
646
  }
447
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
647
+
648
+ request_url = @base_url || @client.base_url
649
+
650
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
448
651
  promise = request.run_promise do |req|
449
652
  @client.credentials.sign_request(req) unless @client.credentials.nil?
450
653
  end
@@ -485,13 +688,43 @@ module Azure::ARM::Network
485
688
  #
486
689
  # @param next_page_link [String] The NextLink from the previous successful
487
690
  # call to List operation.
488
- # @param [Hash{String => String}] The hash of custom headers need to be
489
- # applied to HTTP request.
691
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
692
+ # will be added to the HTTP request.
490
693
  #
491
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
492
- # response.
694
+ # @return [NetworkSecurityGroupListResult] operation results.
493
695
  #
494
696
  def list_next(next_page_link, custom_headers = nil)
697
+ response = list_next_async(next_page_link, custom_headers).value!
698
+ response.body unless response.nil?
699
+ end
700
+
701
+ #
702
+ # The list NetworkSecurityGroups returns all network security groups in a
703
+ # resource group
704
+ #
705
+ # @param next_page_link [String] The NextLink from the previous successful
706
+ # call to List operation.
707
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
708
+ # will be added to the HTTP request.
709
+ #
710
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
711
+ #
712
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
713
+ list_next_async(next_page_link, custom_headers).value!
714
+ end
715
+
716
+ #
717
+ # The list NetworkSecurityGroups returns all network security groups in a
718
+ # resource group
719
+ #
720
+ # @param next_page_link [String] The NextLink from the previous successful
721
+ # call to List operation.
722
+ # @param [Hash{String => String}] A hash of custom headers that will be added
723
+ # to the HTTP request.
724
+ #
725
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
726
+ #
727
+ def list_next_async(next_page_link, custom_headers = nil)
495
728
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
496
729
  request_headers = {}
497
730
 
@@ -504,7 +737,10 @@ module Azure::ARM::Network
504
737
  skip_encoding_path_params: {'nextLink' => next_page_link},
505
738
  headers: request_headers.merge(custom_headers || {})
506
739
  }
507
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
740
+
741
+ request_url = @base_url || @client.base_url
742
+
743
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
508
744
  promise = request.run_promise do |req|
509
745
  @client.credentials.sign_request(req) unless @client.credentials.nil?
510
746
  end