Class: Infrawrench::ConnectNamespace

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

Overview

client.connect

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ ConnectNamespace

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

Parameters:



1116
1117
1118
# File 'lib/infrawrench/client.rb', line 1116

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

Deploy env vars from a source resource to an SSH target

Requires permission: resources:execute.

POST /api/org/orgId/connect/env-deploy

Raises on 400: Bad request

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

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

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

  • body: (connect_env_deploy_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:



1136
1137
1138
1139
1140
1141
1142
1143
1144
# File 'lib/infrawrench/client.rb', line 1136

def env_deploy(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/connect/env-deploy",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end

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

Materialize source outputs as a secret in the target (e.g. K8s)

Requires permission: resources:write.

POST /api/org/orgId/connect/secret-export

Raises on 400: Bad request

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

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

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

  • body: (connect_secret_export_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:



1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'lib/infrawrench/client.rb', line 1162

def secret_export(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/connect/secret-export",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end

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

List secret-export templates and target capabilities

Requires permission: resources:read.

POST /api/org/orgId/connect/templates

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

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

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

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

Returns:

  • (Hash)

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

Raises:



1187
1188
1189
1190
1191
1192
1193
1194
1195
# File 'lib/infrawrench/client.rb', line 1187

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