set_connection: Set up parameters of a connection with ATSD.

Description Usage Arguments Details See Also Examples

View source: R/set_connection.R

Description

The function overrides the connection parameters for the duration of the current R session without changing the configuration file.

Usage

1
2
set_connection(url = NA, user = NA, password = NA, verify = NA,
  encryption = NA, file = NA)

Arguments

url

Optional string argument. The url of ATSD with the port number.

user

Optional string argument. The user name.

password

Optional string argument. The user's password.

verify

Optional string argument – "yes" or "no". verify = "yes" ensures validation of ATSD SSL certificate and verify = "no" suppresses the validation (applicable in the case of 'https' protocol).

encryption

Optional string argument. Cryptographic protocol used by ATSD https server. Possible values are: "default", "ssl2", "ssl3", and "tls1" (In most cases, use "ssl3" or "tls1".)

file

Optional string argument. The absolute path to the file from which the connection parameters could be read. The file should be formatted as the package configuration file, see the Details section below.

Details

The function overrides the connection parameters for the duration of the current R session without changing the configuration file. If called without arguments the function sets the connection parameters from the configuration file. If the file argument is provided the function use it. In both cases the current values of the parameters became the same as in the file. The file should be a plain text file formatted as the following:

# the url of ATSD including port number
url=http://host_name:port_number
# the user name
user=atsd_user_name
# the user's password
password=atsd_user_password
# validate ATSD SSL certificate: yes, no
verify=no
# cryptographic protocol used by ATSD https server:
# default, ssl2, ssl3, tls1
encryption=ssl3

In case the file argument is not provided, but some of other arguments are specified, the only specified parameters will be changed.

See Also

To see the current values of the connection parameters use the show_connection function. To change the configuration file use the save_connection function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Modify the user
set_connection(user = "user001")

# Modify the cryptographic protocol
set_connection(encryption = "tls1")

# Set up url, user and password
set_connection(url = "http://my.company.com:8088", user = "user001", password = "123456")
    
# Set up parameters of https connection
set_connection(url = "https://my.company.com:8443", user = "user001", password = "123456", 
               verify = "no", encryption = "ssl3")

## Not run: 
# Set up parameters from a file
set_connection(file = "/home/user001/atsd_https_connection.txt")
 
# Set up parameters from the configuration file
set_connection()

## End(Not run)
    

atsd documentation built on May 2, 2019, 4:06 p.m.