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.access_requests

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)


14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
# File 'lib/infrawrench/client.rb', line 14969

def initialize(**options)
  @transport = Transport.new(**options)
  @access_requests = AccessRequestsNamespace.new(@transport)
  @access_review = AccessReviewNamespace.new(@transport)
  @accounts = AccountsNamespace.new(@transport)
  @agents = AgentsNamespace.new(@transport)
  @alert_rules = AlertRulesNamespace.new(@transport)
  @api_keys = ApiKeysNamespace.new(@transport)
  @artifacts = ArtifactsNamespace.new(@transport)
  @associations = AssociationsNamespace.new(@transport)
  @audit_logs = AuditLogsNamespace.new(@transport)
  @auth = AuthNamespace.new(@transport)
  @backups = BackupsNamespace.new(@transport)
  @bastions = BastionsNamespace.new(@transport)
  @billing = BillingNamespace.new(@transport)
  @billing_rules = BillingRulesNamespace.new(@transport)
  @blast_radius = BlastRadiusNamespace.new(@transport)
  @budgets = BudgetsNamespace.new(@transport)
  @business_metrics = BusinessMetricsNamespace.new(@transport)
  @change_freezes = ChangeFreezesNamespace.new(@transport)
  @changes = ChangesNamespace.new(@transport)
  @commitments = CommitmentsNamespace.new(@transport)
  @config = ConfigNamespace.new(@transport)
  @connect = ConnectNamespace.new(@transport)
  @cost_alerts = CostAlertsNamespace.new(@transport)
  @cost_annotations = CostAnnotationsNamespace.new(@transport)
  @cost_centres = CostCentresNamespace.new(@transport)
  @cost_exports = CostExportsNamespace.new(@transport)
  @cost_report_folders = CostReportFoldersNamespace.new(@transport)
  @cost_report_notifications = CostReportNotificationsNamespace.new(@transport)
  @cost_reports = CostReportsNamespace.new(@transport)
  @cost_scenarios = CostScenariosNamespace.new(@transport)
  @costs = CostsNamespace.new(@transport)
  @credential_hygiene = CredentialHygieneNamespace.new(@transport)
  @credits = CreditsNamespace.new(@transport)
  @currency = CurrencyNamespace.new(@transport)
  @custom_graphs = CustomGraphsNamespace.new(@transport)
  @dashboards = DashboardsNamespace.new(@transport)
  @dependency_graph = DependencyGraphNamespace.new(@transport)
  @deployments = DeploymentsNamespace.new(@transport)
  @digest = DigestNamespace.new(@transport)
  @dns = DnsNamespace.new(@transport)
  @docker = DockerNamespace.new(@transport)
  @environment_diff = EnvironmentDiffNamespace.new(@transport)
  @environments = EnvironmentsNamespace.new(@transport)
  @expiring = ExpiringNamespace.new(@transport)
  @iac = IacNamespace.new(@transport)
  @incidents = IncidentsNamespace.new(@transport)
  @invitations = InvitationsNamespace.new(@transport)
  @invoices = InvoicesNamespace.new(@transport)
  @jira = JiraNamespace.new(@transport)
  @kv = KvNamespace.new(@transport)
  @leases = LeasesNamespace.new(@transport)
  @linear = LinearNamespace.new(@transport)
  @log_workspaces = LogWorkspacesNamespace.new(@transport)
  @managed_accounts = ManagedAccountsNamespace.new(@transport)
  @metric_alerts = MetricAlertsNamespace.new(@transport)
  @moment = MomentNamespace.new(@transport)
  @msteams = MsteamsNamespace.new(@transport)
  @network_flows = NetworkFlowsNamespace.new(@transport)
  @orgs = OrgsNamespace.new(@transport)
  @orphans = OrphansNamespace.new(@transport)
  @ownership = OwnershipNamespace.new(@transport)
  @pages = PagesNamespace.new(@transport)
  @posture = PostureNamespace.new(@transport)
  @probes = ProbesNamespace.new(@transport)
  @profile = ProfileNamespace.new(@transport)
  @quotas = QuotasNamespace.new(@transport)
  @resources = ResourcesNamespace.new(@transport)
  @rightsizing = RightsizingNamespace.new(@transport)
  @saved_cost_filters = SavedCostFiltersNamespace.new(@transport)
  @schedules = SchedulesNamespace.new(@transport)
  @search = SearchNamespace.new(@transport)
  @session_recordings = SessionRecordingsNamespace.new(@transport)
  @sftp = SftpNamespace.new(@transport)
  @shared_consoles = SharedConsolesNamespace.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 = StatusNamespace.new(@transport)
  @status_incidents = StatusIncidentsNamespace.new(@transport)
  @status_pages = StatusPagesNamespace.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

#access_requestsAccessRequestsNamespace (readonly)

Returns client.access_requests.

Returns:



14792
14793
14794
# File 'lib/infrawrench/client.rb', line 14792

def access_requests
  @access_requests
end

#access_reviewAccessReviewNamespace (readonly)

Returns client.access_review.

Returns:



14794
14795
14796
# File 'lib/infrawrench/client.rb', line 14794

def access_review
  @access_review
end

#accountsAccountsNamespace (readonly)

Returns client.accounts.

Returns:



14796
14797
14798
# File 'lib/infrawrench/client.rb', line 14796

def accounts
  @accounts
end

#agentsAgentsNamespace (readonly)

Returns client.agents.

Returns:



14798
14799
14800
# File 'lib/infrawrench/client.rb', line 14798

def agents
  @agents
end

#alert_rulesAlertRulesNamespace (readonly)

Returns client.alert_rules.

Returns:



14800
14801
14802
# File 'lib/infrawrench/client.rb', line 14800

def alert_rules
  @alert_rules
end

#api_keysApiKeysNamespace (readonly)

Returns client.api_keys.

Returns:



14802
14803
14804
# File 'lib/infrawrench/client.rb', line 14802

def api_keys
  @api_keys
end

#artifactsArtifactsNamespace (readonly)

Returns client.artifacts.

Returns:



14804
14805
14806
# File 'lib/infrawrench/client.rb', line 14804

def artifacts
  @artifacts
end

#associationsAssociationsNamespace (readonly)

Returns client.associations.

Returns:



14806
14807
14808
# File 'lib/infrawrench/client.rb', line 14806

def associations
  @associations
end

#audit_logsAuditLogsNamespace (readonly)

Returns client.audit_logs.

Returns:



14808
14809
14810
# File 'lib/infrawrench/client.rb', line 14808

def audit_logs
  @audit_logs
end

#authAuthNamespace (readonly)

Returns client.auth.

Returns:



14810
14811
14812
# File 'lib/infrawrench/client.rb', line 14810

def auth
  @auth
end

#backupsBackupsNamespace (readonly)

Returns client.backups.

Returns:



14812
14813
14814
# File 'lib/infrawrench/client.rb', line 14812

def backups
  @backups
end

#bastionsBastionsNamespace (readonly)

Returns client.bastions.

Returns:



14814
14815
14816
# File 'lib/infrawrench/client.rb', line 14814

def bastions
  @bastions
end

#billingBillingNamespace (readonly)

Returns client.billing.

Returns:



14816
14817
14818
# File 'lib/infrawrench/client.rb', line 14816

def billing
  @billing
end

#billing_rulesBillingRulesNamespace (readonly)

Returns client.billing_rules.

Returns:



14818
14819
14820
# File 'lib/infrawrench/client.rb', line 14818

def billing_rules
  @billing_rules
end

#blast_radiusBlastRadiusNamespace (readonly)

Returns client.blast_radius.

Returns:



14820
14821
14822
# File 'lib/infrawrench/client.rb', line 14820

def blast_radius
  @blast_radius
end

#budgetsBudgetsNamespace (readonly)

Returns client.budgets.

Returns:



14822
14823
14824
# File 'lib/infrawrench/client.rb', line 14822

def budgets
  @budgets
end

#business_metricsBusinessMetricsNamespace (readonly)

Returns client.business_metrics.

Returns:



14824
14825
14826
# File 'lib/infrawrench/client.rb', line 14824

def business_metrics
  @business_metrics
end

#change_freezesChangeFreezesNamespace (readonly)

Returns client.change_freezes.

Returns:



14826
14827
14828
# File 'lib/infrawrench/client.rb', line 14826

def change_freezes
  @change_freezes
end

#changesChangesNamespace (readonly)

Returns client.changes.

Returns:



14828
14829
14830
# File 'lib/infrawrench/client.rb', line 14828

def changes
  @changes
end

#commitmentsCommitmentsNamespace (readonly)

Returns client.commitments.

Returns:



14830
14831
14832
# File 'lib/infrawrench/client.rb', line 14830

def commitments
  @commitments
end

#configConfigNamespace (readonly)

Returns client.config.

Returns:



14832
14833
14834
# File 'lib/infrawrench/client.rb', line 14832

def config
  @config
end

#connectConnectNamespace (readonly)

Returns client.connect.

Returns:



14834
14835
14836
# File 'lib/infrawrench/client.rb', line 14834

def connect
  @connect
end

#cost_alertsCostAlertsNamespace (readonly)

Returns client.cost_alerts.

Returns:



14836
14837
14838
# File 'lib/infrawrench/client.rb', line 14836

def cost_alerts
  @cost_alerts
end

#cost_annotationsCostAnnotationsNamespace (readonly)

Returns client.cost_annotations.

Returns:



14838
14839
14840
# File 'lib/infrawrench/client.rb', line 14838

def cost_annotations
  @cost_annotations
end

#cost_centresCostCentresNamespace (readonly)

Returns client.cost_centres.

Returns:



14840
14841
14842
# File 'lib/infrawrench/client.rb', line 14840

def cost_centres
  @cost_centres
end

#cost_exportsCostExportsNamespace (readonly)

Returns client.cost_exports.

Returns:



14842
14843
14844
# File 'lib/infrawrench/client.rb', line 14842

def cost_exports
  @cost_exports
end

#cost_report_foldersCostReportFoldersNamespace (readonly)

Returns client.cost_report_folders.

Returns:



14844
14845
14846
# File 'lib/infrawrench/client.rb', line 14844

def cost_report_folders
  @cost_report_folders
end

#cost_report_notificationsCostReportNotificationsNamespace (readonly)

Returns client.cost_report_notifications.

Returns:



14846
14847
14848
# File 'lib/infrawrench/client.rb', line 14846

def cost_report_notifications
  @cost_report_notifications
end

#cost_reportsCostReportsNamespace (readonly)

Returns client.cost_reports.

Returns:



14848
14849
14850
# File 'lib/infrawrench/client.rb', line 14848

def cost_reports
  @cost_reports
end

#cost_scenariosCostScenariosNamespace (readonly)

Returns client.cost_scenarios.

Returns:



14850
14851
14852
# File 'lib/infrawrench/client.rb', line 14850

def cost_scenarios
  @cost_scenarios
end

#costsCostsNamespace (readonly)

Returns client.costs.

Returns:



14852
14853
14854
# File 'lib/infrawrench/client.rb', line 14852

def costs
  @costs
end

#credential_hygieneCredentialHygieneNamespace (readonly)

Returns client.credential_hygiene.

Returns:



14854
14855
14856
# File 'lib/infrawrench/client.rb', line 14854

def credential_hygiene
  @credential_hygiene
end

#creditsCreditsNamespace (readonly)

Returns client.credits.

Returns:



14856
14857
14858
# File 'lib/infrawrench/client.rb', line 14856

def credits
  @credits
end

#currencyCurrencyNamespace (readonly)

Returns client.currency.

Returns:



14858
14859
14860
# File 'lib/infrawrench/client.rb', line 14858

def currency
  @currency
end

#custom_graphsCustomGraphsNamespace (readonly)

Returns client.custom_graphs.

Returns:



14860
14861
14862
# File 'lib/infrawrench/client.rb', line 14860

def custom_graphs
  @custom_graphs
end

#dashboardsDashboardsNamespace (readonly)

Returns client.dashboards.

Returns:



14862
14863
14864
# File 'lib/infrawrench/client.rb', line 14862

def dashboards
  @dashboards
end

#dependency_graphDependencyGraphNamespace (readonly)

Returns client.dependency_graph.

Returns:



14864
14865
14866
# File 'lib/infrawrench/client.rb', line 14864

def dependency_graph
  @dependency_graph
end

#deploymentsDeploymentsNamespace (readonly)

Returns client.deployments.

Returns:



14866
14867
14868
# File 'lib/infrawrench/client.rb', line 14866

def deployments
  @deployments
end

#digestDigestNamespace (readonly)

Returns client.digest.

Returns:



14868
14869
14870
# File 'lib/infrawrench/client.rb', line 14868

def digest
  @digest
end

#dnsDnsNamespace (readonly)

Returns client.dns.

Returns:



14870
14871
14872
# File 'lib/infrawrench/client.rb', line 14870

def dns
  @dns
end

#dockerDockerNamespace (readonly)

Returns client.docker.

Returns:



14872
14873
14874
# File 'lib/infrawrench/client.rb', line 14872

def docker
  @docker
end

#environment_diffEnvironmentDiffNamespace (readonly)

Returns client.environment_diff.

Returns:



14874
14875
14876
# File 'lib/infrawrench/client.rb', line 14874

def environment_diff
  @environment_diff
end

#environmentsEnvironmentsNamespace (readonly)

Returns client.environments.

Returns:



14876
14877
14878
# File 'lib/infrawrench/client.rb', line 14876

def environments
  @environments
end

#expiringExpiringNamespace (readonly)

Returns client.expiring.

Returns:



14878
14879
14880
# File 'lib/infrawrench/client.rb', line 14878

def expiring
  @expiring
end

#iacIacNamespace (readonly)

Returns client.iac.

Returns:



14880
14881
14882
# File 'lib/infrawrench/client.rb', line 14880

def iac
  @iac
end

#incidentsIncidentsNamespace (readonly)

Returns client.incidents.

Returns:



14882
14883
14884
# File 'lib/infrawrench/client.rb', line 14882

def incidents
  @incidents
end

#invitationsInvitationsNamespace (readonly)

Returns client.invitations.

Returns:



14884
14885
14886
# File 'lib/infrawrench/client.rb', line 14884

def invitations
  @invitations
end

#invoicesInvoicesNamespace (readonly)

Returns client.invoices.

Returns:



14886
14887
14888
# File 'lib/infrawrench/client.rb', line 14886

def invoices
  @invoices
end

#jiraJiraNamespace (readonly)

Returns client.jira.

Returns:



14888
14889
14890
# File 'lib/infrawrench/client.rb', line 14888

def jira
  @jira
end

#kvKvNamespace (readonly)

Returns client.kv.

Returns:



14890
14891
14892
# File 'lib/infrawrench/client.rb', line 14890

def kv
  @kv
end

#leasesLeasesNamespace (readonly)

Returns client.leases.

Returns:



14892
14893
14894
# File 'lib/infrawrench/client.rb', line 14892

def leases
  @leases
end

#linearLinearNamespace (readonly)

Returns client.linear.

Returns:



14894
14895
14896
# File 'lib/infrawrench/client.rb', line 14894

def linear
  @linear
end

#log_workspacesLogWorkspacesNamespace (readonly)

Returns client.log_workspaces.

Returns:



14896
14897
14898
# File 'lib/infrawrench/client.rb', line 14896

def log_workspaces
  @log_workspaces
end

#managed_accountsManagedAccountsNamespace (readonly)

Returns client.managed_accounts.

Returns:



14898
14899
14900
# File 'lib/infrawrench/client.rb', line 14898

def managed_accounts
  @managed_accounts
end

#metric_alertsMetricAlertsNamespace (readonly)

Returns client.metric_alerts.

Returns:



14900
14901
14902
# File 'lib/infrawrench/client.rb', line 14900

def metric_alerts
  @metric_alerts
end

#momentMomentNamespace (readonly)

Returns client.moment.

Returns:



14902
14903
14904
# File 'lib/infrawrench/client.rb', line 14902

def moment
  @moment
end

#msteamsMsteamsNamespace (readonly)

Returns client.msteams.

Returns:



14904
14905
14906
# File 'lib/infrawrench/client.rb', line 14904

def msteams
  @msteams
end

#network_flowsNetworkFlowsNamespace (readonly)

Returns client.network_flows.

Returns:



14906
14907
14908
# File 'lib/infrawrench/client.rb', line 14906

def network_flows
  @network_flows
end

#orgsOrgsNamespace (readonly)

Returns client.orgs.

Returns:



14908
14909
14910
# File 'lib/infrawrench/client.rb', line 14908

def orgs
  @orgs
end

#orphansOrphansNamespace (readonly)

Returns client.orphans.

Returns:



14910
14911
14912
# File 'lib/infrawrench/client.rb', line 14910

def orphans
  @orphans
end

#ownershipOwnershipNamespace (readonly)

Returns client.ownership.

Returns:



14912
14913
14914
# File 'lib/infrawrench/client.rb', line 14912

def ownership
  @ownership
end

#pagesPagesNamespace (readonly)

Returns client.pages.

Returns:



14914
14915
14916
# File 'lib/infrawrench/client.rb', line 14914

def pages
  @pages
end

#posturePostureNamespace (readonly)

Returns client.posture.

Returns:



14916
14917
14918
# File 'lib/infrawrench/client.rb', line 14916

def posture
  @posture
end

#probesProbesNamespace (readonly)

Returns client.probes.

Returns:



14918
14919
14920
# File 'lib/infrawrench/client.rb', line 14918

def probes
  @probes
end

#profileProfileNamespace (readonly)

Returns client.profile.

Returns:



14920
14921
14922
# File 'lib/infrawrench/client.rb', line 14920

def profile
  @profile
end

#quotasQuotasNamespace (readonly)

Returns client.quotas.

Returns:



14922
14923
14924
# File 'lib/infrawrench/client.rb', line 14922

def quotas
  @quotas
end

#resourcesResourcesNamespace (readonly)

Returns client.resources.

Returns:



14924
14925
14926
# File 'lib/infrawrench/client.rb', line 14924

def resources
  @resources
end

#rightsizingRightsizingNamespace (readonly)

Returns client.rightsizing.

Returns:



14926
14927
14928
# File 'lib/infrawrench/client.rb', line 14926

def rightsizing
  @rightsizing
end

#saved_cost_filtersSavedCostFiltersNamespace (readonly)

Returns client.saved_cost_filters.

Returns:



14928
14929
14930
# File 'lib/infrawrench/client.rb', line 14928

def saved_cost_filters
  @saved_cost_filters
end

#schedulesSchedulesNamespace (readonly)

Returns client.schedules.

Returns:



14930
14931
14932
# File 'lib/infrawrench/client.rb', line 14930

def schedules
  @schedules
end

#searchSearchNamespace (readonly)

Returns client.search.

Returns:



14932
14933
14934
# File 'lib/infrawrench/client.rb', line 14932

def search
  @search
end

#session_recordingsSessionRecordingsNamespace (readonly)

Returns client.session_recordings.

Returns:



14934
14935
14936
# File 'lib/infrawrench/client.rb', line 14934

def session_recordings
  @session_recordings
end

#sftpSftpNamespace (readonly)

Returns client.sftp.

Returns:



14936
14937
14938
# File 'lib/infrawrench/client.rb', line 14936

def sftp
  @sftp
end

#shared_consolesSharedConsolesNamespace (readonly)

Returns client.shared_consoles.

Returns:



14938
14939
14940
# File 'lib/infrawrench/client.rb', line 14938

def shared_consoles
  @shared_consoles
end

#slackSlackNamespace (readonly)

Returns client.slack.

Returns:



14940
14941
14942
# File 'lib/infrawrench/client.rb', line 14940

def slack
  @slack
end

#sqlSqlNamespace (readonly)

Returns client.sql.

Returns:



14942
14943
14944
# File 'lib/infrawrench/client.rb', line 14942

def sql
  @sql
end

#ssh_fanoutSshFanoutNamespace (readonly)

Returns client.ssh_fanout.

Returns:



14944
14945
14946
# File 'lib/infrawrench/client.rb', line 14944

def ssh_fanout
  @ssh_fanout
end

#ssh_keysSshKeysNamespace (readonly)

Returns client.ssh_keys.

Returns:



14946
14947
14948
# File 'lib/infrawrench/client.rb', line 14946

def ssh_keys
  @ssh_keys
end

#ssh_tunnelsSshTunnelsNamespace (readonly)

Returns client.ssh_tunnels.

Returns:



14948
14949
14950
# File 'lib/infrawrench/client.rb', line 14948

def ssh_tunnels
  @ssh_tunnels
end

#statusStatusNamespace (readonly)

Returns client.status.

Returns:



14950
14951
14952
# File 'lib/infrawrench/client.rb', line 14950

def status
  @status
end

#status_incidentsStatusIncidentsNamespace (readonly)

Returns client.status_incidents.

Returns:



14952
14953
14954
# File 'lib/infrawrench/client.rb', line 14952

def status_incidents
  @status_incidents
end

#status_pagesStatusPagesNamespace (readonly)

Returns client.status_pages.

Returns:



14954
14955
14956
# File 'lib/infrawrench/client.rb', line 14954

def status_pages
  @status_pages
end

#storageStorageNamespace (readonly)

Returns client.storage.

Returns:



14956
14957
14958
# File 'lib/infrawrench/client.rb', line 14956

def storage
  @storage
end

#tag_policyTagPolicyNamespace (readonly)

Returns client.tag_policy.

Returns:



14958
14959
14960
# File 'lib/infrawrench/client.rb', line 14958

def tag_policy
  @tag_policy
end

#teamTeamNamespace (readonly)

Returns client.team.

Returns:



14960
14961
14962
# File 'lib/infrawrench/client.rb', line 14960

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.



14790
14791
14792
# File 'lib/infrawrench/client.rb', line 14790

def transport
  @transport
end

#workflow_approvalsWorkflowApprovalsNamespace (readonly)

Returns client.workflow_approvals.

Returns:



14962
14963
14964
# File 'lib/infrawrench/client.rb', line 14962

def workflow_approvals
  @workflow_approvals
end

#workflowsWorkflowsNamespace (readonly)

Returns client.workflows.

Returns:



14964
14965
14966
# File 'lib/infrawrench/client.rb', line 14964

def workflows
  @workflows
end