Method: SDM::Client#initialize
- Defined in:
- lib/strongdm.rb
#initialize(api_access_key, api_secret_key, host: "api.strongdm.com:443", insecure: false) ⇒ Client
Creates a new strongDM API client.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/strongdm.rb', line 31 def initialize(api_access_key, api_secret_key, host: "api.strongdm.com:443", insecure: false) @api_access_key = api_access_key @api_secret_key = Base64.strict_decode64(api_secret_key) @max_retries = DEFAULT_MAX_RETRIES @base_retry_delay = DEFAULT_BASE_RETRY_DELAY @max_retry_delay = DEFAULT_MAX_RETRY_DELAY = AccountAttachments.new(host, insecure, self) @account_grants = AccountGrants.new(host, insecure, self) @accounts = Accounts.new(host, insecure, self) @nodes = Nodes.new(host, insecure, self) @resources = Resources.new(host, insecure, self) = RoleAttachments.new(host, insecure, self) @role_grants = RoleGrants.new(host, insecure, self) @roles = Roles.new(host, insecure, self) = Hash.new end |