Class: Infrawrench::DnsNamespace

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

Overview

client.dns

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ DnsNamespace

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

Parameters:



6809
6810
6811
# File 'lib/infrawrench/client.rb', line 6809

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

List every DNS zone and record, with dangling targets flagged

One view over every zone and record across the connected DNS providers (Cloudflare, Route 53, Cloud DNS, DigitalOcean, Netlify, Azure DNS, Vercel), with each record target classified against the rest of the workspace. No provider API calls are made and no DNS is resolved — results reflect the last sync.

A dangling target is a subdomain-takeover candidate: the record points into a provider namespace this workspace manages and nothing synced claims it. The same records surface as dns-dangling-target findings on GET /posture and alert through the posture channel, so there is no separate DNS alert setting.

Requires permission: resources:read.

GET /api/org/orgId/dns

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 DnsInventoryResponse — see sig/infrawrench/sdk.rbs.

Raises:



6837
6838
6839
6840
6841
6842
6843
6844
# File 'lib/infrawrench/client.rb', line 6837

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