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)


5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
# File 'lib/infrawrench/client.rb', line 5269

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)
  @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)
end

Instance Attribute Details

#accountsAccountsNamespace (readonly)

Returns client.accounts.

Returns:



5202
5203
5204
# File 'lib/infrawrench/client.rb', line 5202

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



5204
5205
5206
# File 'lib/infrawrench/client.rb', line 5204

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



5206
5207
5208
# File 'lib/infrawrench/client.rb', line 5206

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



5208
5209
5210
# File 'lib/infrawrench/client.rb', line 5208

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



5210
5211
5212
# File 'lib/infrawrench/client.rb', line 5210

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



5212
5213
5214
# File 'lib/infrawrench/client.rb', line 5212

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



5214
5215
5216
# File 'lib/infrawrench/client.rb', line 5214

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



5216
5217
5218
# File 'lib/infrawrench/client.rb', line 5216

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



5218
5219
5220
# File 'lib/infrawrench/client.rb', line 5218

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



5220
5221
5222
# File 'lib/infrawrench/client.rb', line 5220

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



5222
5223
5224
# File 'lib/infrawrench/client.rb', line 5222

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



5224
5225
5226
# File 'lib/infrawrench/client.rb', line 5224

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



5226
5227
5228
# File 'lib/infrawrench/client.rb', line 5226

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



5228
5229
5230
# File 'lib/infrawrench/client.rb', line 5228

def dashboards
  @dashboards
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



5230
5231
5232
# File 'lib/infrawrench/client.rb', line 5230

def deployments
  @deployments
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



5232
5233
5234
# File 'lib/infrawrench/client.rb', line 5232

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



5234
5235
5236
# File 'lib/infrawrench/client.rb', line 5234

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



5236
5237
5238
# File 'lib/infrawrench/client.rb', line 5236

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



5238
5239
5240
# File 'lib/infrawrench/client.rb', line 5238

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



5240
5241
5242
# File 'lib/infrawrench/client.rb', line 5240

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



5242
5243
5244
# File 'lib/infrawrench/client.rb', line 5242

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



5244
5245
5246
# File 'lib/infrawrench/client.rb', line 5244

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



5246
5247
5248
# File 'lib/infrawrench/client.rb', line 5246

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



5248
5249
5250
# File 'lib/infrawrench/client.rb', line 5248

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



5250
5251
5252
# File 'lib/infrawrench/client.rb', line 5250

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



5252
5253
5254
# File 'lib/infrawrench/client.rb', line 5252

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



5254
5255
5256
# File 'lib/infrawrench/client.rb', line 5254

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



5256
5257
5258
# File 'lib/infrawrench/client.rb', line 5256

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



5258
5259
5260
# File 'lib/infrawrench/client.rb', line 5258

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



5260
5261
5262
# File 'lib/infrawrench/client.rb', line 5260

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



5262
5263
5264
# File 'lib/infrawrench/client.rb', line 5262

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



5264
5265
5266
# File 'lib/infrawrench/client.rb', line 5264

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.



5200
5201
5202
# File 'lib/infrawrench/client.rb', line 5200

def transport
  @transport
end