Class: Infrawrench::APIV1Client

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

A client for the Infrawrench API.

client = Infrawrench::APIV1Client.new(
  api_key: ENV.fetch("INFRAWRENCH_API_KEY"),
  org_id: ENV.fetch("INFRAWRENCH_ORG_ID")
)
client.accounts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ APIV1Client

Returns a new instance of APIV1Client.

Parameters:

  • options (Hash)

    Client configuration — :base_url, :api_key, :org_id, :headers, :timeout, :open_timeout and :http_handler. See Transport#initialize, which owns the list.

  • (Object)


4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
# File 'lib/infrawrench/client.rb', line 4307

def initialize(**options)
  @transport = Transport.new(**options)
  @accounts = AccountsNamespace.new(@transport)
  @agents = AgentsNamespace.new(@transport)
  @api_keys = ApiKeysNamespace.new(@transport)
  @artifacts = ArtifactsNamespace.new(@transport)
  @associations = AssociationsNamespace.new(@transport)
  @audit_logs = AuditLogsNamespace.new(@transport)
  @auth = AuthNamespace.new(@transport)
  @bastions = BastionsNamespace.new(@transport)
  @billing = BillingNamespace.new(@transport)
  @budgets = BudgetsNamespace.new(@transport)
  @connect = ConnectNamespace.new(@transport)
  @costs = CostsNamespace.new(@transport)
  @dashboards = DashboardsNamespace.new(@transport)
  @docker = DockerNamespace.new(@transport)
  @invitations = InvitationsNamespace.new(@transport)
  @kv = KvNamespace.new(@transport)
  @orgs = OrgsNamespace.new(@transport)
  @profile = ProfileNamespace.new(@transport)
  @resources = ResourcesNamespace.new(@transport)
  @search = SearchNamespace.new(@transport)
  @sftp = SftpNamespace.new(@transport)
  @slack = SlackNamespace.new(@transport)
  @sql = SqlNamespace.new(@transport)
  @ssh_keys = SshKeysNamespace.new(@transport)
  @ssh_tunnels = SshTunnelsNamespace.new(@transport)
  @storage = StorageNamespace.new(@transport)
  @team = TeamNamespace.new(@transport)
end

Instance Attribute Details

#accountsAccountsNamespace (readonly)

Returns client.accounts.

Returns:



4250
4251
4252
# File 'lib/infrawrench/client.rb', line 4250

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



4252
4253
4254
# File 'lib/infrawrench/client.rb', line 4252

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



4254
4255
4256
# File 'lib/infrawrench/client.rb', line 4254

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



4256
4257
4258
# File 'lib/infrawrench/client.rb', line 4256

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



4258
4259
4260
# File 'lib/infrawrench/client.rb', line 4258

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



4260
4261
4262
# File 'lib/infrawrench/client.rb', line 4260

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



4262
4263
4264
# File 'lib/infrawrench/client.rb', line 4262

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



4264
4265
4266
# File 'lib/infrawrench/client.rb', line 4264

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



4266
4267
4268
# File 'lib/infrawrench/client.rb', line 4266

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



4268
4269
4270
# File 'lib/infrawrench/client.rb', line 4268

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



4270
4271
4272
# File 'lib/infrawrench/client.rb', line 4270

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



4272
4273
4274
# File 'lib/infrawrench/client.rb', line 4272

def costs
  @costs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



4274
4275
4276
# File 'lib/infrawrench/client.rb', line 4274

def dashboards
  @dashboards
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



4276
4277
4278
# File 'lib/infrawrench/client.rb', line 4276

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



4278
4279
4280
# File 'lib/infrawrench/client.rb', line 4278

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



4280
4281
4282
# File 'lib/infrawrench/client.rb', line 4280

def kv
  @kv
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



4282
4283
4284
# File 'lib/infrawrench/client.rb', line 4282

def orgs
  @orgs
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



4284
4285
4286
# File 'lib/infrawrench/client.rb', line 4284

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



4286
4287
4288
# File 'lib/infrawrench/client.rb', line 4286

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



4288
4289
4290
# File 'lib/infrawrench/client.rb', line 4288

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



4290
4291
4292
# File 'lib/infrawrench/client.rb', line 4290

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



4292
4293
4294
# File 'lib/infrawrench/client.rb', line 4292

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



4294
4295
4296
# File 'lib/infrawrench/client.rb', line 4294

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



4296
4297
4298
# File 'lib/infrawrench/client.rb', line 4296

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



4298
4299
4300
# File 'lib/infrawrench/client.rb', line 4298

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



4300
4301
4302
# File 'lib/infrawrench/client.rb', line 4300

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



4302
4303
4304
# File 'lib/infrawrench/client.rb', line 4302

def team
  @team
end

#transportTransport (readonly)

Returns Shared request plumbing. Reach for this only to inspect the resolved base URL.

Returns:

  • (Transport)

    Shared request plumbing. Reach for this only to inspect the resolved base URL.



4248
4249
4250
# File 'lib/infrawrench/client.rb', line 4248

def transport
  @transport
end