Class: Infrawrench::EnvironmentsSettingsNamespace

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

Overview

client.environments.settings

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ EnvironmentsSettingsNamespace

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

Parameters:



7080
7081
7082
# File 'lib/infrawrench/client.rb', line 7080

def initialize(transport)
  @transport = transport
end

Instance Method Details

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

Get the organization's environment TTL rails

The longest TTL an instantiation may ask for and the TTL the form pre-fills. Absent settings normalize into the shipped defaults (168h / 24h).

Requires permission: resources:read.

GET /api/org/orgId/environments/settings

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

Raises:



7100
7101
7102
7103
7104
7105
7106
7107
# File 'lib/infrawrench/client.rb', line 7100

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

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

Set the organization's environment TTL rails

org:settings:write, not resources:write — this is a governance decision about how long the organization is willing to pay for a throwaway environment. Clamped to a 720-hour ceiling; the default is clamped to the maximum. Audit-logged.

Requires permission: org:settings:write.

PUT /api/org/orgId/environments/settings

Parameters:

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

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

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

    Request body, shaped as EnvironmentSettings.

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

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

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

Returns:

  • (Hash)

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

Raises:



7127
7128
7129
7130
7131
7132
7133
7134
7135
# File 'lib/infrawrench/client.rb', line 7127

def update(org_id: nil, body: nil, request_options: nil)
  @transport.request(
    http_method: "PUT",
    path: "/api/org/{orgId}/environments/settings",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end