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)


5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
# File 'lib/infrawrench/client.rb', line 5448

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)
  @custom_graphs = CustomGraphsNamespace.new(@transport)
  @dashboards = DashboardsNamespace.new(@transport)
  @deployments = DeploymentsNamespace.new(@transport)
  @digest = DigestNamespace.new(@transport)
  @docker = DockerNamespace.new(@transport)
  @invitations = InvitationsNamespace.new(@transport)
  @kv = KvNamespace.new(@transport)
  @msteams = MsteamsNamespace.new(@transport)
  @orgs = OrgsNamespace.new(@transport)
  @orphans = OrphansNamespace.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)
  @workflow_approvals = WorkflowApprovalsNamespace.new(@transport)
end

Instance Attribute Details

#accountsAccountsNamespace (readonly)

Returns client.accounts.

Returns:



5377
5378
5379
# File 'lib/infrawrench/client.rb', line 5377

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



5379
5380
5381
# File 'lib/infrawrench/client.rb', line 5379

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



5381
5382
5383
# File 'lib/infrawrench/client.rb', line 5381

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



5383
5384
5385
# File 'lib/infrawrench/client.rb', line 5383

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



5385
5386
5387
# File 'lib/infrawrench/client.rb', line 5385

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



5387
5388
5389
# File 'lib/infrawrench/client.rb', line 5387

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



5389
5390
5391
# File 'lib/infrawrench/client.rb', line 5389

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



5391
5392
5393
# File 'lib/infrawrench/client.rb', line 5391

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



5393
5394
5395
# File 'lib/infrawrench/client.rb', line 5393

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



5395
5396
5397
# File 'lib/infrawrench/client.rb', line 5395

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



5397
5398
5399
# File 'lib/infrawrench/client.rb', line 5397

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



5399
5400
5401
# File 'lib/infrawrench/client.rb', line 5399

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



5401
5402
5403
# File 'lib/infrawrench/client.rb', line 5401

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



5403
5404
5405
# File 'lib/infrawrench/client.rb', line 5403

def dashboards
  @dashboards
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



5405
5406
5407
# File 'lib/infrawrench/client.rb', line 5405

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



5407
5408
5409
# File 'lib/infrawrench/client.rb', line 5407

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



5409
5410
5411
# File 'lib/infrawrench/client.rb', line 5409

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



5411
5412
5413
# File 'lib/infrawrench/client.rb', line 5411

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



5413
5414
5415
# File 'lib/infrawrench/client.rb', line 5413

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



5415
5416
5417
# File 'lib/infrawrench/client.rb', line 5415

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



5417
5418
5419
# File 'lib/infrawrench/client.rb', line 5417

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



5419
5420
5421
# File 'lib/infrawrench/client.rb', line 5419

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



5421
5422
5423
# File 'lib/infrawrench/client.rb', line 5421

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



5423
5424
5425
# File 'lib/infrawrench/client.rb', line 5423

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



5425
5426
5427
# File 'lib/infrawrench/client.rb', line 5425

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



5427
5428
5429
# File 'lib/infrawrench/client.rb', line 5427

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



5429
5430
5431
# File 'lib/infrawrench/client.rb', line 5429

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



5431
5432
5433
# File 'lib/infrawrench/client.rb', line 5431

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



5433
5434
5435
# File 'lib/infrawrench/client.rb', line 5433

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



5435
5436
5437
# File 'lib/infrawrench/client.rb', line 5435

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



5437
5438
5439
# File 'lib/infrawrench/client.rb', line 5437

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



5439
5440
5441
# File 'lib/infrawrench/client.rb', line 5439

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



5441
5442
5443
# File 'lib/infrawrench/client.rb', line 5441

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.



5375
5376
5377
# File 'lib/infrawrench/client.rb', line 5375

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



5443
5444
5445
# File 'lib/infrawrench/client.rb', line 5443

def workflow_approvals
  @workflow_approvals
end