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)


8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
# File 'lib/infrawrench/client.rb', line 8138

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:



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

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



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

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



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

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



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

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



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

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



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

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



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

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



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

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



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

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



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

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



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

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



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

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



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

def connect
  @connect
end

#cost_centresCostCentresNamespace (readonly)

Returns client.cost_centres.

Returns:



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

def cost_centres
  @cost_centres
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



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

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



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

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



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

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



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

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



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

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



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

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



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

def docker
  @docker
end

#expiringExpiringNamespace (readonly)

Returns client.expiring.

Returns:



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

def expiring
  @expiring
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



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

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



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

def kv
  @kv
end

#leasesLeasesNamespace (readonly)

Returns client.leases.

Returns:



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

def leases
  @leases
end

#log_workspacesLogWorkspacesNamespace (readonly)

Returns client.log_workspaces.

Returns:



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

def log_workspaces
  @log_workspaces
end

#metric_alertsMetricAlertsNamespace (readonly)

Returns client.metric_alerts.

Returns:



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

def metric_alerts
  @metric_alerts
end

#momentMomentNamespace (readonly)

Returns client.moment.

Returns:



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

def moment
  @moment
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



8089
8090
8091
# File 'lib/infrawrench/client.rb', line 8089

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



8091
8092
8093
# File 'lib/infrawrench/client.rb', line 8091

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



8093
8094
8095
# File 'lib/infrawrench/client.rb', line 8093

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



8095
8096
8097
# File 'lib/infrawrench/client.rb', line 8095

def pages
  @pages
end

#posturePostureNamespace (readonly)

Returns client.posture.

Returns:



8097
8098
8099
# File 'lib/infrawrench/client.rb', line 8097

def posture
  @posture
end

#probesProbesNamespace (readonly)

Returns client.probes.

Returns:



8099
8100
8101
# File 'lib/infrawrench/client.rb', line 8099

def probes
  @probes
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



8101
8102
8103
# File 'lib/infrawrench/client.rb', line 8101

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



8103
8104
8105
# File 'lib/infrawrench/client.rb', line 8103

def resources
  @resources
end

#rightsizingRightsizingNamespace (readonly)

Returns client.rightsizing.

Returns:



8105
8106
8107
# File 'lib/infrawrench/client.rb', line 8105

def rightsizing
  @rightsizing
end

#schedulesSchedulesNamespace (readonly)

Returns client.schedules.

Returns:



8107
8108
8109
# File 'lib/infrawrench/client.rb', line 8107

def schedules
  @schedules
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



8109
8110
8111
# File 'lib/infrawrench/client.rb', line 8109

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



8111
8112
8113
# File 'lib/infrawrench/client.rb', line 8111

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



8113
8114
8115
# File 'lib/infrawrench/client.rb', line 8113

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



8115
8116
8117
# File 'lib/infrawrench/client.rb', line 8115

def sql
  @sql
end

#ssh_fanoutSshFanoutNamespace (readonly)

Returns client.ssh_fanout.

Returns:



8117
8118
8119
# File 'lib/infrawrench/client.rb', line 8117

def ssh_fanout
  @ssh_fanout
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



8119
8120
8121
# File 'lib/infrawrench/client.rb', line 8119

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



8121
8122
8123
# File 'lib/infrawrench/client.rb', line 8121

def ssh_tunnels
  @ssh_tunnels
end

#status_incidentsStatusIncidentsNamespace (readonly)

Returns client.status_incidents.

Returns:



8123
8124
8125
# File 'lib/infrawrench/client.rb', line 8123

def status_incidents
  @status_incidents
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



8125
8126
8127
# File 'lib/infrawrench/client.rb', line 8125

def storage
  @storage
end

#tag_policyTagPolicyNamespace (readonly)

Returns client.tag_policy.

Returns:



8127
8128
8129
# File 'lib/infrawrench/client.rb', line 8127

def tag_policy
  @tag_policy
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



8129
8130
8131
# File 'lib/infrawrench/client.rb', line 8129

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.



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

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



8131
8132
8133
# File 'lib/infrawrench/client.rb', line 8131

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



8133
8134
8135
# File 'lib/infrawrench/client.rb', line 8133

def workflows
  @workflows
end