Class: OCI::ApiClientProxySettings
- Inherits:
-
Object
- Object
- OCI::ApiClientProxySettings
- Defined in:
- lib/oci/api_client_proxy_settings.rb
Overview
This class contains proxy configuration information that can be provided to ApiClient. If ApiClient is provided a proxy settings object then it will send requests via the specified proxy.
If no object of this class is provided to ApiClient then it will use the proxy settings from the ‘http_proxy` environment variable, if present.
To make ApiClient bypass proxies completely, pass it an object of this class with a nil #proxy_address
Instance Attribute Summary collapse
-
#proxy_address ⇒ String
readonly
The address of the proxy.
-
#proxy_password ⇒ String
readonly
The password used for the proxy if it supports username/password authentication.
-
#proxy_port ⇒ Integer
readonly
The proxy port.
-
#proxy_user ⇒ String
readonly
The username used for the proxy if it supports username/password authentication.
Instance Method Summary collapse
-
#initialize(proxy_address, proxy_port = nil, proxy_user = nil, proxy_password = nil) ⇒ ApiClientProxySettings
constructor
Creates a new ApiClientProxySettings object that can be provided to an ApiClient.
Constructor Details
#initialize(proxy_address, proxy_port = nil, proxy_user = nil, proxy_password = nil) ⇒ ApiClientProxySettings
Creates a new ApiClientProxySettings object that can be provided to an OCI::ApiClient
41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/api_client_proxy_settings.rb', line 41 def initialize(proxy_address, proxy_port = nil, proxy_user = nil, proxy_password = nil) validate_proxy_address_port(proxy_address, proxy_port) validate_proxy_user_password(proxy_user, proxy_password) @proxy_address = proxy_address @proxy_port = proxy_port @proxy_user = proxy_user @proxy_password = proxy_password end |
Instance Attribute Details
#proxy_address ⇒ String (readonly)
The address of the proxy. This should be a DNS hostname or an IP address, but may be nil to indicate that proxies should be bypassed
18 19 20 |
# File 'lib/oci/api_client_proxy_settings.rb', line 18 def proxy_address @proxy_address end |
#proxy_password ⇒ String (readonly)
The password used for the proxy if it supports username/password authentication
33 34 35 |
# File 'lib/oci/api_client_proxy_settings.rb', line 33 def proxy_password @proxy_password end |
#proxy_port ⇒ Integer (readonly)
The proxy port
23 24 25 |
# File 'lib/oci/api_client_proxy_settings.rb', line 23 def proxy_port @proxy_port end |
#proxy_user ⇒ String (readonly)
The username used for the proxy if it supports username/password authentication
28 29 30 |
# File 'lib/oci/api_client_proxy_settings.rb', line 28 def proxy_user @proxy_user end |