Class: Azure::Network::Mgmt::V2020_06_01::NetworkWatchers
- Inherits:
-
Object
- Object
- Azure::Network::Mgmt::V2020_06_01::NetworkWatchers
- Includes:
- MsRestAzure
- Defined in:
- lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb
Overview
NetworkWatchers
Instance Attribute Summary collapse
-
#client ⇒ NetworkManagementClient
readonly
Reference to the NetworkManagementClient.
Instance Method Summary collapse
-
#begin_check_connectivity(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ ConnectivityInformation
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
-
#begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
-
#begin_check_connectivity_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
-
#begin_delete(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Object
Deletes the specified network watcher resource.
-
#begin_delete_async(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the specified network watcher resource.
-
#begin_delete_with_http_info(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the specified network watcher resource.
-
#begin_get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AzureReachabilityReport
NOTE: This feature is currently in preview and still being tested for stability.
-
#begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
NOTE: This feature is currently in preview and still being tested for stability.
-
#begin_get_azure_reachability_report_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
NOTE: This feature is currently in preview and still being tested for stability.
-
#begin_get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Queries status of flow log and traffic analytics (optional) on a specified resource.
-
#begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Queries status of flow log and traffic analytics (optional) on a specified resource.
-
#begin_get_flow_log_status_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Queries status of flow log and traffic analytics (optional) on a specified resource.
-
#begin_get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkConfigurationDiagnosticResponse
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior.
-
#begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior.
-
#begin_get_network_configuration_diagnostic_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior.
-
#begin_get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NextHopResult
Gets the next hop from the specified VM.
-
#begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets the next hop from the specified VM.
-
#begin_get_next_hop_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the next hop from the specified VM.
-
#begin_get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Initiate troubleshooting on a specified resource.
-
#begin_get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Initiate troubleshooting on a specified resource.
-
#begin_get_troubleshooting_result(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Get the last completed troubleshooting result on a specified resource.
-
#begin_get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Get the last completed troubleshooting result on a specified resource.
-
#begin_get_troubleshooting_result_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the last completed troubleshooting result on a specified resource.
-
#begin_get_troubleshooting_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Initiate troubleshooting on a specified resource.
-
#begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ SecurityGroupViewResult
Gets the configured and effective security group rules on the specified VM.
-
#begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets the configured and effective security group rules on the specified VM.
-
#begin_get_vmsecurity_rules_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the configured and effective security group rules on the specified VM.
-
#begin_list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AvailableProvidersList
NOTE: This feature is currently in preview and still being tested for stability.
-
#begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
NOTE: This feature is currently in preview and still being tested for stability.
-
#begin_list_available_providers_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
NOTE: This feature is currently in preview and still being tested for stability.
-
#begin_set_flow_log_configuration(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Configures flow log and traffic analytics (optional) on a specified resource.
-
#begin_set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Configures flow log and traffic analytics (optional) on a specified resource.
-
#begin_set_flow_log_configuration_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Configures flow log and traffic analytics (optional) on a specified resource.
-
#begin_verify_ipflow(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ VerificationIPFlowResult
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
-
#begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
-
#begin_verify_ipflow_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
-
#check_connectivity(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ ConnectivityInformation
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
-
#check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group.
-
#create_or_update(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkWatcher
Creates or updates a network watcher in the specified resource group.
-
#create_or_update_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a network watcher in the specified resource group.
-
#create_or_update_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a network watcher in the specified resource group.
-
#delete(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Object
Deletes the specified network watcher resource.
-
#delete_async(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#get(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ NetworkWatcher
Gets the specified network watcher by resource group.
-
#get_async(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the specified network watcher by resource group.
-
#get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AzureReachabilityReport
NOTE: This feature is currently in preview and still being tested for stability.
-
#get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group.
-
#get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Queries status of flow log and traffic analytics (optional) on a specified resource.
-
#get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group.
-
#get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkConfigurationDiagnosticResponse
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior.
-
#get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
get network configuration diagnostic.
-
#get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NextHopResult
Gets the next hop from the specified VM.
-
#get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
destination endpoint.
-
#get_topology(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Topology
Gets the current network topology by resource group.
-
#get_topology_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets the current network topology by resource group.
-
#get_topology_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the current network topology by resource group.
-
#get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Initiate troubleshooting on a specified resource.
-
#get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource.
-
#get_troubleshooting_result(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Get the last completed troubleshooting result on a specified resource.
-
#get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource.
-
#get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ SecurityGroupViewResult
Gets the configured and effective security group rules on the specified VM.
-
#get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
to check security groups for.
-
#get_with_http_info(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the specified network watcher by resource group.
-
#initialize(client) ⇒ NetworkWatchers
constructor
Creates and initializes a new instance of the NetworkWatchers class.
-
#list(resource_group_name, custom_headers: nil) ⇒ NetworkWatcherListResult
Gets all network watchers by resource group.
-
#list_all(custom_headers: nil) ⇒ NetworkWatcherListResult
Gets all network watchers by subscription.
-
#list_all_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets all network watchers by subscription.
-
#list_all_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all network watchers by subscription.
-
#list_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all network watchers by resource group.
-
#list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AvailableProvidersList
NOTE: This feature is currently in preview and still being tested for stability.
-
#list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group.
-
#list_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all network watchers by resource group.
-
#set_flow_log_configuration(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Configures flow log and traffic analytics (optional) on a specified resource.
-
#set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group.
-
#update_tags(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkWatcher
Updates a network watcher tags.
-
#update_tags_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a network watcher tags.
-
#update_tags_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a network watcher tags.
-
#verify_ipflow(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ VerificationIPFlowResult
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
-
#verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
IP flow to be verified.
Constructor Details
#initialize(client) ⇒ NetworkWatchers
Creates and initializes a new instance of the NetworkWatchers class.
17 18 19 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ NetworkManagementClient (readonly)
Returns reference to the NetworkManagementClient.
22 23 24 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 22 def client @client end |
Instance Method Details
#begin_check_connectivity(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ ConnectivityInformation
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
group. resource. connectivity check will be performed. will be added to the HTTP request.
2159 2160 2161 2162 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2159 def begin_check_connectivity(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
group. resource. connectivity check will be performed. to the HTTP request.
2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2200 def begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::ConnectivityParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::ConnectivityInformation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::ConnectivityInformation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_check_connectivity_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
group. resource. connectivity check will be performed. will be added to the HTTP request.
2180 2181 2182 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2180 def begin_check_connectivity_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Object
Deletes the specified network watcher resource.
will be added to the HTTP request.
1219 1220 1221 1222 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1219 def begin_delete(resource_group_name, network_watcher_name, custom_headers:nil) response = begin_delete_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the specified network watcher resource.
to the HTTP request.
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1248 def begin_delete_async(resource_group_name, network_watcher_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the specified network watcher resource.
will be added to the HTTP request.
1234 1235 1236 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1234 def begin_delete_with_http_info(resource_group_name, network_watcher_name, custom_headers:nil) begin_delete_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! end |
#begin_get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AzureReachabilityReport
NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions.
group. resource. determine Azure reachability report configuration. will be added to the HTTP request.
2289 2290 2291 2292 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2289 def begin_get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions.
group. resource. determine Azure reachability report configuration. to the HTTP request.
2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2330 def begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AzureReachabilityReportParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AzureReachabilityReport.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AzureReachabilityReport.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_azure_reachability_report_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions.
group. resource. determine Azure reachability report configuration. will be added to the HTTP request.
2310 2311 2312 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2310 def begin_get_azure_reachability_report_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Queries status of flow log and traffic analytics (optional) on a specified resource.
group. resource. to query flow log and traffic analytics (optional) status. will be added to the HTTP request.
2031 2032 2033 2034 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2031 def begin_get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Queries status of flow log and traffic analytics (optional) on a specified resource.
group. resource. to query flow log and traffic analytics (optional) status. to the HTTP request.
2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2070 def begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogStatusParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_flow_log_status_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Queries status of flow log and traffic analytics (optional) on a specified resource.
group. resource. to query flow log and traffic analytics (optional) status. will be added to the HTTP request.
2051 2052 2053 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2051 def begin_get_flow_log_status_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkConfigurationDiagnosticResponse
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results.
get network configuration diagnostic. will be added to the HTTP request.
2551 2552 2553 2554 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2551 def begin_get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results.
get network configuration diagnostic. to the HTTP request.
2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2596 def begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkConfigurationDiagnosticParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkConfigurationDiagnosticResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkConfigurationDiagnosticResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_network_configuration_diagnostic_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results.
get network configuration diagnostic. will be added to the HTTP request.
2574 2575 2576 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2574 def begin_get_network_configuration_diagnostic_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NextHopResult
Gets the next hop from the specified VM.
destination endpoint. will be added to the HTTP request.
1426 1427 1428 1429 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1426 def begin_get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets the next hop from the specified VM.
destination endpoint. to the HTTP request.
1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1459 def begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NextHopParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NextHopResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NextHopResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_next_hop_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the next hop from the specified VM.
destination endpoint. will be added to the HTTP request.
1443 1444 1445 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1443 def begin_get_next_hop_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Initiate troubleshooting on a specified resource.
resource. resource to troubleshoot. will be added to the HTTP request.
1663 1664 1665 1666 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1663 def begin_get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Initiate troubleshooting on a specified resource.
resource. resource to troubleshoot. to the HTTP request.
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1698 def begin_get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_troubleshooting_result(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Get the last completed troubleshooting result on a specified resource.
resource. resource to query the troubleshooting result. will be added to the HTTP request.
1784 1785 1786 1787 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1784 def begin_get_troubleshooting_result(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Get the last completed troubleshooting result on a specified resource.
resource. resource to query the troubleshooting result. to the HTTP request.
1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1819 def begin_get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::QueryTroubleshootingParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_troubleshooting_result_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the last completed troubleshooting result on a specified resource.
resource. resource to query the troubleshooting result. will be added to the HTTP request.
1802 1803 1804 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1802 def begin_get_troubleshooting_result_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_troubleshooting_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Initiate troubleshooting on a specified resource.
resource. resource to troubleshoot. will be added to the HTTP request.
1681 1682 1683 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1681 def begin_get_troubleshooting_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ SecurityGroupViewResult
Gets the configured and effective security group rules on the specified VM.
to check security groups for. will be added to the HTTP request.
1544 1545 1546 1547 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1544 def begin_get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets the configured and effective security group rules on the specified VM.
to check security groups for. to the HTTP request.
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1577 def begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::SecurityGroupViewParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::SecurityGroupViewResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::SecurityGroupViewResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_get_vmsecurity_rules_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the configured and effective security group rules on the specified VM.
to check security groups for. will be added to the HTTP request.
1561 1562 1563 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1561 def begin_get_vmsecurity_rules_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AvailableProvidersList
NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region.
group. resource. the list of available providers. will be added to the HTTP request.
2419 2420 2421 2422 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2419 def begin_list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region.
group. resource. the list of available providers. to the HTTP request.
2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2460 def begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AvailableProvidersListParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AvailableProvidersList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AvailableProvidersList.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_list_available_providers_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region.
group. resource. the list of available providers. will be added to the HTTP request.
2440 2441 2442 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 2440 def begin_list_available_providers_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_set_flow_log_configuration(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Configures flow log and traffic analytics (optional) on a specified resource.
group. resource. configuration of flow log. will be added to the HTTP request.
1906 1907 1908 1909 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1906 def begin_set_flow_log_configuration(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Configures flow log and traffic analytics (optional) on a specified resource.
group. resource. configuration of flow log. to the HTTP request.
1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1943 def begin_set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_set_flow_log_configuration_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Configures flow log and traffic analytics (optional) on a specified resource.
group. resource. configuration of flow log. will be added to the HTTP request.
1925 1926 1927 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1925 def begin_set_flow_log_configuration_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#begin_verify_ipflow(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ VerificationIPFlowResult
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
IP flow to be verified. will be added to the HTTP request.
1306 1307 1308 1309 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1306 def begin_verify_ipflow(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
IP flow to be verified. to the HTTP request.
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1341 def begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::VerificationIPFlowParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::VerificationIPFlowResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::VerificationIPFlowResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_verify_ipflow_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
IP flow to be verified. will be added to the HTTP request.
1324 1325 1326 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1324 def begin_verify_ipflow_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#check_connectivity(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ ConnectivityInformation
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
group. resource. connectivity check will be performed. will be added to the HTTP request.
1018 1019 1020 1021 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1018 def check_connectivity(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group. resource. connectivity check will be performed. will be added to the HTTP request.
response.
1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1036 def check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_check_connectivity_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::ConnectivityInformation.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#create_or_update(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkWatcher
Creates or updates a network watcher in the specified resource group.
resource. will be added to the HTTP request.
36 37 38 39 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 36 def create_or_update(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a network watcher in the specified resource group.
resource. to the HTTP request.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 69 def create_or_update_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcher.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcher.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcher.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_or_update_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a network watcher in the specified resource group.
resource. will be added to the HTTP request.
53 54 55 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 53 def create_or_update_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) create_or_update_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#delete(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Object
Deletes the specified network watcher resource.
will be added to the HTTP request.
244 245 246 247 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 244 def delete(resource_group_name, network_watcher_name, custom_headers:nil) response = delete_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 258 def delete_async(resource_group_name, network_watcher_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, network_watcher_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ NetworkWatcher
Gets the specified network watcher by resource group.
will be added to the HTTP request.
152 153 154 155 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 152 def get(resource_group_name, network_watcher_name, custom_headers:nil) response = get_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the specified network watcher by resource group.
to the HTTP request.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 181 def get_async(resource_group_name, network_watcher_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcher.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AzureReachabilityReport
NOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions.
group. resource. determine Azure reachability report configuration. will be added to the HTTP request.
1070 1071 1072 1073 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1070 def get_azure_reachability_report(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group. resource. determine Azure reachability report configuration. will be added to the HTTP request.
response.
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1088 def get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_azure_reachability_report_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AzureReachabilityReport.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Queries status of flow log and traffic analytics (optional) on a specified resource.
group. resource. to query flow log and traffic analytics (optional) status. will be added to the HTTP request.
966 967 968 969 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 966 def get_flow_log_status(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group. resource. to query flow log and traffic analytics (optional) status. will be added to the HTTP request.
response.
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 984 def get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_flow_log_status_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkConfigurationDiagnosticResponse
Gets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results.
get network configuration diagnostic. will be added to the HTTP request.
1176 1177 1178 1179 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1176 def get_network_configuration_diagnostic(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
get network configuration diagnostic. will be added to the HTTP request.
response.
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1192 def get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_network_configuration_diagnostic_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkConfigurationDiagnosticResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NextHopResult
Gets the next hop from the specified VM.
destination endpoint. will be added to the HTTP request.
725 726 727 728 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 725 def get_next_hop(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
destination endpoint. will be added to the HTTP request.
response.
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 741 def get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_next_hop_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NextHopResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_topology(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Topology
Gets the current network topology by resource group.
representation of topology. will be added to the HTTP request.
570 571 572 573 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 570 def get_topology(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_topology_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_topology_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets the current network topology by resource group.
representation of topology. to the HTTP request.
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 603 def get_topology_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TopologyParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::Topology.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_topology_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the current network topology by resource group.
representation of topology. will be added to the HTTP request.
587 588 589 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 587 def get_topology_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers:nil) get_topology_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Initiate troubleshooting on a specified resource.
resource. resource to troubleshoot. will be added to the HTTP request.
818 819 820 821 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 818 def get_troubleshooting(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource. resource to troubleshoot. will be added to the HTTP request.
response.
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 835 def get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_troubleshooting_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_troubleshooting_result(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ TroubleshootingResult
Get the last completed troubleshooting result on a specified resource.
resource. resource to query the troubleshooting result. will be added to the HTTP request.
866 867 868 869 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 866 def get_troubleshooting_result(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource. resource to query the troubleshooting result. will be added to the HTTP request.
response.
883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 883 def get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_troubleshooting_result_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TroubleshootingResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ SecurityGroupViewResult
Gets the configured and effective security group rules on the specified VM.
to check security groups for. will be added to the HTTP request.
771 772 773 774 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 771 def get_vmsecurity_rules(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
to check security groups for. will be added to the HTTP request.
response.
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 787 def get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::SecurityGroupViewResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#get_with_http_info(resource_group_name, network_watcher_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the specified network watcher by resource group.
will be added to the HTTP request.
167 168 169 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 167 def get_with_http_info(resource_group_name, network_watcher_name, custom_headers:nil) get_async(resource_group_name, network_watcher_name, custom_headers:custom_headers).value! end |
#list(resource_group_name, custom_headers: nil) ⇒ NetworkWatcherListResult
Gets all network watchers by resource group.
will be added to the HTTP request.
391 392 393 394 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 391 def list(resource_group_name, custom_headers:nil) response = list_async(resource_group_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_all(custom_headers: nil) ⇒ NetworkWatcherListResult
Gets all network watchers by subscription.
will be added to the HTTP request.
480 481 482 483 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 480 def list_all(custom_headers:nil) response = list_all_async(custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_all_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets all network watchers by subscription.
to the HTTP request.
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 505 def list_all_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcherListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_all_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all network watchers by subscription.
will be added to the HTTP request.
493 494 495 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 493 def list_all_with_http_info(custom_headers:nil) list_all_async(custom_headers:custom_headers).value! end |
#list_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all network watchers by resource group.
to the HTTP request.
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 418 def list_async(resource_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcherListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ AvailableProvidersList
NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region.
group. resource. the list of available providers. will be added to the HTTP request.
1122 1123 1124 1125 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1122 def list_available_providers(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group. resource. the list of available providers. will be added to the HTTP request.
response.
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 1140 def list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_list_available_providers_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::AvailableProvidersList.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#list_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all network watchers by resource group.
will be added to the HTTP request.
405 406 407 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 405 def list_with_http_info(resource_group_name, custom_headers:nil) list_async(resource_group_name, custom_headers:custom_headers).value! end |
#set_flow_log_configuration(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ FlowLogInformation
Configures flow log and traffic analytics (optional) on a specified resource.
group. resource. configuration of flow log. will be added to the HTTP request.
915 916 917 918 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 915 def set_flow_log_configuration(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
group. resource. configuration of flow log. will be added to the HTTP request.
response.
933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 933 def set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_set_flow_log_configuration_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::FlowLogInformation.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#update_tags(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ NetworkWatcher
Updates a network watcher tags.
tags. will be added to the HTTP request.
286 287 288 289 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 286 def (resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = (resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_tags_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a network watcher tags.
tags. to the HTTP request.
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 319 def (resource_group_name, network_watcher_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Network::Mgmt::V2020_06_01::Models::TagsObject.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'networkWatcherName' => network_watcher_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::NetworkWatcher.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#update_tags_with_http_info(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a network watcher tags.
tags. will be added to the HTTP request.
303 304 305 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 303 def (resource_group_name, network_watcher_name, parameters, custom_headers:nil) (resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! end |
#verify_ipflow(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ VerificationIPFlowResult
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
IP flow to be verified. will be added to the HTTP request.
679 680 681 682 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 679 def verify_ipflow(resource_group_name, network_watcher_name, parameters, custom_headers:nil) response = verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
IP flow to be verified. will be added to the HTTP request.
response.
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/2020-06-01/generated/azure_mgmt_network/network_watchers.rb', line 695 def verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:nil) # Send request promise = begin_verify_ipflow_async(resource_group_name, network_watcher_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2020_06_01::Models::VerificationIPFlowResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |