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)


5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
# File 'lib/infrawrench/client.rb', line 5783

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)
  @change_freezes = ChangeFreezesNamespace.new(@transport)
  @changes = ChangesNamespace.new(@transport)
  @connect = ConnectNamespace.new(@transport)
  @costs = CostsNamespace.new(@transport)
  @custom_graphs = CustomGraphsNamespace.new(@transport)
  @dashboards = DashboardsNamespace.new(@transport)
  @dependency_graph = DependencyGraphNamespace.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:



5706
5707
5708
# File 'lib/infrawrench/client.rb', line 5706

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



5708
5709
5710
# File 'lib/infrawrench/client.rb', line 5708

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



5710
5711
5712
# File 'lib/infrawrench/client.rb', line 5710

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



5712
5713
5714
# File 'lib/infrawrench/client.rb', line 5712

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



5714
5715
5716
# File 'lib/infrawrench/client.rb', line 5714

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



5716
5717
5718
# File 'lib/infrawrench/client.rb', line 5716

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



5718
5719
5720
# File 'lib/infrawrench/client.rb', line 5718

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



5720
5721
5722
# File 'lib/infrawrench/client.rb', line 5720

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



5722
5723
5724
# File 'lib/infrawrench/client.rb', line 5722

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



5724
5725
5726
# File 'lib/infrawrench/client.rb', line 5724

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



5726
5727
5728
# File 'lib/infrawrench/client.rb', line 5726

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



5728
5729
5730
# File 'lib/infrawrench/client.rb', line 5728

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



5730
5731
5732
# File 'lib/infrawrench/client.rb', line 5730

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



5732
5733
5734
# File 'lib/infrawrench/client.rb', line 5732

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



5734
5735
5736
# File 'lib/infrawrench/client.rb', line 5734

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



5736
5737
5738
# File 'lib/infrawrench/client.rb', line 5736

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



5738
5739
5740
# File 'lib/infrawrench/client.rb', line 5738

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



5740
5741
5742
# File 'lib/infrawrench/client.rb', line 5740

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



5742
5743
5744
# File 'lib/infrawrench/client.rb', line 5742

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



5744
5745
5746
# File 'lib/infrawrench/client.rb', line 5744

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



5746
5747
5748
# File 'lib/infrawrench/client.rb', line 5746

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



5748
5749
5750
# File 'lib/infrawrench/client.rb', line 5748

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



5750
5751
5752
# File 'lib/infrawrench/client.rb', line 5750

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



5752
5753
5754
# File 'lib/infrawrench/client.rb', line 5752

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



5754
5755
5756
# File 'lib/infrawrench/client.rb', line 5754

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



5756
5757
5758
# File 'lib/infrawrench/client.rb', line 5756

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



5758
5759
5760
# File 'lib/infrawrench/client.rb', line 5758

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



5760
5761
5762
# File 'lib/infrawrench/client.rb', line 5760

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



5762
5763
5764
# File 'lib/infrawrench/client.rb', line 5762

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



5764
5765
5766
# File 'lib/infrawrench/client.rb', line 5764

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



5766
5767
5768
# File 'lib/infrawrench/client.rb', line 5766

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



5768
5769
5770
# File 'lib/infrawrench/client.rb', line 5768

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



5770
5771
5772
# File 'lib/infrawrench/client.rb', line 5770

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



5772
5773
5774
# File 'lib/infrawrench/client.rb', line 5772

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



5774
5775
5776
# File 'lib/infrawrench/client.rb', line 5774

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



5776
5777
5778
# File 'lib/infrawrench/client.rb', line 5776

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.



5704
5705
5706
# File 'lib/infrawrench/client.rb', line 5704

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



5778
5779
5780
# File 'lib/infrawrench/client.rb', line 5778

def workflow_approvals
  @workflow_approvals
end