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)


4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
# File 'lib/infrawrench/client.rb', line 4628

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:



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

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



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

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



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

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



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

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



4575
4576
4577
# File 'lib/infrawrench/client.rb', line 4575

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



4577
4578
4579
# File 'lib/infrawrench/client.rb', line 4577

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



4579
4580
4581
# File 'lib/infrawrench/client.rb', line 4579

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



4581
4582
4583
# File 'lib/infrawrench/client.rb', line 4581

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



4583
4584
4585
# File 'lib/infrawrench/client.rb', line 4583

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



4585
4586
4587
# File 'lib/infrawrench/client.rb', line 4585

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



4587
4588
4589
# File 'lib/infrawrench/client.rb', line 4587

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



4589
4590
4591
# File 'lib/infrawrench/client.rb', line 4589

def costs
  @costs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



4591
4592
4593
# File 'lib/infrawrench/client.rb', line 4591

def dashboards
  @dashboards
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



4593
4594
4595
# File 'lib/infrawrench/client.rb', line 4593

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



4595
4596
4597
# File 'lib/infrawrench/client.rb', line 4595

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



4597
4598
4599
# File 'lib/infrawrench/client.rb', line 4597

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



4599
4600
4601
# File 'lib/infrawrench/client.rb', line 4599

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



4601
4602
4603
# File 'lib/infrawrench/client.rb', line 4601

def orgs
  @orgs
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



4603
4604
4605
# File 'lib/infrawrench/client.rb', line 4603

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



4605
4606
4607
# File 'lib/infrawrench/client.rb', line 4605

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



4607
4608
4609
# File 'lib/infrawrench/client.rb', line 4607

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



4609
4610
4611
# File 'lib/infrawrench/client.rb', line 4609

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



4611
4612
4613
# File 'lib/infrawrench/client.rb', line 4611

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



4613
4614
4615
# File 'lib/infrawrench/client.rb', line 4613

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



4615
4616
4617
# File 'lib/infrawrench/client.rb', line 4615

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



4617
4618
4619
# File 'lib/infrawrench/client.rb', line 4617

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



4619
4620
4621
# File 'lib/infrawrench/client.rb', line 4619

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



4621
4622
4623
# File 'lib/infrawrench/client.rb', line 4621

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



4623
4624
4625
# File 'lib/infrawrench/client.rb', line 4623

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.



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

def transport
  @transport
end