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)


4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
# File 'lib/infrawrench/client.rb', line 4577

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)
  @pages = PagesNamespace.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:



4516
4517
4518
# File 'lib/infrawrench/client.rb', line 4516

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



4518
4519
4520
# File 'lib/infrawrench/client.rb', line 4518

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



4520
4521
4522
# File 'lib/infrawrench/client.rb', line 4520

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



4522
4523
4524
# File 'lib/infrawrench/client.rb', line 4522

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



4524
4525
4526
# File 'lib/infrawrench/client.rb', line 4524

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



4526
4527
4528
# File 'lib/infrawrench/client.rb', line 4526

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



4528
4529
4530
# File 'lib/infrawrench/client.rb', line 4528

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



4530
4531
4532
# File 'lib/infrawrench/client.rb', line 4530

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



4532
4533
4534
# File 'lib/infrawrench/client.rb', line 4532

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



4534
4535
4536
# File 'lib/infrawrench/client.rb', line 4534

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



4536
4537
4538
# File 'lib/infrawrench/client.rb', line 4536

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



4538
4539
4540
# File 'lib/infrawrench/client.rb', line 4538

def costs
  @costs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



4540
4541
4542
# File 'lib/infrawrench/client.rb', line 4540

def dashboards
  @dashboards
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



4542
4543
4544
# File 'lib/infrawrench/client.rb', line 4542

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



4544
4545
4546
# File 'lib/infrawrench/client.rb', line 4544

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



4546
4547
4548
# File 'lib/infrawrench/client.rb', line 4546

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



4548
4549
4550
# File 'lib/infrawrench/client.rb', line 4548

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



4550
4551
4552
# File 'lib/infrawrench/client.rb', line 4550

def orgs
  @orgs
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



4552
4553
4554
# File 'lib/infrawrench/client.rb', line 4552

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



4554
4555
4556
# File 'lib/infrawrench/client.rb', line 4554

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



4556
4557
4558
# File 'lib/infrawrench/client.rb', line 4556

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



4558
4559
4560
# File 'lib/infrawrench/client.rb', line 4558

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



4560
4561
4562
# File 'lib/infrawrench/client.rb', line 4560

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



4562
4563
4564
# File 'lib/infrawrench/client.rb', line 4562

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



4564
4565
4566
# File 'lib/infrawrench/client.rb', line 4564

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



4566
4567
4568
# File 'lib/infrawrench/client.rb', line 4566

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



4568
4569
4570
# File 'lib/infrawrench/client.rb', line 4568

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



4570
4571
4572
# File 'lib/infrawrench/client.rb', line 4570

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



4572
4573
4574
# File 'lib/infrawrench/client.rb', line 4572

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.



4514
4515
4516
# File 'lib/infrawrench/client.rb', line 4514

def transport
  @transport
end