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)


6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
# File 'lib/infrawrench/client.rb', line 6019

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:



5942
5943
5944
# File 'lib/infrawrench/client.rb', line 5942

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



5944
5945
5946
# File 'lib/infrawrench/client.rb', line 5944

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



5946
5947
5948
# File 'lib/infrawrench/client.rb', line 5946

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



5948
5949
5950
# File 'lib/infrawrench/client.rb', line 5948

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



5950
5951
5952
# File 'lib/infrawrench/client.rb', line 5950

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



5952
5953
5954
# File 'lib/infrawrench/client.rb', line 5952

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



5954
5955
5956
# File 'lib/infrawrench/client.rb', line 5954

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



5956
5957
5958
# File 'lib/infrawrench/client.rb', line 5956

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



5958
5959
5960
# File 'lib/infrawrench/client.rb', line 5958

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



5960
5961
5962
# File 'lib/infrawrench/client.rb', line 5960

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



5962
5963
5964
# File 'lib/infrawrench/client.rb', line 5962

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



5964
5965
5966
# File 'lib/infrawrench/client.rb', line 5964

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



5966
5967
5968
# File 'lib/infrawrench/client.rb', line 5966

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



5968
5969
5970
# File 'lib/infrawrench/client.rb', line 5968

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



5970
5971
5972
# File 'lib/infrawrench/client.rb', line 5970

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



5972
5973
5974
# File 'lib/infrawrench/client.rb', line 5972

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



5974
5975
5976
# File 'lib/infrawrench/client.rb', line 5974

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



5976
5977
5978
# File 'lib/infrawrench/client.rb', line 5976

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



5978
5979
5980
# File 'lib/infrawrench/client.rb', line 5978

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



5980
5981
5982
# File 'lib/infrawrench/client.rb', line 5980

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



5982
5983
5984
# File 'lib/infrawrench/client.rb', line 5982

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



5984
5985
5986
# File 'lib/infrawrench/client.rb', line 5984

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



5986
5987
5988
# File 'lib/infrawrench/client.rb', line 5986

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



5988
5989
5990
# File 'lib/infrawrench/client.rb', line 5988

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



5990
5991
5992
# File 'lib/infrawrench/client.rb', line 5990

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



5992
5993
5994
# File 'lib/infrawrench/client.rb', line 5992

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



5994
5995
5996
# File 'lib/infrawrench/client.rb', line 5994

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



5996
5997
5998
# File 'lib/infrawrench/client.rb', line 5996

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



5998
5999
6000
# File 'lib/infrawrench/client.rb', line 5998

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



6000
6001
6002
# File 'lib/infrawrench/client.rb', line 6000

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



6002
6003
6004
# File 'lib/infrawrench/client.rb', line 6002

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



6004
6005
6006
# File 'lib/infrawrench/client.rb', line 6004

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



6006
6007
6008
# File 'lib/infrawrench/client.rb', line 6006

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



6008
6009
6010
# File 'lib/infrawrench/client.rb', line 6008

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



6010
6011
6012
# File 'lib/infrawrench/client.rb', line 6010

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



6012
6013
6014
# File 'lib/infrawrench/client.rb', line 6012

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.



5940
5941
5942
# File 'lib/infrawrench/client.rb', line 5940

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



6014
6015
6016
# File 'lib/infrawrench/client.rb', line 6014

def workflow_approvals
  @workflow_approvals
end