Class: OracleBMC::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/oraclebmc/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



74
75
76
77
78
# File 'lib/oraclebmc/config.rb', line 74

def initialize
  @timeout = 0
  @connection_timeout = 10
  @log_requests = false
end

Instance Attribute Details

#additional_user_agentString

If set, then this string will be added to the user agent sent with each request.

Returns:

  • (String)


72
73
74
# File 'lib/oraclebmc/config.rb', line 72

def additional_user_agent
  @additional_user_agent
end

#connection_timeoutInteger

The time limit for the connection phase in seconds. Defaults to 10 seconds.

Returns:

  • (Integer)


66
67
68
# File 'lib/oraclebmc/config.rb', line 66

def connection_timeout
  @connection_timeout
end

#fingerprintString

SSL Fingerprint to use for authentication. Example: 20:3b:97:13:55:1c:1c:0d:d3:37:d8:50:4e:c5:3a:12

Returns:

  • (String)


18
19
20
# File 'lib/oraclebmc/config.rb', line 18

def fingerprint
  @fingerprint
end

#key_fileString

Client private key file. Example: ~/.ssh/bmc_key

Returns:

  • (String)


30
31
32
# File 'lib/oraclebmc/config.rb', line 30

def key_file
  @key_file
end

#log_requeststrue, false

Whether to log detailed request and response data. This will always write to STDOUT. Defaults to false.

Returns:

  • (true, false)


54
55
56
# File 'lib/oraclebmc/config.rb', line 54

def log_requests
  @log_requests
end

#loggerLogger

Defines the logger used for debugging. For example, log to STDOUT by setting this to Logger.new(STDOUT). This property cannot be set from a config file.

Returns:

  • (Logger)


47
48
49
# File 'lib/oraclebmc/config.rb', line 47

def logger
  @logger
end

#pass_phraseString

Pass phrase used for key file, if it is encrypted.

Returns:

  • (String)


35
36
37
# File 'lib/oraclebmc/config.rb', line 35

def pass_phrase
  @pass_phrase
end

#regionOracleBMC::Regions::REGION_ENUM

A region to use for APIs created with this Config.



40
41
42
# File 'lib/oraclebmc/config.rb', line 40

def region
  @region
end

#tenancyString

OCID of the tenancy to use for authentication. Example: ocid1.tenancy.oc1..aaaaaaaaba3pv6wkcr4jqae5f15p2b2m2yt2j6rx32uzr4h25vqstifsfdsq

Returns:

  • (String)


24
25
26
# File 'lib/oraclebmc/config.rb', line 24

def tenancy
  @tenancy
end

#timeoutInteger

The time limit for HTTP request in seconds. Defaults to 0 (never times out).

Returns:

  • (Integer)


60
61
62
# File 'lib/oraclebmc/config.rb', line 60

def timeout
  @timeout
end

#userString

OCID of the user to use for authentication. Example: ocidv1:user:oc1:phx:1460406592659:aaaaaaaawcbqrkycbolrirg2n3xjl5fabc

Returns:

  • (String)


12
13
14
# File 'lib/oraclebmc/config.rb', line 12

def user
  @user
end