VSphereAutomation::Appliance::NetworkingProxyApi
All URIs are relative to https://<vcenter>/rest
Method | HTTP request | Description |
---|---|---|
delete | DELETE /appliance/networking/proxy/protocol | Deletes a proxy configuration for a specific protocol. |
get | GET /appliance/networking/proxy/protocol | Gets the proxy configuration for a specific protocol. |
list | GET /appliance/networking/proxy | Gets proxy configuration for all configured protocols. |
set | PUT /appliance/networking/proxy/protocol | Configures which proxy server to use for the specified protocol. This operation sets environment variables for using proxy. In order for this configuration to take effect a logout / service restart is required. |
test | POST /appliance/networking/proxy/protocol | Tests a proxy configuration by testing the connection to the proxy server and test host. |
delete
delete(protocol)
Deletes a proxy configuration for a specific protocol.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::NetworkingProxyApi.new
protocol = 'protocol_example' # String | ID whose proxy is to be deleted.
begin
#Deletes a proxy configuration for a specific protocol.
api_instance.delete(protocol)
rescue VSphereAutomation::ApiError => e
puts "Exception when calling NetworkingProxyApi->delete: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
protocol | String | ID whose proxy is to be deleted. |
Return type
nil (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
get
ApplianceNetworkingProxyResult get(protocol)
Gets the proxy configuration for a specific protocol.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::NetworkingProxyApi.new
protocol = 'protocol_example' # String | The protocol whose proxy configuration is requested.
begin
#Gets the proxy configuration for a specific protocol.
result = api_instance.get(protocol)
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling NetworkingProxyApi->get: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
protocol | String | The protocol whose proxy configuration is requested. |
Return type
ApplianceNetworkingProxyResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
list
ApplianceNetworkingProxyListResult list
Gets proxy configuration for all configured protocols.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::NetworkingProxyApi.new
begin
#Gets proxy configuration for all configured protocols.
result = api_instance.list
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling NetworkingProxyApi->list: #{e}"
end
Parameters
This endpoint does not need any parameter.
Return type
ApplianceNetworkingProxyListResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
set
set(protocol, request_body)
Configures which proxy server to use for the specified protocol. This operation sets environment variables for using proxy. In order for this configuration to take effect a logout / service restart is required.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::NetworkingProxyApi.new
protocol = 'protocol_example' # String | The protocol for which proxy should be set.
request_body = Appliance::ApplianceNetworkingProxySet.new # ApplianceNetworkingProxySet |
begin
#Configures which proxy server to use for the specified protocol. This operation sets environment variables for using proxy. In order for this configuration to take effect a logout / service restart is required.
api_instance.set(protocol, request_body)
rescue VSphereAutomation::ApiError => e
puts "Exception when calling NetworkingProxyApi->set: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
protocol | String | The protocol for which proxy should be set. | |
request_body | ApplianceNetworkingProxySet |
Return type
nil (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
test
ApplianceNetworkingProxyTestResult test(protocol, action, request_body)
Tests a proxy configuration by testing the connection to the proxy server and test host.
Example
# load the gem
require 'vsphere-automation-appliance'
# setup authorization
VSphereAutomation::Configuration.new.tap do |config|
# Configure API key authorization: api_key
config.api_key['vmware-api-session-id'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['vmware-api-session-id'] = 'Bearer'
end
api_instance = VSphereAutomation::Appliance::NetworkingProxyApi.new
protocol = 'protocol_example' # String | Protocol whose proxy is to be tested.
action = 'action_example' # String | action=test
request_body = Appliance::ApplianceNetworkingProxyTest.new # ApplianceNetworkingProxyTest |
begin
#Tests a proxy configuration by testing the connection to the proxy server and test host.
result = api_instance.test(protocol, action, request_body)
p result
rescue VSphereAutomation::ApiError => e
puts "Exception when calling NetworkingProxyApi->test: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
protocol | String | Protocol whose proxy is to be tested. | |
action | String | action=test | |
request_body | ApplianceNetworkingProxyTest |
Return type
ApplianceNetworkingProxyTestResult
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json