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)


4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
# File 'lib/infrawrench/client.rb', line 4451

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)
  @msteams = MsteamsNamespace.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:



4392
4393
4394
# File 'lib/infrawrench/client.rb', line 4392

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



4394
4395
4396
# File 'lib/infrawrench/client.rb', line 4394

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



4396
4397
4398
# File 'lib/infrawrench/client.rb', line 4396

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



4398
4399
4400
# File 'lib/infrawrench/client.rb', line 4398

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



4400
4401
4402
# File 'lib/infrawrench/client.rb', line 4400

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



4402
4403
4404
# File 'lib/infrawrench/client.rb', line 4402

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



4404
4405
4406
# File 'lib/infrawrench/client.rb', line 4404

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



4406
4407
4408
# File 'lib/infrawrench/client.rb', line 4406

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



4408
4409
4410
# File 'lib/infrawrench/client.rb', line 4408

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



4410
4411
4412
# File 'lib/infrawrench/client.rb', line 4410

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



4412
4413
4414
# File 'lib/infrawrench/client.rb', line 4412

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



4414
4415
4416
# File 'lib/infrawrench/client.rb', line 4414

def costs
  @costs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



4416
4417
4418
# File 'lib/infrawrench/client.rb', line 4416

def dashboards
  @dashboards
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



4418
4419
4420
# File 'lib/infrawrench/client.rb', line 4418

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



4420
4421
4422
# File 'lib/infrawrench/client.rb', line 4420

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



4422
4423
4424
# File 'lib/infrawrench/client.rb', line 4422

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



4424
4425
4426
# File 'lib/infrawrench/client.rb', line 4424

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



4426
4427
4428
# File 'lib/infrawrench/client.rb', line 4426

def orgs
  @orgs
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



4428
4429
4430
# File 'lib/infrawrench/client.rb', line 4428

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



4430
4431
4432
# File 'lib/infrawrench/client.rb', line 4430

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



4432
4433
4434
# File 'lib/infrawrench/client.rb', line 4432

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



4434
4435
4436
# File 'lib/infrawrench/client.rb', line 4434

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



4436
4437
4438
# File 'lib/infrawrench/client.rb', line 4436

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



4438
4439
4440
# File 'lib/infrawrench/client.rb', line 4438

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



4440
4441
4442
# File 'lib/infrawrench/client.rb', line 4440

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



4442
4443
4444
# File 'lib/infrawrench/client.rb', line 4442

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



4444
4445
4446
# File 'lib/infrawrench/client.rb', line 4444

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



4446
4447
4448
# File 'lib/infrawrench/client.rb', line 4446

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.



4390
4391
4392
# File 'lib/infrawrench/client.rb', line 4390

def transport
  @transport
end