Class: Infrawrench::BackupsNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.backups

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ BackupsNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of BackupsNamespace.

Parameters:



1660
1661
1662
1663
# File 'lib/infrawrench/client.rb', line 1660

def initialize(transport)
  @transport = transport
  @policies = BackupsPoliciesNamespace.new(@transport)
end

Instance Attribute Details

#policiesBackupsPoliciesNamespace (readonly)

Returns client.backups.policies.

Returns:



1656
1657
1658
# File 'lib/infrawrench/client.rb', line 1656

def policies
  @policies
end

Instance Method Details

#get(org_id: nil, request_options: nil) ⇒ Hash

List backup coverage across synced resources

What protects the organization's stateful resources, what does not, and which backups protect nothing. Derived from already-synced inventory using the backupRole and backupPolicy declarations plugins carry on their resource types — no provider API calls are made and results reflect the last sync. Findings are recomputed on every read rather than stored. Orphaned backups carry a trailing-30-day spend quote when billing data is available.

GET /api/org/orgId/backups

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as BackupCoverageResponse — see sig/infrawrench/sdk.rbs.

Raises:



1683
1684
1685
1686
1687
1688
1689
1690
# File 'lib/infrawrench/client.rb', line 1683

def get(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/backups",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end