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)


6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
# File 'lib/infrawrench/client.rb', line 6129

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)
  @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)
  @invitations = InvitationsNamespace.new(@transport)
  @kv = KvNamespace.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)
  @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)
  @storage = StorageNamespace.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:



6050
6051
6052
# File 'lib/infrawrench/client.rb', line 6050

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



6052
6053
6054
# File 'lib/infrawrench/client.rb', line 6052

def agents
  @agents
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



6054
6055
6056
# File 'lib/infrawrench/client.rb', line 6054

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



6056
6057
6058
# File 'lib/infrawrench/client.rb', line 6056

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



6058
6059
6060
# File 'lib/infrawrench/client.rb', line 6058

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



6060
6061
6062
# File 'lib/infrawrench/client.rb', line 6060

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



6062
6063
6064
# File 'lib/infrawrench/client.rb', line 6062

def auth
  @auth
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



6064
6065
6066
# File 'lib/infrawrench/client.rb', line 6064

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



6066
6067
6068
# File 'lib/infrawrench/client.rb', line 6066

def billing
  @billing
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



6068
6069
6070
# File 'lib/infrawrench/client.rb', line 6068

def budgets
  @budgets
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



6070
6071
6072
# File 'lib/infrawrench/client.rb', line 6070

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



6072
6073
6074
# File 'lib/infrawrench/client.rb', line 6072

def changes
  @changes
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



6074
6075
6076
# File 'lib/infrawrench/client.rb', line 6074

def connect
  @connect
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



6076
6077
6078
# File 'lib/infrawrench/client.rb', line 6076

def costs
  @costs
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



6078
6079
6080
# File 'lib/infrawrench/client.rb', line 6078

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



6080
6081
6082
# File 'lib/infrawrench/client.rb', line 6080

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



6082
6083
6084
# File 'lib/infrawrench/client.rb', line 6082

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



6084
6085
6086
# File 'lib/infrawrench/client.rb', line 6084

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



6086
6087
6088
# File 'lib/infrawrench/client.rb', line 6086

def digest
  @digest
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



6088
6089
6090
# File 'lib/infrawrench/client.rb', line 6088

def docker
  @docker
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



6090
6091
6092
# File 'lib/infrawrench/client.rb', line 6090

def invitations
  @invitations
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



6092
6093
6094
# File 'lib/infrawrench/client.rb', line 6092

def kv
  @kv
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



6094
6095
6096
# File 'lib/infrawrench/client.rb', line 6094

def msteams
  @msteams
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



6096
6097
6098
# File 'lib/infrawrench/client.rb', line 6096

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



6098
6099
6100
# File 'lib/infrawrench/client.rb', line 6098

def orphans
  @orphans
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



6100
6101
6102
# File 'lib/infrawrench/client.rb', line 6100

def pages
  @pages
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



6102
6103
6104
# File 'lib/infrawrench/client.rb', line 6102

def profile
  @profile
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



6104
6105
6106
# File 'lib/infrawrench/client.rb', line 6104

def resources
  @resources
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



6106
6107
6108
# File 'lib/infrawrench/client.rb', line 6106

def search
  @search
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



6108
6109
6110
# File 'lib/infrawrench/client.rb', line 6108

def sftp
  @sftp
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



6110
6111
6112
# File 'lib/infrawrench/client.rb', line 6110

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



6112
6113
6114
# File 'lib/infrawrench/client.rb', line 6112

def sql
  @sql
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



6114
6115
6116
# File 'lib/infrawrench/client.rb', line 6114

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



6116
6117
6118
# File 'lib/infrawrench/client.rb', line 6116

def ssh_tunnels
  @ssh_tunnels
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



6118
6119
6120
# File 'lib/infrawrench/client.rb', line 6118

def storage
  @storage
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



6120
6121
6122
# File 'lib/infrawrench/client.rb', line 6120

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.



6048
6049
6050
# File 'lib/infrawrench/client.rb', line 6048

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



6122
6123
6124
# File 'lib/infrawrench/client.rb', line 6122

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



6124
6125
6126
# File 'lib/infrawrench/client.rb', line 6124

def workflows
  @workflows
end