Class: Infrawrench::AccountsSyncTypeNamespace

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

Overview

client.accounts.sync_type

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ AccountsSyncTypeNamespace

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

Parameters:



86
87
88
# File 'lib/infrawrench/client.rb', line 86

def initialize(transport)
  @transport = transport
end

Instance Method Details

#create(id:, type_id:, org_id: nil, request_options: nil) ⇒ Array<Hash>

Sync a single resource type and return its resources

Requires permission: resources:read.

POST /api/org/orgId/accounts/id/sync-type/typeId

Raises on 404: Not found

Raises on 500: Server error

Parameters:

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

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

  • id (String)
  • type_id (String)
  • request_options (Hash, nil) (defaults to: nil)

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

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

Returns:

  • (Array<Hash>)

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

Raises:



108
109
110
111
112
113
114
115
# File 'lib/infrawrench/client.rb', line 108

def create(id:, type_id:, org_id: nil, request_options: nil)
  @transport.request(
    http_method: "POST",
    path: "/api/org/{orgId}/accounts/{id}/sync-type/{typeId}",
    path_params: { "orgId" => org_id, "id" => id, "typeId" => type_id },
    request_options: request_options
  )
end