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)


7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
# File 'lib/infrawrench/client.rb', line 7623

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)
  @log_workspaces = LogWorkspacesNamespace.new(@transport)
  @metric_alerts = MetricAlertsNamespace.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_fanout = SshFanoutNamespace.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:



7524
7525
7526
# File 'lib/infrawrench/client.rb', line 7524

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



7526
7527
7528
# File 'lib/infrawrench/client.rb', line 7526

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



7528
7529
7530
# File 'lib/infrawrench/client.rb', line 7528

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



7530
7531
7532
# File 'lib/infrawrench/client.rb', line 7530

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



7532
7533
7534
# File 'lib/infrawrench/client.rb', line 7532

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



7534
7535
7536
# File 'lib/infrawrench/client.rb', line 7534

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



7536
7537
7538
# File 'lib/infrawrench/client.rb', line 7536

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



7538
7539
7540
# File 'lib/infrawrench/client.rb', line 7538

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



7540
7541
7542
# File 'lib/infrawrench/client.rb', line 7540

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



7542
7543
7544
# File 'lib/infrawrench/client.rb', line 7542

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



7544
7545
7546
# File 'lib/infrawrench/client.rb', line 7544

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



7546
7547
7548
# File 'lib/infrawrench/client.rb', line 7546

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



7548
7549
7550
# File 'lib/infrawrench/client.rb', line 7548

def connect
  @connect
end

#cost_centresCostCentresNamespace (readonly)

Returns client.cost_centres.

Returns:



7550
7551
7552
# File 'lib/infrawrench/client.rb', line 7550

def cost_centres
  @cost_centres
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



7552
7553
7554
# File 'lib/infrawrench/client.rb', line 7552

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



7554
7555
7556
# File 'lib/infrawrench/client.rb', line 7554

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



7556
7557
7558
# File 'lib/infrawrench/client.rb', line 7556

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



7558
7559
7560
# File 'lib/infrawrench/client.rb', line 7558

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



7560
7561
7562
# File 'lib/infrawrench/client.rb', line 7560

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



7562
7563
7564
# File 'lib/infrawrench/client.rb', line 7562

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



7564
7565
7566
# File 'lib/infrawrench/client.rb', line 7564

def docker
  @docker
end

#expiringExpiringNamespace (readonly)

Returns client.expiring.

Returns:



7566
7567
7568
# File 'lib/infrawrench/client.rb', line 7566

def expiring
  @expiring
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



7568
7569
7570
# File 'lib/infrawrench/client.rb', line 7568

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



7570
7571
7572
# File 'lib/infrawrench/client.rb', line 7570

def kv
  @kv
end

#log_workspacesLogWorkspacesNamespace (readonly)

Returns client.log_workspaces.

Returns:



7572
7573
7574
# File 'lib/infrawrench/client.rb', line 7572

def log_workspaces
  @log_workspaces
end

#metric_alertsMetricAlertsNamespace (readonly)

Returns client.metric_alerts.

Returns:



7574
7575
7576
# File 'lib/infrawrench/client.rb', line 7574

def metric_alerts
  @metric_alerts
end

#momentMomentNamespace (readonly)

Returns client.moment.

Returns:



7576
7577
7578
# File 'lib/infrawrench/client.rb', line 7576

def moment
  @moment
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



7578
7579
7580
# File 'lib/infrawrench/client.rb', line 7578

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



7580
7581
7582
# File 'lib/infrawrench/client.rb', line 7580

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



7582
7583
7584
# File 'lib/infrawrench/client.rb', line 7582

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



7584
7585
7586
# File 'lib/infrawrench/client.rb', line 7584

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



7586
7587
7588
# File 'lib/infrawrench/client.rb', line 7586

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



7588
7589
7590
# File 'lib/infrawrench/client.rb', line 7588

def resources
  @resources
end

#rightsizingRightsizingNamespace (readonly)

Returns client.rightsizing.

Returns:



7590
7591
7592
# File 'lib/infrawrench/client.rb', line 7590

def rightsizing
  @rightsizing
end

#schedulesSchedulesNamespace (readonly)

Returns client.schedules.

Returns:



7592
7593
7594
# File 'lib/infrawrench/client.rb', line 7592

def schedules
  @schedules
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



7594
7595
7596
# File 'lib/infrawrench/client.rb', line 7594

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



7596
7597
7598
# File 'lib/infrawrench/client.rb', line 7596

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



7598
7599
7600
# File 'lib/infrawrench/client.rb', line 7598

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



7600
7601
7602
# File 'lib/infrawrench/client.rb', line 7600

def sql
  @sql
end

#ssh_fanoutSshFanoutNamespace (readonly)

Returns client.ssh_fanout.

Returns:



7602
7603
7604
# File 'lib/infrawrench/client.rb', line 7602

def ssh_fanout
  @ssh_fanout
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



7604
7605
7606
# File 'lib/infrawrench/client.rb', line 7604

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



7606
7607
7608
# File 'lib/infrawrench/client.rb', line 7606

def ssh_tunnels
  @ssh_tunnels
end

#status_incidentsStatusIncidentsNamespace (readonly)

Returns client.status_incidents.

Returns:



7608
7609
7610
# File 'lib/infrawrench/client.rb', line 7608

def status_incidents
  @status_incidents
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



7610
7611
7612
# File 'lib/infrawrench/client.rb', line 7610

def storage
  @storage
end

#tag_policyTagPolicyNamespace (readonly)

Returns client.tag_policy.

Returns:



7612
7613
7614
# File 'lib/infrawrench/client.rb', line 7612

def tag_policy
  @tag_policy
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



7614
7615
7616
# File 'lib/infrawrench/client.rb', line 7614

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.



7522
7523
7524
# File 'lib/infrawrench/client.rb', line 7522

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



7616
7617
7618
# File 'lib/infrawrench/client.rb', line 7616

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



7618
7619
7620
# File 'lib/infrawrench/client.rb', line 7618

def workflows
  @workflows
end