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)


6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
# File 'lib/infrawrench/client.rb', line 6935

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)
  @cost_centres = CostCentresNamespace.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)
  @expiring = ExpiringNamespace.new(@transport)
  @invitations = InvitationsNamespace.new(@transport)
  @kv = KvNamespace.new(@transport)
  @moment = MomentNamespace.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)
  @rightsizing = RightsizingNamespace.new(@transport)
  @schedules = SchedulesNamespace.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)
  @status_incidents = StatusIncidentsNamespace.new(@transport)
  @storage = StorageNamespace.new(@transport)
  @tag_policy = TagPolicyNamespace.new(@transport)
  @team = TeamNamespace.new(@transport)
  @workflow_approvals = WorkflowApprovalsNamespace.new(@transport)
  @workflows = WorkflowsNamespace.new(@transport)
end

Instance Attribute Details

#accountsAccountsNamespace (readonly)

Returns client.accounts.

Returns:



6842
6843
6844
# File 'lib/infrawrench/client.rb', line 6842

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



6844
6845
6846
# File 'lib/infrawrench/client.rb', line 6844

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



6846
6847
6848
# File 'lib/infrawrench/client.rb', line 6846

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



6848
6849
6850
# File 'lib/infrawrench/client.rb', line 6848

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



6850
6851
6852
# File 'lib/infrawrench/client.rb', line 6850

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



6852
6853
6854
# File 'lib/infrawrench/client.rb', line 6852

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



6854
6855
6856
# File 'lib/infrawrench/client.rb', line 6854

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



6856
6857
6858
# File 'lib/infrawrench/client.rb', line 6856

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



6858
6859
6860
# File 'lib/infrawrench/client.rb', line 6858

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



6860
6861
6862
# File 'lib/infrawrench/client.rb', line 6860

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



6862
6863
6864
# File 'lib/infrawrench/client.rb', line 6862

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



6864
6865
6866
# File 'lib/infrawrench/client.rb', line 6864

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



6866
6867
6868
# File 'lib/infrawrench/client.rb', line 6866

def connect
  @connect
end

#cost_centresCostCentresNamespace (readonly)

Returns client.cost_centres.

Returns:



6868
6869
6870
# File 'lib/infrawrench/client.rb', line 6868

def cost_centres
  @cost_centres
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



6870
6871
6872
# File 'lib/infrawrench/client.rb', line 6870

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



6872
6873
6874
# File 'lib/infrawrench/client.rb', line 6872

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



6874
6875
6876
# File 'lib/infrawrench/client.rb', line 6874

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



6876
6877
6878
# File 'lib/infrawrench/client.rb', line 6876

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



6878
6879
6880
# File 'lib/infrawrench/client.rb', line 6878

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



6880
6881
6882
# File 'lib/infrawrench/client.rb', line 6880

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



6882
6883
6884
# File 'lib/infrawrench/client.rb', line 6882

def docker
  @docker
end

#expiringExpiringNamespace (readonly)

Returns client.expiring.

Returns:



6884
6885
6886
# File 'lib/infrawrench/client.rb', line 6884

def expiring
  @expiring
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



6886
6887
6888
# File 'lib/infrawrench/client.rb', line 6886

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



6888
6889
6890
# File 'lib/infrawrench/client.rb', line 6888

def kv
  @kv
end

#momentMomentNamespace (readonly)

Returns client.moment.

Returns:



6890
6891
6892
# File 'lib/infrawrench/client.rb', line 6890

def moment
  @moment
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



6892
6893
6894
# File 'lib/infrawrench/client.rb', line 6892

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



6894
6895
6896
# File 'lib/infrawrench/client.rb', line 6894

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



6896
6897
6898
# File 'lib/infrawrench/client.rb', line 6896

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



6898
6899
6900
# File 'lib/infrawrench/client.rb', line 6898

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



6900
6901
6902
# File 'lib/infrawrench/client.rb', line 6900

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



6902
6903
6904
# File 'lib/infrawrench/client.rb', line 6902

def resources
  @resources
end

#rightsizingRightsizingNamespace (readonly)

Returns client.rightsizing.

Returns:



6904
6905
6906
# File 'lib/infrawrench/client.rb', line 6904

def rightsizing
  @rightsizing
end

#schedulesSchedulesNamespace (readonly)

Returns client.schedules.

Returns:



6906
6907
6908
# File 'lib/infrawrench/client.rb', line 6906

def schedules
  @schedules
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



6908
6909
6910
# File 'lib/infrawrench/client.rb', line 6908

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



6910
6911
6912
# File 'lib/infrawrench/client.rb', line 6910

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



6912
6913
6914
# File 'lib/infrawrench/client.rb', line 6912

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



6914
6915
6916
# File 'lib/infrawrench/client.rb', line 6914

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



6916
6917
6918
# File 'lib/infrawrench/client.rb', line 6916

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



6918
6919
6920
# File 'lib/infrawrench/client.rb', line 6918

def ssh_tunnels
  @ssh_tunnels
end

#status_incidentsStatusIncidentsNamespace (readonly)

Returns client.status_incidents.

Returns:



6920
6921
6922
# File 'lib/infrawrench/client.rb', line 6920

def status_incidents
  @status_incidents
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



6922
6923
6924
# File 'lib/infrawrench/client.rb', line 6922

def storage
  @storage
end

#tag_policyTagPolicyNamespace (readonly)

Returns client.tag_policy.

Returns:



6924
6925
6926
# File 'lib/infrawrench/client.rb', line 6924

def tag_policy
  @tag_policy
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



6926
6927
6928
# File 'lib/infrawrench/client.rb', line 6926

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.



6840
6841
6842
# File 'lib/infrawrench/client.rb', line 6840

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



6928
6929
6930
# File 'lib/infrawrench/client.rb', line 6928

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



6930
6931
6932
# File 'lib/infrawrench/client.rb', line 6930

def workflows
  @workflows
end