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)


7620
7621
7622
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
# File 'lib/infrawrench/client.rb', line 7620

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:



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

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



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

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



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

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



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

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



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

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



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

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



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

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



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

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



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

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



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

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



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

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



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

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



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

def connect
  @connect
end

#cost_centresCostCentresNamespace (readonly)

Returns client.cost_centres.

Returns:



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

def cost_centres
  @cost_centres
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



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

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



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

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



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

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



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

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



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

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



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

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



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

def docker
  @docker
end

#expiringExpiringNamespace (readonly)

Returns client.expiring.

Returns:



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

def expiring
  @expiring
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



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

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



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

def kv
  @kv
end

#log_workspacesLogWorkspacesNamespace (readonly)

Returns client.log_workspaces.

Returns:



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

def log_workspaces
  @log_workspaces
end

#metric_alertsMetricAlertsNamespace (readonly)

Returns client.metric_alerts.

Returns:



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

def metric_alerts
  @metric_alerts
end

#momentMomentNamespace (readonly)

Returns client.moment.

Returns:



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

def moment
  @moment
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



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

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



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

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



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

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



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

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



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

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



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

def resources
  @resources
end

#rightsizingRightsizingNamespace (readonly)

Returns client.rightsizing.

Returns:



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

def rightsizing
  @rightsizing
end

#schedulesSchedulesNamespace (readonly)

Returns client.schedules.

Returns:



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

def schedules
  @schedules
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



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

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



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

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



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

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



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

def sql
  @sql
end

#ssh_fanoutSshFanoutNamespace (readonly)

Returns client.ssh_fanout.

Returns:



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

def ssh_fanout
  @ssh_fanout
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



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

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



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

def ssh_tunnels
  @ssh_tunnels
end

#status_incidentsStatusIncidentsNamespace (readonly)

Returns client.status_incidents.

Returns:



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

def status_incidents
  @status_incidents
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



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

def storage
  @storage
end

#tag_policyTagPolicyNamespace (readonly)

Returns client.tag_policy.

Returns:



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

def tag_policy
  @tag_policy
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



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

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.



7519
7520
7521
# File 'lib/infrawrench/client.rb', line 7519

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



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

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



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

def workflows
  @workflows
end