Class: Infrawrench::ResourcesNamespace

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

Overview

client.resources

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ ResourcesNamespace

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

Parameters:



3533
3534
3535
3536
3537
# File 'lib/infrawrench/client.rb', line 3533

def initialize(transport)
  @transport = transport
  @manifest = ResourcesManifestNamespace.new(@transport)
  @secret_versions = ResourcesSecretVersionsNamespace.new(@transport)
end

Instance Attribute Details

#manifestResourcesManifestNamespace (readonly)

Returns client.resources.manifest.

Returns:



3527
3528
3529
# File 'lib/infrawrench/client.rb', line 3527

def manifest
  @manifest
end

#secret_versionsResourcesSecretVersionsNamespace (readonly)

Returns client.resources.secret_versions.

Returns:



3529
3530
3531
# File 'lib/infrawrench/client.rb', line 3529

def secret_versions
  @secret_versions
end

Instance Method Details

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

Attach a resource onto another (e.g. disk → VM)

Requires permission: resources:write.

POST /api/org/orgId/resources/attach

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

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

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

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



3555
3556
3557
3558
3559
3560
3561
3562
3563
# File 'lib/infrawrench/client.rb', line 3555

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

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

Create a new resource via its plugin

Requires permission: resources:write.

POST /api/org/orgId/resources/create

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

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

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

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

Returns:

  • (Hash)

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

Raises:



3582
3583
3584
3585
3586
3587
3588
3589
3590
# File 'lib/infrawrench/client.rb', line 3582

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

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

Get the dynamic create form for a resource type

Calls the plugin's getCreateConfig. The returned CreateResourceConfig is plugin-shaped — see JsonObject.

Requires permission: resources:write.

POST /api/org/orgId/resources/create-config

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

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

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

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

Returns:

  • (Hash)

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

Raises:



3611
3612
3613
3614
3615
3616
3617
3618
3619
# File 'lib/infrawrench/client.rb', line 3611

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

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

Cost estimate for the current create form values

Requires permission: resources:read.

POST /api/org/orgId/resources/create-cost-estimate

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

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

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

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

Returns:

  • (Hash)

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

Raises:



3633
3634
3635
3636
3637
3638
3639
3640
3641
# File 'lib/infrawrench/client.rb', line 3633

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

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

Pricing per size for a create form

Requires permission: resources:read.

POST /api/org/orgId/resources/create-pricing

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

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

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

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

Returns:

  • (Hash)

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

Raises:



3655
3656
3657
3658
3659
3660
3661
3662
3663
# File 'lib/infrawrench/client.rb', line 3655

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

#delete(plugin_id:, type_id:, resource_id:, account_id:, org_id: nil, parent_resource_id: nil, request_options: nil) ⇒ Hash

Delete a resource via the plugin

Requires permission: resources:delete.

DELETE /api/org/orgId/resources/pluginId/typeId

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.

  • plugin_id (String)
  • type_id (String)
  • resource_id (String)
  • account_id (String)
  • parent_resource_id (String, nil) (defaults to: nil)
  • request_options (Hash, nil) (defaults to: nil)

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • resource_id: (resource_id)
  • account_id: (String)
  • org_id: (String, nil) (defaults to: nil)
  • parent_resource_id: (resource_id, 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:



3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
# File 'lib/infrawrench/client.rb', line 3685

def delete(
  plugin_id:,
  type_id:,
  resource_id:,
  account_id:,
  org_id: nil,
  parent_resource_id: nil,
  request_options: nil
)
  @transport.request(
    http_method: "DELETE",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    query: {
      "resourceId" => resource_id,
      "accountId" => ,
      "parentResourceId" => parent_resource_id
    },
    request_options: request_options
  )
end

#describe(plugin_id:, type_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Get human-readable describe text for a resource

Requires permission: resources:read.

POST /api/org/orgId/resources/pluginId/typeId/describe

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.

  • plugin_id (String)
  • type_id (String)
  • body (Hash)

    Request body, shaped as DescribeRequest.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • body: (describe_request)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



3725
3726
3727
3728
3729
3730
3731
3732
3733
# File 'lib/infrawrench/client.rb', line 3725

def describe(plugin_id:, type_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/describe",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    body: body,
    request_options: request_options
  )
end

#detail(plugin_id:, type_id:, resource_id:, org_id: nil, account_id: nil, parent_resource_id: nil, include_peer_panes: nil, request_options: nil) ⇒ Hash

Full resource detail page payload

Performs a live listResources against the provider, falls back to DB on failure, and returns the plugin's renderDetail schema plus host-derived flags (SQL/KV/SSH availability, child resources, peer panes, etc).

Requires permission: resources:read.

GET /api/org/orgId/resources/pluginId/typeId/detail

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.

  • plugin_id (String)
  • type_id (String)
  • resource_id (String)
  • account_id (String, nil) (defaults to: nil)
  • parent_resource_id (String, nil) (defaults to: nil)
  • include_peer_panes (String, nil) (defaults to: nil)

    Default true. If false, peer panes are returned as stubs.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • resource_id: (resource_id)
  • org_id: (String, nil) (defaults to: nil)
  • account_id: (String, nil) (defaults to: nil)
  • parent_resource_id: (resource_id, nil) (defaults to: nil)
  • include_peer_panes: ("true", "false", nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
# File 'lib/infrawrench/client.rb', line 3761

def detail(
  plugin_id:,
  type_id:,
  resource_id:,
  org_id: nil,
  account_id: nil,
  parent_resource_id: nil,
  include_peer_panes: nil,
  request_options: nil
)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/detail",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    query: {
      "resourceId" => resource_id,
      "accountId" => ,
      "parentResourceId" => parent_resource_id,
      "includePeerPanes" => include_peer_panes
    },
    request_options: request_options
  )
end

#export_credential(plugin_id:, type_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Export a credential file for a resource (one-time reveal)

Requires permission: secrets:read.

POST /api/org/orgId/resources/pluginId/typeId/export-credential

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.

  • plugin_id (String)
  • type_id (String)
  • body (Hash)

    Request body, shaped as ExportCredentialRequest.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • body: (export_credential_request)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



3803
3804
3805
3806
3807
3808
3809
3810
3811
# File 'lib/infrawrench/client.rb', line 3803

def export_credential(plugin_id:, type_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/export-credential",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    body: body,
    request_options: request_options
  )
end

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

Execute an in-form field action (e.g. generate an IAM role)

Calls the plugin's executeFieldAction. Returns { value } to assign to the field; for select fields the optional option should be spliced into the options list so the new value can be displayed.

POST /api/org/orgId/resources/field-action

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

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

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

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

Returns:

  • (Hash)

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

Raises:



3832
3833
3834
3835
3836
3837
3838
3839
3840
# File 'lib/infrawrench/client.rb', line 3832

def field_action(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/field-action",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end

#import_yaml(plugin_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Bulk-import resources from YAML (kubectl apply -f equivalent)

Requires permission: resources:write.

POST /api/org/orgId/resources/pluginId/import-yaml

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.

  • plugin_id (String)
  • body (Hash)

    Request body, shaped as ImportYamlRequest.

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

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

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

Returns:

  • (Hash)

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

Raises:



3859
3860
3861
3862
3863
3864
3865
3866
3867
# File 'lib/infrawrench/client.rb', line 3859

def import_yaml(plugin_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/import-yaml",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id },
    body: body,
    request_options: request_options
  )
end

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

Invoke a plugin-defined action on a resource

Requires permission: resources:write.

POST /api/org/orgId/resources/invoke-action

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

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

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

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



3885
3886
3887
3888
3889
3890
3891
3892
3893
# File 'lib/infrawrench/client.rb', line 3885

def invoke_action(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/invoke-action",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end

#logs(plugin_id:, type_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Fetch logs for a resource

Requires permission: resources:read.

POST /api/org/orgId/resources/pluginId/typeId/logs

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.

  • plugin_id (String)
  • type_id (String)
  • body (Hash)

    Request body, shaped as LogsRequest.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • body: (logs_request)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



3913
3914
3915
3916
3917
3918
3919
3920
3921
# File 'lib/infrawrench/client.rb', line 3913

def logs(plugin_id:, type_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/logs",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    body: body,
    request_options: request_options
  )
end

#metrics(plugin_id:, type_id:, body:, org_id: nil, request_options: nil) ⇒ Hash

Fetch metric series for a resource

Historical points from the metrics store when the resource has accumulated any (resources pinned to a dashboard are polled continuously); otherwise the series are fetched live from the provider on demand.

Requires permission: resources:read.

POST /api/org/orgId/resources/pluginId/typeId/metrics

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.

  • plugin_id (String)
  • type_id (String)
  • body (Hash)

    Request body, shaped as MetricsRequest.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • body: (metrics_request)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

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

Raises:



3945
3946
3947
3948
3949
3950
3951
3952
3953
# File 'lib/infrawrench/client.rb', line 3945

def metrics(plugin_id:, type_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/metrics",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    body: body,
    request_options: request_options
  )
end

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

Run a NoSQL document-browser command (e.g. MongoDB shell)

Requires permission: resources:execute.

POST /api/org/orgId/resources/nosql-command

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

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

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

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

Returns:

  • (Hash)

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

Raises:



3971
3972
3973
3974
3975
3976
3977
3978
3979
# File 'lib/infrawrench/client.rb', line 3971

def nosql_command(body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/nosql-command",
    path_params: { "orgId" => org_id },
    body: body,
    request_options: request_options
  )
end

#peer_panes(plugin_id:, type_id:, body:, org_id: nil, request_options: nil) ⇒ Array<Hash>

Lazy-fetch peer-integration panes for a resource

Requires permission: resources:read.

POST /api/org/orgId/resources/pluginId/typeId/peer-panes

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.

  • plugin_id (String)
  • type_id (String)
  • body (Hash)

    Request body, shaped as PeerPanesRequest.

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

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

  • plugin_id: (plugin_id)
  • type_id: (resource_type_id)
  • body: (peer_panes_request)
  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Array<Hash>)

    Parsed JSON, shaped as Array<PeerPane> — see sig/infrawrench/sdk.rbs.

Raises:



3998
3999
4000
4001
4002
4003
4004
4005
4006
# File 'lib/infrawrench/client.rb', line 3998

def peer_panes(plugin_id:, type_id:, body:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/resources/{pluginId}/{typeId}/peer-panes",
    path_params: { "orgId" => org_id, "pluginId" => plugin_id, "typeId" => type_id },
    body: body,
    request_options: request_options
  )
end

#picker_resources(body:, org_id: nil, request_options: nil) ⇒ Array<Hash>

Fetch options for a resource-picker field

Requires permission: resources:read.

POST /api/org/orgId/resources/picker-resources

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

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

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

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

Returns:

  • (Array<Hash>)

    Parsed JSON, shaped as Array<PickerResource> — see sig/infrawrench/sdk.rbs.

Raises:



4021
4022
4023
4024
4025
4026
4027
4028
4029
# File 'lib/infrawrench/client.rb', line 4021

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

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

Update a resource via its plugin

Applies the supplied field changes upstream and persists the refreshed fields/display name to the DB. The body's fields map only carries the keys the caller actually changed.

POST /api/org/orgId/resources/update

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

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

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

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

Returns:

  • (Hash)

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

Raises:



4050
4051
4052
4053
4054
4055
4056
4057
4058
# File 'lib/infrawrench/client.rb', line 4050

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