Class: Infrawrench::AssociationsNamespace

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

Overview

client.associations

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ AssociationsNamespace

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

Parameters:



665
666
667
# File 'lib/infrawrench/client.rb', line 665

def initialize(transport)
  @transport = transport
end

Instance Method Details

#create(body:, org_id: nil, request_options: nil) ⇒ Hash

Wire one resource's output into another resource's secret field

Requires permission: secrets:write.

POST /api/org/orgId/associations

Raises on 404: Not found

Parameters:

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

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

  • body (Hash)

    Request body, shaped as AssociationRequest.

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

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

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

Returns:

  • (Hash)

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

Raises:



683
684
685
686
687
688
689
690
691
# File 'lib/infrawrench/client.rb', line 683

def create(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/associations",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end

#literal(body:, org_id: nil, request_options: nil) ⇒ Hash

Set a secret field to a literal plaintext value

Requires permission: secrets:write.

POST /api/org/orgId/associations/literal

Raises on 404: Not found

Parameters:

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

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

  • body (Hash)

    Request body, shaped as LiteralAssociationRequest.

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

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

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

Returns:

  • (Hash)

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

Raises:



707
708
709
710
711
712
713
714
715
# File 'lib/infrawrench/client.rb', line 707

def literal(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/associations/literal",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end