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)


8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
# File 'lib/infrawrench/client.rb', line 8091

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)
  @leases = LeasesNamespace.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)
  @posture = PostureNamespace.new(@transport)
  @probes = ProbesNamespace.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:



7986
7987
7988
# File 'lib/infrawrench/client.rb', line 7986

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



7988
7989
7990
# File 'lib/infrawrench/client.rb', line 7988

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



7990
7991
7992
# File 'lib/infrawrench/client.rb', line 7990

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



7992
7993
7994
# File 'lib/infrawrench/client.rb', line 7992

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



7994
7995
7996
# File 'lib/infrawrench/client.rb', line 7994

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



7996
7997
7998
# File 'lib/infrawrench/client.rb', line 7996

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



7998
7999
8000
# File 'lib/infrawrench/client.rb', line 7998

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



8000
8001
8002
# File 'lib/infrawrench/client.rb', line 8000

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



8002
8003
8004
# File 'lib/infrawrench/client.rb', line 8002

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



8004
8005
8006
# File 'lib/infrawrench/client.rb', line 8004

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



8006
8007
8008
# File 'lib/infrawrench/client.rb', line 8006

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



8008
8009
8010
# File 'lib/infrawrench/client.rb', line 8008

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



8010
8011
8012
# File 'lib/infrawrench/client.rb', line 8010

def connect
  @connect
end

#cost_centresCostCentresNamespace (readonly)

Returns client.cost_centres.

Returns:



8012
8013
8014
# File 'lib/infrawrench/client.rb', line 8012

def cost_centres
  @cost_centres
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



8014
8015
8016
# File 'lib/infrawrench/client.rb', line 8014

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



8016
8017
8018
# File 'lib/infrawrench/client.rb', line 8016

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



8018
8019
8020
# File 'lib/infrawrench/client.rb', line 8018

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



8020
8021
8022
# File 'lib/infrawrench/client.rb', line 8020

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



8022
8023
8024
# File 'lib/infrawrench/client.rb', line 8022

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



8024
8025
8026
# File 'lib/infrawrench/client.rb', line 8024

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



8026
8027
8028
# File 'lib/infrawrench/client.rb', line 8026

def docker
  @docker
end

#expiringExpiringNamespace (readonly)

Returns client.expiring.

Returns:



8028
8029
8030
# File 'lib/infrawrench/client.rb', line 8028

def expiring
  @expiring
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



8030
8031
8032
# File 'lib/infrawrench/client.rb', line 8030

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



8032
8033
8034
# File 'lib/infrawrench/client.rb', line 8032

def kv
  @kv
end

#leasesLeasesNamespace (readonly)

Returns client.leases.

Returns:



8034
8035
8036
# File 'lib/infrawrench/client.rb', line 8034

def leases
  @leases
end

#log_workspacesLogWorkspacesNamespace (readonly)

Returns client.log_workspaces.

Returns:



8036
8037
8038
# File 'lib/infrawrench/client.rb', line 8036

def log_workspaces
  @log_workspaces
end

#metric_alertsMetricAlertsNamespace (readonly)

Returns client.metric_alerts.

Returns:



8038
8039
8040
# File 'lib/infrawrench/client.rb', line 8038

def metric_alerts
  @metric_alerts
end

#momentMomentNamespace (readonly)

Returns client.moment.

Returns:



8040
8041
8042
# File 'lib/infrawrench/client.rb', line 8040

def moment
  @moment
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



8042
8043
8044
# File 'lib/infrawrench/client.rb', line 8042

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



8044
8045
8046
# File 'lib/infrawrench/client.rb', line 8044

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



8046
8047
8048
# File 'lib/infrawrench/client.rb', line 8046

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



8048
8049
8050
# File 'lib/infrawrench/client.rb', line 8048

def pages
  @pages
end

#posturePostureNamespace (readonly)

Returns client.posture.

Returns:



8050
8051
8052
# File 'lib/infrawrench/client.rb', line 8050

def posture
  @posture
end

#probesProbesNamespace (readonly)

Returns client.probes.

Returns:



8052
8053
8054
# File 'lib/infrawrench/client.rb', line 8052

def probes
  @probes
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



8054
8055
8056
# File 'lib/infrawrench/client.rb', line 8054

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



8056
8057
8058
# File 'lib/infrawrench/client.rb', line 8056

def resources
  @resources
end

#rightsizingRightsizingNamespace (readonly)

Returns client.rightsizing.

Returns:



8058
8059
8060
# File 'lib/infrawrench/client.rb', line 8058

def rightsizing
  @rightsizing
end

#schedulesSchedulesNamespace (readonly)

Returns client.schedules.

Returns:



8060
8061
8062
# File 'lib/infrawrench/client.rb', line 8060

def schedules
  @schedules
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



8062
8063
8064
# File 'lib/infrawrench/client.rb', line 8062

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



8064
8065
8066
# File 'lib/infrawrench/client.rb', line 8064

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



8066
8067
8068
# File 'lib/infrawrench/client.rb', line 8066

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



8068
8069
8070
# File 'lib/infrawrench/client.rb', line 8068

def sql
  @sql
end

#ssh_fanoutSshFanoutNamespace (readonly)

Returns client.ssh_fanout.

Returns:



8070
8071
8072
# File 'lib/infrawrench/client.rb', line 8070

def ssh_fanout
  @ssh_fanout
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



8072
8073
8074
# File 'lib/infrawrench/client.rb', line 8072

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



8074
8075
8076
# File 'lib/infrawrench/client.rb', line 8074

def ssh_tunnels
  @ssh_tunnels
end

#status_incidentsStatusIncidentsNamespace (readonly)

Returns client.status_incidents.

Returns:



8076
8077
8078
# File 'lib/infrawrench/client.rb', line 8076

def status_incidents
  @status_incidents
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



8078
8079
8080
# File 'lib/infrawrench/client.rb', line 8078

def storage
  @storage
end

#tag_policyTagPolicyNamespace (readonly)

Returns client.tag_policy.

Returns:



8080
8081
8082
# File 'lib/infrawrench/client.rb', line 8080

def tag_policy
  @tag_policy
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



8082
8083
8084
# File 'lib/infrawrench/client.rb', line 8082

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.



7984
7985
7986
# File 'lib/infrawrench/client.rb', line 7984

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



8084
8085
8086
# File 'lib/infrawrench/client.rb', line 8084

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



8086
8087
8088
# File 'lib/infrawrench/client.rb', line 8086

def workflows
  @workflows
end