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)


5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
# File 'lib/infrawrench/client.rb', line 5229

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



5164
5165
5166
# File 'lib/infrawrench/client.rb', line 5164

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



5166
5167
5168
# File 'lib/infrawrench/client.rb', line 5166

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



5168
5169
5170
# File 'lib/infrawrench/client.rb', line 5168

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



5170
5171
5172
# File 'lib/infrawrench/client.rb', line 5170

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



5172
5173
5174
# File 'lib/infrawrench/client.rb', line 5172

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



5174
5175
5176
# File 'lib/infrawrench/client.rb', line 5174

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



5176
5177
5178
# File 'lib/infrawrench/client.rb', line 5176

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



5178
5179
5180
# File 'lib/infrawrench/client.rb', line 5178

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



5180
5181
5182
# File 'lib/infrawrench/client.rb', line 5180

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



5182
5183
5184
# File 'lib/infrawrench/client.rb', line 5182

def budgets
  @budgets
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



5184
5185
5186
# File 'lib/infrawrench/client.rb', line 5184

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



5186
5187
5188
# File 'lib/infrawrench/client.rb', line 5186

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



5188
5189
5190
# File 'lib/infrawrench/client.rb', line 5188

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



5190
5191
5192
# File 'lib/infrawrench/client.rb', line 5190

def dashboards
  @dashboards
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



5192
5193
5194
# File 'lib/infrawrench/client.rb', line 5192

def deployments
  @deployments
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



5194
5195
5196
# File 'lib/infrawrench/client.rb', line 5194

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



5196
5197
5198
# File 'lib/infrawrench/client.rb', line 5196

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



5198
5199
5200
# File 'lib/infrawrench/client.rb', line 5198

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



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

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



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

def orgs
  @orgs
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



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

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



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

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



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

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



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

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



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

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



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

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



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

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



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

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



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

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



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

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



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

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.



5162
5163
5164
# File 'lib/infrawrench/client.rb', line 5162

def transport
  @transport
end