Class: Azure::Network::Mgmt::V2019_02_01::VirtualNetworkGateways
- Inherits:
-
Object
- Object
- Azure::Network::Mgmt::V2019_02_01::VirtualNetworkGateways
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb
Overview
VirtualNetworkGateways
Instance Attribute Summary collapse
-
#client ⇒ NetworkManagementClient
readonly
Reference to the NetworkManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Creates or updates a virtual network gateway in the specified resource group.
-
#begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a virtual network gateway in the specified resource group.
-
#begin_create_or_update_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a virtual network gateway in the specified resource group.
-
#begin_delete(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Deletes the specified virtual network gateway.
-
#begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the specified virtual network gateway.
-
#begin_delete_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the specified virtual network gateway.
-
#begin_generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#begin_generate_vpn_profile_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#begin_generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
-
#begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
-
#begin_generatevpnclientpackage_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
-
#begin_get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
-
#begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ Concurrent::Promise
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
-
#begin_get_advertised_routes_with_http_info(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
-
#begin_get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ BgpPeerStatusListResult
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
-
#begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ Concurrent::Promise
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
-
#begin_get_bgp_peer_status_with_http_info(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
-
#begin_get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
-
#begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
-
#begin_get_learned_routes_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
-
#begin_get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ String
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#begin_get_vpn_profile_package_url_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#begin_get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#begin_get_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#begin_reset(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ VirtualNetworkGateway
Resets the primary of the virtual network gateway in the specified resource group.
-
#begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Resets the primary of the virtual network gateway in the specified resource group.
-
#begin_reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
-
#begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
-
#begin_reset_vpn_client_shared_key_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
-
#begin_reset_with_http_info(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Resets the primary of the virtual network gateway in the specified resource group.
-
#begin_set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ Concurrent::Promise
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#begin_set_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#begin_update_tags(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Updates a virtual network gateway tags.
-
#begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a virtual network gateway tags.
-
#begin_update_tags_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a virtual network gateway tags.
-
#create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Creates or updates a virtual network gateway in the specified resource group.
-
#create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#delete(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Deletes the specified virtual network gateway.
-
#delete_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
-
#generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#get(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VirtualNetworkGateway
Gets the specified virtual network gateway by resource group.
-
#get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
-
#get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#get_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the specified virtual network gateway by resource group.
-
#get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ BgpPeerStatusListResult
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
-
#get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
-
#get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ String
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group.
-
#get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
name.
-
#get_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the specified virtual network gateway by resource group.
-
#initialize(client) ⇒ VirtualNetworkGateways
constructor
Creates and initializes a new instance of the VirtualNetworkGateways class.
-
#list(resource_group_name, custom_headers: nil) ⇒ Array<VirtualNetworkGateway>
Gets all virtual network gateways by resource group.
-
#list_as_lazy(resource_group_name, custom_headers: nil) ⇒ VirtualNetworkGatewayListResult
Gets all virtual network gateways by resource group.
-
#list_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all virtual network gateways by resource group.
-
#list_connections(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Array<VirtualNetworkGatewayConnectionListEntity>
Gets all the connections in a virtual network gateway.
-
#list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VirtualNetworkGatewayListConnectionsResult
Gets all the connections in a virtual network gateway.
-
#list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the connections in a virtual network gateway.
-
#list_connections_next(next_page_link, custom_headers: nil) ⇒ VirtualNetworkGatewayListConnectionsResult
Gets all the connections in a virtual network gateway.
-
#list_connections_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the connections in a virtual network gateway.
-
#list_connections_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the connections in a virtual network gateway.
-
#list_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the connections in a virtual network gateway.
-
#list_next(next_page_link, custom_headers: nil) ⇒ VirtualNetworkGatewayListResult
Gets all virtual network gateways by resource group.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all virtual network gateways by resource group.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all virtual network gateways by resource group.
-
#list_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all virtual network gateways by resource group.
-
#reset(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ VirtualNetworkGateway
Resets the primary of the virtual network gateway in the specified resource group.
-
#reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
-
#reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
-
#set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#supported_vpn_devices(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ String
Gets a xml format representation for supported vpn devices.
-
#supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a xml format representation for supported vpn devices.
-
#supported_vpn_devices_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a xml format representation for supported vpn devices.
-
#update_tags(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Updates a virtual network gateway tags.
-
#update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway.
-
#vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers: nil) ⇒ String
Gets a xml format representation for vpn device configuration script.
-
#vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets a xml format representation for vpn device configuration script.
-
#vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a xml format representation for vpn device configuration script.
Constructor Details
#initialize(client) ⇒ VirtualNetworkGateways
Creates and initializes a new instance of the VirtualNetworkGateways class.
17 18 19 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.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/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Creates or updates a virtual network gateway in the specified resource group.
gateway. update virtual network gateway operation. will be added to the HTTP request.
1173 1174 1175 1176 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1173 def begin_create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates a virtual network gateway in the specified resource group.
gateway. update virtual network gateway operation. to the HTTP request.
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 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 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1208 def begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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::V2019_02_01::Models::VirtualNetworkGateway.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/virtualNetworkGateways/{virtualNetworkGatewayName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGateway.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::V2019_02_01::Models::VirtualNetworkGateway.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_create_or_update_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates a virtual network gateway in the specified resource group.
gateway. update virtual network gateway operation. will be added to the HTTP request.
1191 1192 1193 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1191 def begin_create_or_update_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Deletes the specified virtual network gateway.
gateway. will be added to the HTTP request.
1291 1292 1293 1294 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1291 def begin_delete(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the specified virtual network gateway.
gateway. to the HTTP request.
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 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 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1322 def begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 == 204 || status_code == 202 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the specified virtual network gateway.
gateway. will be added to the HTTP request.
1307 1308 1309 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1307 def begin_delete_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#begin_generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication.
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
1808 1809 1810 1811 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1808 def begin_generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication.
gateway. virtual network gateway VPN client package operation. to the HTTP request.
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 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1845 def begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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::V2019_02_01::Models::VpnClientParameters.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/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 MsRestAzure::AzureOperationError.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 = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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_generate_vpn_profile_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication.
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
1827 1828 1829 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1827 def begin_generate_vpn_profile_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end |
#begin_generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
1687 1688 1689 1690 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1687 def begin_generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
gateway. virtual network gateway VPN client package operation. to the HTTP request.
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 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1724 def begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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::V2019_02_01::Models::VpnClientParameters.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/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 MsRestAzure::AzureOperationError.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 = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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_generatevpnclientpackage_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
1706 1707 1708 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1706 def begin_generatevpnclientpackage_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end |
#begin_get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
gateway. will be added to the HTTP request.
2238 2239 2240 2241 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2238 def begin_get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil) response = begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ Concurrent::Promise
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
gateway. to the HTTP request.
2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2273 def begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'peer is nil' if peer.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/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'peer' => peer,'api-version' => @client.api_version}, 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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::GatewayRouteListResult.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_advertised_routes_with_http_info(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
gateway. will be added to the HTTP request.
2256 2257 2258 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2256 def begin_get_advertised_routes_with_http_info(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil) begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers).value! end |
#begin_get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ BgpPeerStatusListResult
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
gateway. will be added to the HTTP request.
2037 2038 2039 2040 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2037 def begin_get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil) response = begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ Concurrent::Promise
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
gateway. 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 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2070 def begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'peer' => peer,'api-version' => @client.api_version}, 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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::BgpPeerStatusListResult.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_bgp_peer_status_with_http_info(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
gateway. will be added to the HTTP request.
2054 2055 2056 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2054 def begin_get_bgp_peer_status_with_http_info(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil) begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value! end |
#begin_get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
gateway. will be added to the HTTP request.
2137 2138 2139 2140 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2137 def begin_get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
gateway. to the HTTP request.
2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2170 def begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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(: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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::GatewayRouteListResult.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_learned_routes_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
gateway. will be added to the HTTP request.
2154 2155 2156 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2154 def begin_get_learned_routes_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#begin_get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ String
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile.
gateway. will be added to the HTTP request.
1928 1929 1930 1931 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1928 def begin_get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile.
gateway. to the HTTP request.
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 2015 2016 2017 2018 2019 2020 2021 2022 2023 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1963 def begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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(: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 MsRestAzure::AzureOperationError.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 = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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_vpn_profile_package_url_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile.
gateway. will be added to the HTTP request.
1946 1947 1948 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1946 def begin_get_vpn_profile_package_url_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#begin_get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
name. will be added to the HTTP request.
2462 2463 2464 2465 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2462 def begin_get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
name. to the HTTP request.
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 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2497 def begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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(: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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VpnClientIPsecParameters.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_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
name. will be added to the HTTP request.
2480 2481 2482 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2480 def begin_get_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#begin_reset(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ VirtualNetworkGateway
Resets the primary of the virtual network gateway in the specified resource group.
gateway. the begin reset of the active-active feature enabled gateway. will be added to the HTTP request.
1492 1493 1494 1495 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1492 def begin_reset(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) response = begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Resets the primary of the virtual network gateway in the specified resource group.
gateway. the begin reset of the active-active feature enabled gateway. to the HTTP request.
1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1529 def begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/reset' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, query_params: {'gatewayVip' => gateway_vip,'api-version' => @client.api_version}, 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 == 202 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGateway.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_reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
gateway. will be added to the HTTP request.
1595 1596 1597 1598 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1595 def begin_reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! nil end |
#begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
gateway. to the HTTP request.
1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1628 def begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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(: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 MsRestAzure::AzureOperationError.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_reset_vpn_client_shared_key_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
gateway. will be added to the HTTP request.
1612 1613 1614 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1612 def begin_reset_vpn_client_shared_key_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#begin_reset_with_http_info(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Resets the primary of the virtual network gateway in the specified resource group.
gateway. the begin reset of the active-active feature enabled gateway. will be added to the HTTP request.
1511 1512 1513 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1511 def begin_reset_with_http_info(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value! end |
#begin_set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
gateway. to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. will be added to the HTTP request.
2345 2346 2347 2348 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2345 def begin_set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil) response = begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ Concurrent::Promise
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
gateway. to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. to the HTTP request.
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2386 def begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'vpnclient_ipsec_params is nil' if vpnclient_ipsec_params.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::V2019_02_01::Models::VpnClientIPsecParameters.mapper() request_content = @client.serialize(request_mapper, vpnclient_ipsec_params) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 == 202 || status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VpnClientIPsecParameters.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_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
gateway. to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. will be added to the HTTP request.
2366 2367 2368 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2366 def begin_set_vpnclient_ipsec_parameters_with_http_info(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil) begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value! end |
#begin_update_tags(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Updates a virtual network gateway tags.
gateway. gateway tags. will be added to the HTTP request.
1380 1381 1382 1383 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1380 def (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a virtual network gateway tags.
gateway. gateway tags. to the HTTP request.
1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1415 def (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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::V2019_02_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/virtualNetworkGateways/{virtualNetworkGatewayName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGateway.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_update_tags_with_http_info(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a virtual network gateway tags.
gateway. gateway tags. will be added to the HTTP request.
1398 1399 1400 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1398 def (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Creates or updates a virtual network gateway in the specified resource group.
gateway. update virtual network gateway operation. will be added to the HTTP request.
37 38 39 40 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 37 def create_or_update(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway. update virtual network gateway operation. will be added to the HTTP request.
response.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 54 def create_or_update_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, virtual_network_gateway_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::V2019_02_01::Models::VirtualNetworkGateway.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Deletes the specified virtual network gateway.
gateway. will be added to the HTTP request.
178 179 180 181 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 178 def delete(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway. will be added to the HTTP request.
response.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 193 def delete_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, virtual_network_gateway_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 |
#generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication.
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
604 605 606 607 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 604 def generate_vpn_profile(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
response.
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 621 def generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) # Send request promise = begin_generate_vpn_profile_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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 |
#generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ String
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
548 549 550 551 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 548 def generatevpnclientpackage(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway. virtual network gateway VPN client package operation. will be added to the HTTP request.
response.
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 565 def generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) # Send request promise = begin_generatevpnclientpackage_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VirtualNetworkGateway
Gets the specified virtual network gateway by resource group.
gateway. will be added to the HTTP request.
83 84 85 86 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 83 def get(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = get_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer.
gateway. will be added to the HTTP request.
907 908 909 910 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 907 def get_advertised_routes(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil) response = get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers: nil) ⇒ Concurrent::Promise
gateway. will be added to the HTTP request.
response.
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 923 def get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:nil) # Send request promise = begin_get_advertised_routes_async(resource_group_name, virtual_network_gateway_name, peer, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2019_02_01::Models::GatewayRouteListResult.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_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the specified virtual network gateway by resource group.
gateway. to the HTTP request.
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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 114 def get_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGateway.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_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ BgpPeerStatusListResult
The GetBgpPeerStatus operation retrieves the status of all BGP peers.
gateway. will be added to the HTTP request.
711 712 713 714 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 711 def get_bgp_peer_status(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil) response = get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer: nil, custom_headers: nil) ⇒ Concurrent::Promise
gateway. will be added to the HTTP request.
response.
727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 727 def get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:nil, custom_headers:nil) # Send request promise = begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer:peer, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2019_02_01::Models::BgpPeerStatusListResult.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_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ GatewayRouteListResult
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers.
gateway. will be added to the HTTP request.
861 862 863 864 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 861 def get_learned_routes(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway. will be added to the HTTP request.
response.
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 876 def get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) # Send request promise = begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2019_02_01::Models::GatewayRouteListResult.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_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ String
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile.
gateway. will be added to the HTTP request.
659 660 661 662 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 659 def get_vpn_profile_package_url(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway. will be added to the HTTP request.
response.
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 674 def get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) # Send request promise = begin_get_vpn_profile_package_url_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
name. will be added to the HTTP request.
1006 1007 1008 1009 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1006 def get_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
name. will be added to the HTTP request.
response.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1021 def get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) # Send request promise = begin_get_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2019_02_01::Models::VpnClientIPsecParameters.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, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the specified virtual network gateway by resource group.
gateway. will be added to the HTTP request.
99 100 101 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 99 def get_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) get_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#list(resource_group_name, custom_headers: nil) ⇒ Array<VirtualNetworkGateway>
Gets all virtual network gateways by resource group.
will be added to the HTTP request.
266 267 268 269 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 266 def list(resource_group_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(resource_group_name, custom_headers: nil) ⇒ VirtualNetworkGatewayListResult
Gets all virtual network gateways by resource group.
will be added to the HTTP request.
of the response.
2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2742 def list_as_lazy(resource_group_name, custom_headers:nil) response = list_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all virtual network gateways by resource group.
to the HTTP request.
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 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 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 293 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/virtualNetworkGateways' 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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGatewayListResult.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_connections(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Array<VirtualNetworkGatewayConnectionListEntity>
Gets all the connections in a virtual network gateway.
gateway. will be added to the HTTP request.
358 359 360 361 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 358 def list_connections(resource_group_name, virtual_network_gateway_name, custom_headers:nil) first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ VirtualNetworkGatewayListConnectionsResult
Gets all the connections in a virtual network gateway.
gateway. will be added to the HTTP request.
access to pages of the response.
2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2765 def list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_connections_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the connections in a virtual network gateway.
gateway. to the HTTP request.
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 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 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 389 def list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/connections' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGatewayListConnectionsResult.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_connections_next(next_page_link, custom_headers: nil) ⇒ VirtualNetworkGatewayListConnectionsResult
Gets all the connections in a virtual network gateway.
to List operation. will be added to the HTTP request.
2652 2653 2654 2655 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2652 def list_connections_next(next_page_link, custom_headers:nil) response = list_connections_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_connections_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all the connections in a virtual network gateway.
to List operation. to the HTTP request.
2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2681 def list_connections_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, 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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGatewayListConnectionsResult.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_connections_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the connections in a virtual network gateway.
to List operation. will be added to the HTTP request.
2667 2668 2669 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2667 def list_connections_next_with_http_info(next_page_link, custom_headers:nil) list_connections_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all the connections in a virtual network gateway.
gateway. will be added to the HTTP request.
374 375 376 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 374 def list_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#list_next(next_page_link, custom_headers: nil) ⇒ VirtualNetworkGatewayListResult
Gets all virtual network gateways by resource group.
to List operation. will be added to the HTTP request.
2562 2563 2564 2565 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2562 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets all virtual network gateways by resource group.
to List operation. to the HTTP request.
2591 2592 2593 2594 2595 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 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2591 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, 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 MsRestAzure::AzureOperationError.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::V2019_02_01::Models::VirtualNetworkGatewayListResult.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_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all virtual network gateways by resource group.
to List operation. will be added to the HTTP request.
2577 2578 2579 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 2577 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets all virtual network gateways by resource group.
will be added to the HTTP request.
280 281 282 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 280 def list_with_http_info(resource_group_name, custom_headers:nil) list_async(resource_group_name, custom_headers:custom_headers).value! end |
#reset(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ VirtualNetworkGateway
Resets the primary of the virtual network gateway in the specified resource group.
gateway. the begin reset of the active-active feature enabled gateway. will be added to the HTTP request.
458 459 460 461 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 458 def reset(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) response = reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers).value! response.body unless response.nil? end |
#reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip: nil, custom_headers: nil) ⇒ Concurrent::Promise
gateway. the begin reset of the active-active feature enabled gateway. will be added to the HTTP request.
response.
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 475 def reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:nil, custom_headers:nil) # Send request promise = begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip:gateway_vip, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2019_02_01::Models::VirtualNetworkGateway.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 |
#reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Object
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
gateway. will be added to the HTTP request.
503 504 505 506 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 503 def reset_vpn_client_shared_key(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! nil end |
#reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
gateway. will be added to the HTTP request.
response.
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 518 def reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) # Send request promise = begin_reset_vpn_client_shared_key_async(resource_group_name, virtual_network_gateway_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, FinalStateVia::LOCATION) end promise end |
#set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ VpnClientIPsecParameters
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
gateway. to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. will be added to the HTTP request.
957 958 959 960 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 957 def set_vpnclient_ipsec_parameters(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil) response = set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers).value! response.body unless response.nil? end |
#set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers: nil) ⇒ Concurrent::Promise
gateway. to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. will be added to the HTTP request.
response.
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 975 def set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:nil) # Send request promise = begin_set_vpnclient_ipsec_parameters_async(resource_group_name, virtual_network_gateway_name, vpnclient_ipsec_params, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Network::Mgmt::V2019_02_01::Models::VpnClientIPsecParameters.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 |
#supported_vpn_devices(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ String
Gets a xml format representation for supported vpn devices.
gateway. will be added to the HTTP request.
756 757 758 759 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 756 def supported_vpn_devices(resource_group_name, virtual_network_gateway_name, custom_headers:nil) response = supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a xml format representation for supported vpn devices.
gateway. to the HTTP request.
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 787 def supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_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/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_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(: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 MsRestAzure::AzureOperationError.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 = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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 |
#supported_vpn_devices_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a xml format representation for supported vpn devices.
gateway. will be added to the HTTP request.
772 773 774 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 772 def supported_vpn_devices_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers:nil) supported_vpn_devices_async(resource_group_name, virtual_network_gateway_name, custom_headers:custom_headers).value! end |
#update_tags(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ VirtualNetworkGateway
Updates a virtual network gateway tags.
gateway. gateway tags. will be added to the HTTP request.
222 223 224 225 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 222 def (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) response = (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_tags_async(resource_group_name, virtual_network_gateway_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
gateway. gateway tags. will be added to the HTTP request.
response.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 239 def (resource_group_name, virtual_network_gateway_name, parameters, custom_headers:nil) # Send request promise = (resource_group_name, virtual_network_gateway_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::V2019_02_01::Models::VirtualNetworkGateway.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers: nil) ⇒ String
Gets a xml format representation for vpn device configuration script.
virtual network gateway connection for which the configuration script is generated. generate vpn device script operation. will be added to the HTTP request.
1053 1054 1055 1056 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1053 def vpn_device_configuration_script(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) response = vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Gets a xml format representation for vpn device configuration script.
virtual network gateway connection for which the configuration script is generated. generate vpn device script operation. to the HTTP request.
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1090 def vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_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::V2019_02_01::Models::VpnDeviceScriptParameters.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/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayConnectionName' => virtual_network_gateway_connection_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 MsRestAzure::AzureOperationError.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 = { client_side_validation: true, required: false, serialized_name: 'parsed_response', type: { name: 'String' } } 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 |
#vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a xml format representation for vpn device configuration script.
virtual network gateway connection for which the configuration script is generated. generate vpn device script operation. will be added to the HTTP request.
1072 1073 1074 |
# File 'lib/2019-02-01/generated/azure_mgmt_network/virtual_network_gateways.rb', line 1072 def vpn_device_configuration_script_with_http_info(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:nil) vpn_device_configuration_script_async(resource_group_name, virtual_network_gateway_connection_name, parameters, custom_headers:custom_headers).value! end |